Standalone bug

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

tal
Posts: 84
Joined: Thu Jul 02, 2009 3:27 pm

Standalone bug

Post by tal » Fri Aug 27, 2010 2:19 pm

Hi,

I have a graphic bug with my standalone, in my .rev it works correctlty but when i want to use or create graphics the standalone doesnt work, the graphic is invisible.

Thanks

Tal

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Standalone bug

Post by Klaus » Fri Aug 27, 2010 4:27 pm

Hi Tal,

we might need a TAD more information, I'm afraid :)
How do you create a graphic, what kind of graphic, what scripts are involved etc...


Best

Klaus

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Standalone bug

Post by Mark » Fri Aug 27, 2010 4:33 pm

Hi,

I *guess* that the picture isn't included in the standalone. To include pictures, use the Import As Control feature in the File menu. It would be helpful to know how you want to use the picture.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

tal
Posts: 84
Joined: Thu Jul 02, 2009 3:27 pm

Re: Standalone bug

Post by tal » Wed Sep 01, 2010 10:11 am

Hi,

I uploaded a .rev, you ca try it, it works in the .rev but if you make a standalone, it doesn't work anymore, thank you

Tal
Attachments
Test.zip
(796 Bytes) Downloaded 361 times

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Standalone bug

Post by Mark » Wed Sep 01, 2010 10:15 am

Tal,

Your stack does nothing, besides creating an empty graphic object. What exactly did you have in mind?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

tal
Posts: 84
Joined: Thu Jul 02, 2009 3:27 pm

Re: Standalone bug

Post by tal » Wed Sep 01, 2010 10:22 am

I know, my stack only creates a graphic clicking on the card, and the bug is that if you make a standalone, this thing doesn't work and I don't know why.
Try to make a standalone with my .rev, you will see the difference.

Tal

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Standalone bug

Post by Mark » Wed Sep 01, 2010 10:31 am

Tal,

Only the button contains a script that can make a graphic. The card script has no effect, after it has run once. In a standalone, the size of the templateGraphic is undefined. Probably, if you set the width and height of the templateGraphic in the preOpenStack handler, it will work fine. You can move the lines that set the properties of the templateGraphic from the mouseDown handler to the same preOpenStack handler. You can delete the repeat loop and you don't need the mouseDown handler.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

tal
Posts: 84
Joined: Thu Jul 02, 2009 3:27 pm

Re: Standalone bug

Post by tal » Wed Sep 01, 2010 10:54 am

Ok, I try it, thanks

Tal

tal
Posts: 84
Joined: Thu Jul 02, 2009 3:27 pm

Re: Standalone bug

Post by tal » Wed Sep 01, 2010 11:01 am

It works better with your solution, but the bug in the standalone remains, it is difficult to see why...

Tal

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Standalone bug

Post by Mark » Wed Sep 01, 2010 11:19 am

Tal,

I don't see any "bug" when I make a standalone of your stack. In what way does it work better and what do you still want to change?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

tal
Posts: 84
Joined: Thu Jul 02, 2009 3:27 pm

Re: Standalone bug

Post by tal » Wed Sep 01, 2010 11:46 am

I cant upload a standalone, the maximum allowed size is 256 kib, in my standalone my graphic is avorted ( the style is "oval")
You can see this in the picture uploaded.


Tal
Attachments
Test.zip
(8.09 KiB) Downloaded 376 times

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Standalone bug

Post by Mark » Wed Sep 01, 2010 11:59 am

Hi Tal,

I see it. What exactly do you want instead of the tiny oval?

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Standalone bug

Post by Klaus » Wed Sep 01, 2010 12:00 pm

Hi Tal,

your image shows EXACTLY what I would exspect your script(s) to do!
So your graphic is NOT invisible in your standalone as you stated before!

When you only click with the graphics tool (instead of click-drag-release),
then you get this tiny graphic. So this is "normal" behaviour.

So please tell us what you exspect to happen!


Best

Klaus

P.S.
What the hell means "avorted"?
Coud not find this word (to avort?) in the whole internet.

tal
Posts: 84
Joined: Thu Jul 02, 2009 3:27 pm

Re: Standalone bug

Post by tal » Wed Sep 01, 2010 12:08 pm

Compare the .rev and the standalone, in the .rev the oval is not tiny and i can make an oval with different sizes.
In the standalone, the oval is created but i cant change its size, it stills small ( so avorted)

Tal

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Standalone bug

Post by Mark » Wed Sep 01, 2010 12:23 pm

Tal,

It would be easier if you provided all details right-away. I guess that you have tried to set the width and height of the templateGraphic and that this didn't work for you. Have you also deleted the card script and changed the button script as I recommended?

Your button script should now look as following:

Code: Select all

on mouseUp
     set the opaque of the templateGraphic to true
     set the style of the templateGraphic to "rectangle"
     set the blendlevel of the templateGraphic to 66
     set the width of the templateGraphic to 100
     set the height of the templateGraphic to 100
     set the style of the templateGraphic to "oval"
     choose graphic tool
end mouseUp
If the width and height are not set, you might add the following to the card script:

Code: Select all

on newGraphic
     if word 1 of the target is "graphic" then
          if the style of the target is "oval" then
               set the width of the target to 50
               set the height of the target to 50
          end if
     end if
end newGraphic
Please, let me know whether this works for you. If it doesn't, could you please tell what exactly is going wrong and what you expect to happen instead?

Are you aware of the possibility to drag instead of click? If I drag in the standalone, a new graphic is created and I can determine the size of the graphic by dragging further away from or moving back to the starting point.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply