Page 11 of 11

Re: Equivalent of classes in LiveCode

Posted: Thu Feb 04, 2021 6:29 pm
by FourthWorld
A script-only stack is identical to a traditional binary stack in every respect but one: on disk it exists as only a script in a text file.

Like any stack, it can be used as a library, or not. It is only necessary to use "start using" when using it as a library, as has always been true for all stacks.

Please note that nearly everything in the LC IDE is a script-only stack. Some are libraries, others UI.

Re: Equivalent of classes in LiveCode

Posted: Thu Feb 04, 2021 6:38 pm
by mwieder
Debugging system stacks is a bit tricky. Normally breakpoints are disallowed in system stacks. You can enable this through a global property. I regularly work on system stacks in situ without getting myself into too much trouble (usually. fingers crossed. famous last words)

Code: Select all

global gRevDevelopment; put true into gRevDevelopment
but should disable this (put false into) afterwards because it can cause problems if left unchecked.

And no, restarting the IDE isn't normally necessary. You can reissue the initialization command while working on the code:

Code: Select all

dispatch "preOpenStack" to stack <nameOfStack>

Re: Equivalent of classes in LiveCode

Posted: Thu Feb 04, 2021 7:03 pm
by aetaylorBUSBnWt
OK, I learned some more stuff.

First thing I will probably do is the OOPEngine into the user plugin folder so I don't have to worry about it until application deployment.

But...

At least for what I am doing where many of my scriptonly stacks are specific to this particular application, have no UI and are not directly tied to one, the "start using stack" with a libraryStack handler concept still appears to be appropriate.

But now I know of a means to tie future scriptonly stacks to a UI element,
and how to debug Livecode itself (I hope to avoid that!).

thanks,
Andrew