Page 1 of 1
[Solved] - library stack works in dev but not in standalone
Posted: Thu Jan 09, 2014 2:17 pm
by Cairoo
Hi gurus,
I have created a shared library stack which I use by inserting it into the message path with "start using stack tFullPathToStack". This works flawlessly in the development environment, but in the standalone, the library stack's functions are unavailable while its message handlers are only available when triggered with the dispatch command. I can't seem to reproduce the problem in a new app. The problem exists only in this one app. Does anyone have an idea what might be causing this?
Thanks in advance
Cairoo
Re: library stack works in dev but not in standalone
Posted: Thu Jan 09, 2014 4:27 pm
by FourthWorld
Is the path you're using to identify the stack valid from the standalone? If this is on a Mac, remember that the standalone is not the app's actual location, but instead the app is a few folders deeper inside the .app bundle.
Re: library stack works in dev but not in standalone
Posted: Thu Jan 09, 2014 4:34 pm
by Cairoo
I can confirm that the path is indeed valid from the standalone, because the library stack's message handlers are triggered when a message is sent to it with the dispatch command. I just can't understand how the messages can make their way to the library stack but not the function calls.
Re: library stack works in dev but not in standalone
Posted: Thu Jan 09, 2014 4:47 pm
by FourthWorld
Can you please post some of the relevant code so we can so what's happening? Thanks.
Re: library stack works in dev but not in standalone
Posted: Thu Jan 09, 2014 5:10 pm
by Cairoo
For the life of me I can't reproduce the problem in a new app. The app it's happening to is proprietary, so I'll try to create a dumbed-down copy of it and if the problem still exists in the dumbed-down copy, I'll post that.
Re: library stack works in dev but not in standalone
Posted: Thu Jan 09, 2014 5:13 pm
by FourthWorld
That's often a good diagnostic move anyway, making an example to isolate the problem. If it turns out to be a bug that can be submitted with the report to help the team, but most often making a good isolated example helps us just fix our own scripts.

Re: library stack works in dev but not in standalone
Posted: Thu Jan 09, 2014 5:51 pm
by Cairoo
Guys, I think it's caused by some code in the libray stack because when I move all the code from the library stack to the app's main stack, the same thing happens to the app's main stack. I'm one step closer...
Re: library stack works in dev but not in standalone
Posted: Thu Jan 16, 2014 7:27 pm
by Cairoo
Hello again
I have fixed it!
The problem was caused by a single line of code that generates a UUID. The undocumented internal "generate_uuid" method used to work in previous versions of LiveCode, but since version 6.1 it no longer works, because the newly introduced "uuid" function must be used instead. My library stack was still using the internal "generate_uuid" method.
So all I had to do was to change
to
and now all is well.
Thanks for bearing with me while I was recreating some stacks and restructuring some code.
Kind Regards,
Cairoo
Re: [Solved] - library stack works in dev but not in standal
Posted: Fri Jan 17, 2014 10:14 pm
by jacque
Any command that is undocumented and that starts with "_internal" is not to be trusted. Avoid!
