Standalone bug
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Standalone bug
Hi Tal,
I got exactly the same result as shown on your image when I run your stack!
1. Clicked the button
2. Clicked on the card
3. Got a tiny graphic
EDIT: Maybe "the templategraphic" is set to some higher values for height/width in your IDE when you try this at home!
Why don't you tell your users to "Click and drag" to create a graphic in any wanted size?
To be able to resize the graphics, you would need more work.
I hate to repeat myself, but:
What means "avorted"? Could not find this word (to avort/avorted?) in the whole internet.
Best
Klaus
I got exactly the same result as shown on your image when I run your stack!
1. Clicked the button
2. Clicked on the card
3. Got a tiny graphic
EDIT: Maybe "the templategraphic" is set to some higher values for height/width in your IDE when you try this at home!
Why don't you tell your users to "Click and drag" to create a graphic in any wanted size?
To be able to resize the graphics, you would need more work.
I hate to repeat myself, but:
What means "avorted"? Could not find this word (to avort/avorted?) in the whole internet.
Best
Klaus
Re: Standalone bug
Hi,
I wanted to say aborted instead of avorted, sorry.
So, if you have the same problem, it is a pitty that it works in the .rev and not in the standalone.
Mark, you said you had not a problem with your standlaone?
But me and Klaus cant drag as you do, are you sure you made it in the standalone?
Tal
I wanted to say aborted instead of avorted, sorry.
So, if you have the same problem, it is a pitty that it works in the .rev and not in the standalone.
Mark, you said you had not a problem with your standlaone?
But me and Klaus cant drag as you do, are you sure you made it in the standalone?
Tal
Re: Standalone bug
Hi Tal,
"aborted" ARRRRGH!
OK, I built a standalone and can reproduce what you are talking about!
I can drag, but when I release the mouse, this tiny graphic appears as if only clicked once on the card!
Very strange, I have no idea what's going on here. Mark, any clues?
Best
Klaus
"aborted" ARRRRGH!

OK, I built a standalone and can reproduce what you are talking about!
I can drag, but when I release the mouse, this tiny graphic appears as if only clicked once on the card!
Very strange, I have no idea what's going on here. Mark, any clues?
Best
Klaus
Re: Standalone bug
tal,
put this in the card script of your test stack. No need to click the "Click to make graphic" button.
I would not do it this way but it works in development and standalone.
regards
Bernd
Code: Select all
on mouseDown
set the opaque of the templateGraphic to true
set the style of the templateGraphic to "oval"
set the blendlevel of the templateGraphic to 66
put the clickLoc into tClick
lock screen
create graphic
put the number of graphics of this card into tNumber
set the numberformat to "000"
add 0 to tNumber
set the name of last graphic to "myGraphic " & tNumber
put "myGraphic " & tNumber into tGraphicName
set the topleft of grc tGraphicName to tClick
repeat until the mouse is up
put the mouseLoc into tLoc
lock screen
set the width of grc tGraphicName to max (5, item 1 of tLoc - item 1 of tClick)
set the height of grc tGraphicName to max (5,item 2 of tLoc - item 2 of tClick)
set the topLeft of grc tGraphicName to tClick
unlock screen
unlock screen
end repeat
end mouseDown
I would not do it this way but it works in development and standalone.
regards
Bernd
Re: Standalone bug
Hi Bernd,
cool solution as always
But we would really like to know why this (simple) thing does work in the IDE but not in the standalone!
Best
Klaus
cool solution as always

