Files vs. Stacks

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

DavidF.
Posts: 26
Joined: Sat Sep 10, 2016 3:00 pm

Re: Files vs. Stacks

Post by DavidF. » Sat Dec 23, 2017 11:37 pm

The scripting conference stacks are great, I've been working my way through them. The one on controls has been especially useful. BYU - didn't find them a good place to start, will go back to them now I've got more understanding.

That MC stack though - that's MetaCard right? Can I go through it treating it as though it was LiveCode? Any big/little differences to watch for?

On the subject of working stacks - I've also found the ones at "Gray Secret", https://tlittle72.neocities.org/info.html, really useful.

-- DavidF.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Files vs. Stacks

Post by jacque » Sat Dec 23, 2017 11:42 pm

And I note that by leaving destroyStack as false, you open up another set of options: what to do with the file when you close the last stack:
For a single-stack file, closing it even if destroystack is false is the same as closing it when destroystack is true -- i.e., it gets removd from RAM.

In a stack with substacks, closing a substack will never actually remove it from RAM because it's part of the file on disk, and LC handles the entire file as one unit when removing it from RAM. Closing the mainstack will remove everything, substacks included, if you choose to close the file.

And yes, it's complicated at first. Basically:

Mainstacks and their substacks are a single file on disk, and are loaded into memory and removed from memory as a unit.
Closing and removing the mainstack from memory will remove its substacks as well.
Closing a mainstack with destroystack = false will close the mainstack but leave it in memory. Any open substacks will remain open.
Closing a substack, regardless of destroystack settings, will close the stack but always leave it in RAM as long as the mainstack is in RAM.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Files vs. Stacks

Post by jacque » Sat Dec 23, 2017 11:45 pm

There are a lot of differences, but the basics are the same. In general, MC is a subset of LC but its IDE is completely different and far more limited. Very few properties are exposed in the UI and you'll use the message box a lot to do things.

I'm not sure I recommend it, it has a minimal command set and the files are not compatible with LC any more unless you do some tinkering to replace the MC engine with the LC one.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Files vs. Stacks

Post by bogs » Sun Dec 24, 2017 12:06 am

DavidF. wrote:
Sat Dec 23, 2017 11:37 pm
That MC stack though - that's MetaCard right? Can I go through it treating it as though it was LiveCode? Any big/little differences to watch for?

On the subject of working stacks - I've also found the ones at "Gray Secret", https://tlittle72.neocities.org/info.html, really useful.
Yes, the Mc stack is from MetaCard. I actually use that IDE more than the later ones (personal preference). I also when in Lc tend to stick more to the 6.x series than later ones (again, preference, not something inherently wrong with later IDEs).

For the series of IDEs I use, I have found very little difference, and in fact power the Mc IDE with an Lc exe. Some items have been deprecated (I think its something like 11 years since Mc went bye bye), but in large part the concepts, techniques, reference material has held up.

Since I don't spend a lot of time in the newer IDE, it would be hard for me to tell you exactly what might fail from an example, lets say, but you would know right away if something does fail since the debugger would kick it, and by the time you hit something that does, you should have enough experience to find it is pretty easy to change it to make it work, but since most examples are entry level more complicated things might be tougher to track down.

That is really where these forums shine, you hit a road block, and there are many here able to get you past it or offer ways to do it better.

The other reason I like it is because once made into a standalone, you can keep it to the side and out of your way, but leave it open and use the reference while working, as almost all of the windows are resizeable.

Nice site, added that one to the bookmarks as well :D
Image

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Files vs. Stacks

Post by bogs » Sun Dec 24, 2017 12:11 am

jacque wrote:
Sat Dec 23, 2017 11:45 pm
There are a lot of differences, but the basics are the same. In general, MC is a subset of LC but its IDE is completely different and far more limited. Very few properties are exposed in the UI and you'll use the message box a lot to do things.

I'm not sure I recommend it, it has a minimal command set and the files are not compatible with LC any more unless you do some tinkering to replace the MC engine with the LC one.
Oh Jacque, the stacks I linked to are not the Mc IDE stacks, just the help stacks that I separated out from the Mc IDE. No tinkering is required to either run them under the Lc IDE or to set them up as a standalone reference. They have no ability to build anything in and of themselves, they just reference information.

By all means, I expect our friend here to use the Lc IDE as an IDE :)
These are what I linked to -
Image
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9358
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Files vs. Stacks

Post by richmond62 » Sun Dec 24, 2017 12:33 pm

The nice thing about MetaCard and early recensions of LiveCode/Revolution
was that components were not so intertwined as they seem to be in more
recent versions of LiveCode, so it is/was easy to lift components and import
them into other versions.

Oddly enough when I stop and muse on this I find that earlier versions
make me think of Linux distros, while later versions make me think of
more monolithic operating systems.
MetaFlop.png
mcHammer.jpg

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Files vs. Stacks

Post by bogs » Sun Dec 24, 2017 1:33 pm

There are (imho) advantages to both IDE layouts, for my style of plugging away at things, Mc's works better most of the time (not always :wink: ). Since I had finally made the breakthrough in getting it going, I've been steadily plugging away at understanding a lot of it, but I'd never recommend someone start off here at this point unless they were as twisted as I am :twisted:
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9358
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Files vs. Stacks

Post by richmond62 » Sun Dec 24, 2017 1:40 pm

That picture I uploaded was made by extensive messing around
with LiveCode 7.1.4 and getting "fecked" off with seemingly
endless scrolling error messages.

The MetaCard setup stacks made by Jacque no longer work.

So, if the MC interface has sufficient advantages to support its
retention as an option it needs to be seriously rejigged so that
it can be "bolted on" to LiveCode without all sorts of bijoux
backflips to get it going.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Files vs. Stacks

Post by bogs » Sun Dec 24, 2017 2:39 pm

Erm, actually her stacks work *exactly* as they are supposed to, the problem isn't in her stacks, the problem is in the code of the IDE. I've sent you an email, as this thread really shouldn't be about Mc heh.

*Edit - Well, I don't know if the above is technically correct on Mac current, it is correct for Win/Lin.
*Edit 2 - Rejiggering is currently in progress.
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9358
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Files vs. Stacks

Post by richmond62 » Sun Dec 24, 2017 3:20 pm

*exactly*
Possibly.

Didn't stop Runtime Revolution 4.5 Enterprise "throwing a bluey" when I tried to build MetaCard.
Revolution.png
Revolution.png (5 KiB) Viewed 7139 times

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Files vs. Stacks

Post by bogs » Sun Dec 24, 2017 4:58 pm

Heh, thanks for giving me an impossible (for me) to test situation :D Two razz-berries for you! :P :P
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9358
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Files vs. Stacks

Post by richmond62 » Mon Dec 25, 2017 10:08 am

bogs: are you running Windows? Please let me know.

OK, scrub that: from your screen shots it looks like some type of Linux.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Files vs. Stacks

Post by bogs » Mon Dec 25, 2017 5:12 pm

Linux on everything except my wife's system, and I wish I could get her to put anything but what she has on hers :mrgreen: I have an old macPlus in the closet, a much better version in SheepShaver, and I think one system somewhere around here running OSX 10.6....3? that I haven't turned on in a few years. I got a few units running various versions of Unix as well. Care to guess what drew me to Lc to begin with :twisted:
Image

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”