Strange with standalone [SOLVED]

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jon
Posts: 52
Joined: Sat Apr 14, 2007 11:44 am

Strange with standalone [SOLVED]

Post by jon » Thu Aug 16, 2012 8:15 am

Hi,
I am testing a standalone, it all seems to build ok and when I run the exe everything seems fine (livecode 4 5 3 ) windows 7 64 bit on laptop

I then click my reset button ( this is required to get my game working ) and after the screen refreshes I get strange happenings,

I have a screenshot attached (jpg) can anyone advise please.

Thank you, Jon.
Attachments
fault.jpg
fault.jpg (12.61 KiB) Viewed 6142 times
Last edited by jon on Thu Aug 16, 2012 4:08 pm, edited 1 time in total.
I dare not shake the dew drop from a rose lest I disturb the stars.

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

Re: Strange with standalone

Post by Klaus » Thu Aug 16, 2012 10:46 am

Hi John,

we need to take a look at your "reset" button code.


Best

Klaus

jon
Posts: 52
Joined: Sat Apr 14, 2007 11:44 am

Re: Strange with standalone

Post by jon » Thu Aug 16, 2012 12:46 pm

Hi Klaus

Thanks for the reply, here is first the button code then the "hidegrp" code that is called from the button.

on mouseUp
if fld "Player1fld" is empty
then
answer "Put your name in please" with "ok"
else
play ac "payback.wav"
repeat with i = 1 to the number of buttons on this card
set the disabled of btn i to false
end repeat
set the disabled of btn "Next Move" to false
hidegrp
end if
pass mouseUp
end mouseUp


command hidegrp
//Do the hiding and vis effects on resetting game
set the visible of image "dice1.jpg" to false
set the Loc of image "dice1.jpg" to 402, - 20
set the visible of image "dice2.jpg" to false
set the Loc of image "dice2.jpg" to 402, - 20
set the visible of image "dice3.jpg" to false
set the Loc of image "dice3.jpg" to 402,- 20
set the visible of image "dice4.jpg" to false
set the Loc of image "dice4.jpg" to 402, - 20
set the visible of image "dice5.jpg" to false
set the Loc of image "dice5.jpg" to 402, - 20
set the visible of image "dice6.jpg" to false
set the Loc of image "dice6.jpg" to 402, - 20
set the visible of image "dice11.jpg" to false
set the Loc of image "dice11.jpg" to 402, - 20
set the visible of image "dice21.jpg" to false
set the Loc of image "dice21.jpg" to 402, - 20
set the visible of image "dice31.jpg" to false
set the Loc of image "dice31.jpg" to 402, - 20
set the visible of image "dice41.jpg" to false
set the Loc of image "dice41.jpg" to 402, - 20
set the visible of image "dice51.jpg" to false
set the Loc of image "dice51.jpg" to 402,- 20
set the visible of image "dice61.jpg" to false
set the Loc of image "dice61.jpg" to 402, - 20
hide grp "main" with visual effect push down
hide fld "Title"
show grp "main" with visual effect push right
set the moveSpeed to 600
move fld "Title" to 400, 330
show fld "Title"
move fld "Title" to 384, 68
show fld "Title" with visual effect stretch from center
play ac "mutualdestruction.wav"
wait 80 ticks //with messages
end hidegrp

Regards Jon.
I dare not shake the dew drop from a rose lest I disturb the stars.

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

Re: Strange with standalone

Post by Klaus » Thu Aug 16, 2012 12:55 pm

Hi Jon,

hmmm, not sure...

Problem is obviously this:
The standalone builder will copy all the neccessary LiveCode libraries (buttons, as you can see in the screenshot)
into a gropup on the first card of the standalone, and somehow you managed to SHOW this group 8)

Unfortunately I don't know what the NAME of that groups is...
Anyway, this should NOT happen at all, maybe this is a bug?


Best

Klaus

jon
Posts: 52
Joined: Sat Apr 14, 2007 11:44 am

Re: Strange with standalone

Post by jon » Thu Aug 16, 2012 12:57 pm

Thanks Klaus,

At least I have a new way of thinking about it, I will now go and tear the rest of my hair out to try to figure it out. :)

Many thanks again. Jon.
I dare not shake the dew drop from a rose lest I disturb the stars.

jon
Posts: 52
Joined: Sat Apr 14, 2007 11:44 am

Re: Strange with standalone

Post by jon » Thu Aug 16, 2012 1:23 pm

Interestingly, the hoverIcon for the buttons shows up normally in the IDE version, but in the exe version no hover icons show.

The hover icons are from the standard icons built in to IDE.

If any one has any more ideas I will be grateful
Thanks, Jon
I dare not shake the dew drop from a rose lest I disturb the stars.

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

Re: Strange with standalone

Post by Klaus » Thu Aug 16, 2012 1:25 pm

Hi Jon,

did you check "Icons" in the standalone builder settings?
This does not happen automatically!


Best

Klaus

jon
Posts: 52
Joined: Sat Apr 14, 2007 11:44 am

Re: Strange with standalone

Post by jon » Thu Aug 16, 2012 1:50 pm

Hi Klaus,
The application icon and document icon are set to none by me, but I can't see any other icon settings, those two "none" settings should not affect the buttons
should they? Building only for windows by the way.
or do they?
Thanks, Jon.
I dare not shake the dew drop from a rose lest I disturb the stars.

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

Re: Strange with standalone

Post by Klaus » Thu Aug 16, 2012 3:34 pm

Hi Jon,
jon wrote:Hi Klaus,
The application icon and document icon are set to none by me, but I can't see any other icon settings, those two "none" settings should not affect the buttons
should they?
sorry, I mixed this with another app. 8)
No other ICON setting in LiveCode.

I never use the icon library, I always copy all images into my stack(s), so I am sure they are present in the standalone!
Obviously LiveCode did not copy your HOVER icon image to the standalone...


Best

Kklaus

jon
Posts: 52
Joined: Sat Apr 14, 2007 11:44 am

Re: Strange with standalone

Post by jon » Thu Aug 16, 2012 4:03 pm

Hi Klaus,
Thanks for that.

I solved the problem of the rev group showing, still dont know why it did it but here is the answer
( you didnt see the code I am about to show you, wish I had shown you it before, but I didnt realise the offending code was after pass mouseUp,
in the card script ) sorry I had a Homer Simson moment again.

here is what happened
this code >>>>> repeat with tControl = 1 to the number of controls of me // caused the rev things to show for some reason.
It was a simple fix by replacing >>>>> "me" with just the group that had my controls on >>>>>> grp "visButs" //hope this helps others
I dare not shake the dew drop from a rose lest I disturb the stars.

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

Re: Strange with standalone [SOLVED]

Post by Klaus » Thu Aug 16, 2012 4:20 pm

Hi Jon,

great you could solve this! :D


Best

Klaus

Post Reply