[Solved] - library stack works in dev but not in standalone
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
[Solved] - library stack works in dev but not in standalone
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
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
Last edited by Cairoo on Thu Jan 16, 2014 7:27 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 10058
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: library stack works in dev but not in standalone
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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: library stack works in dev but not in standalone
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.
-
- VIP Livecode Opensource Backer
- Posts: 10058
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: library stack works in dev but not in standalone
Can you please post some of the relevant code so we can so what's happening? Thanks.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: library stack works in dev but not in standalone
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.
-
- VIP Livecode Opensource Backer
- Posts: 10058
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: library stack works in dev but not in standalone
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. 

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: library stack works in dev but not in standalone
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
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
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
Code: Select all
_internal call "generate_uuid"
Code: Select all
get uuid()
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
Any command that is undocumented and that starts with "_internal" is not to be trusted. Avoid! 

Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com