How to set up a library?
bobsneidar at iotecdigital.com
Thu Dec 31 12:12:03 EST 2020
Trouble with putting a library in the Livecode libraries folder is every time you upgrade Livecode, those may get deleted. This is especially true for OS X, where those libraries are in the app bundle. I would not put a library in that location.
Also, you do not have to specify the path. Add the library to the Stack Files of the stack, and then start using it by the stack short name. If you are using a script only stack, you should also add the SOS to the stack files, mainly because when you create a standalone these will get included in the standalone. Otherwise I suppose you *could* start using a stack by full path name or else it has to be in the current default folder.
Setting the behavior of something is a one time thing. Start Using is something that has to be done every time a stack is opened, unless another stack in the IDE has done so. Doing it more than once has no effect, other than pushing the script to the back of the stacks in use.
The difference between the two is that a behavior is in the message path of the object itself, and so it’s handlers are not accessible to any other object unless you send or dispatch to that object.
Start Using makes the script globally accessible to ALL stacks running in the IDE (or in the Standalone).
On Dec 31, 2020, at 3:55 AM, Ben Rubinstein via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:
Thanks Alex and Bob for your responses.
And if I make it a script-only stack, is there a clever place to store it - e.g. the standard distribution libraries are in
Is there a convention or location which would allow me to reference the library without having to specify the full path, for example?
More information about the use-livecode