But we would really like to know why this (simple) thing does work in the IDE but not in the standalone!
Best
Klaus
Re: Standalone bug
Klaus,
I think the problem is that in Tal's card scriptthe mouseDown never finishes and interferes with the normal operation of the graphic creation and changing of its size. Mind you the mouseDown is triggered when clicking on his button and "repeats until the mouse is down" (???)
Why it works in the IDE, I have no idea.
if you put this into the card script of tal's original stack then it works:
regards
Bernd
I think the problem is that in Tal's card script
Code: Select all
on mouseDown
repeat until the mouse is down
set the opaque of the templateGraphic to true
set the style of the templateGraphic to "rectangle"
set the blendlevel of the templateGraphic to 66
end repeat
end mouseDown
Why it works in the IDE, I have no idea.
if you put this into the card script of tal's original stack then it works:
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
end mouseUp
Bernd
Re: Standalone bug
Hi Bernd,
Yep, sounds reasonable, thanks!
Best
Klaus
Ah, very good catch!bn wrote:Klaus,
I think the problem is that in Tal's card scriptthe mouseDown never finishes and interferes with the normal operation of the graphic creation and changing of its size. Mind you the mouseDown is triggered when clicking on his button and "repeats until the mouse is down" (???)Code: Select all
on mouseDown repeat until the mouse is down set the opaque of the templateGraphic to true set the style of the templateGraphic to "rectangle" set the blendlevel of the templateGraphic to 66 end repeat end mouseDown
Why it works in the IDE, I have no idea.
...
Yep, sounds reasonable, thanks!
Best
Klaus
Re: Standalone bug
Thanks, there is another graphic bug only in the standlaone.
I uploaded it, it is a .rev you did making selected groups, it works fine but if you make a standalone, the graphic selection is invisible.
Tal
I uploaded it, it is a .rev you did making selected groups, it works fine but if you make a standalone, the graphic selection is invisible.
Tal
- Attachments
-
- selectGroupsIIII.rev (1).zip
- (5.96 KiB) Downloaded 328 times
Re: Standalone bug
To respond to your previous message, I stopped to use the mousedown message in my card, I only put "choose graphic tool" in a button and no script in my card, so it worked in the .rev and not in the standalone.
Tal
Tal
Re: Standalone bug
Tal,
Have you tried my solution? Could you please answer the questions I asked you?
Best,
Mark
Have you tried my solution? Could you please answer the questions I asked you?
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
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Standalone bug
Tal,
this is not a bug in the standalone. I was trying to be fancy and have set a pattern in the templategraphic. This pattern is not included in the standalone so the graphic is drawn but invisible.
If you edit the card script of "selectGroupsIIII.rev" by commenting out one line it works in the standalone, just without pattern, just black. It is in the on mouseDown handler this is how the relevant codes looks, only the line
Try this and tell us if it works for you.
by the way: can anyone tell me how to include the patterns in a standalone?
regards
Bernd
this is not a bug in the standalone. I was trying to be fancy and have set a pattern in the templategraphic. This pattern is not included in the standalone so the graphic is drawn but invisible.
If you edit the card script of "selectGroupsIIII.rev" by commenting out one line it works in the standalone, just without pattern, just black. It is in the on mouseDown handler
Code: Select all
reset templategraphic
set the style of the templategraphic to "rectangle" -- or "oval" or "roundrect"
set the lineSize of the templategraphic to 3 -- adjust
-- set the foregroundpattern of the templategraphic to 52 -- 208034 -- block to have straight line w/o pattern
set the opaque of the templategraphic to false
is commented out, the rest is the same as before.-- set the foregroundpattern of the templategraphic to 52 -- 208034 -- block to have straight line w/o pattern
Try this and tell us if it works for you.
by the way: can anyone tell me how to include the patterns in a standalone?
regards
Bernd
Re: Standalone bug
mark, your solution works, I did what you said but i must have done a mistake, so I still had the problem but now I did it again and it works.
Bn, thank you for the precision for the pattern.
Thank you all;
Tal
Bn, thank you for the precision for the pattern.
Thank you all;
Tal
Re: Standalone bug
Thanks for your reply, Tal. Great that we could solve this together.
Mark
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
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Standalone bug
Hi,
Just another thing, like bn said, do you know how to use pattern in a standalone?
Tal
Just another thing, like bn said, do you know how to use pattern in a standalone?
Tal
Re: Standalone bug
Hi Tal,
Just lookup "pattern" in the dictionary and give that a try.
Best,
Mark
Just lookup "pattern" in the dictionary and give that a try.
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
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode