Equivalent of classes in LiveCode

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Equivalent of classes in LiveCode

Post by FourthWorld » Thu Feb 04, 2021 6:29 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Equivalent of classes in LiveCode

Post by mwieder » Thu Feb 04, 2021 6:38 pm

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>

aetaylorBUSBnWt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 118
Joined: Thu Sep 20, 2012 5:11 pm

Re: Equivalent of classes in LiveCode

Post by aetaylorBUSBnWt » Thu Feb 04, 2021 7:03 pm

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

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”