Why Script-only 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: Klaus, FourthWorld, heatherlaine, kevinmiller

mrcoollion
Posts: 614
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Why Script-only stacks?

Post by mrcoollion » Wed Apr 22, 2020 4:23 pm

Bedankt Klaus....

:D

mrcoollion
Posts: 614
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Why Script-only stacks?

Post by mrcoollion » Thu Apr 23, 2020 10:27 am

So here is a test stack I did that has a button that places a Script Only Stack (residing in a subfolder called 'SOS') as a substack of your main stack. And also a button to dislodge the script only stack from the main stack.
In the script only stack there is an answer handler that gives you a message based on which you can see if it worked with help of an error trap.

Any comments on what I did wrong or could do better or what is not necessary are very welcome.

I do have a question.
Is it possible to edit SOS's and after save test the code as with the LC IDE by stepping through the code? E.g. with Sublime text with LC plugin?. And if yes how?

Regards,

Paul
Script Only Stacks Test.zip
Test set script only stack as sub stack and back
(1.7 KiB) Downloaded 105 times

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

Re: Why Script-only stacks?

Post by bogs » Thu Apr 23, 2020 10:58 am

Fascinating stuff there Paul!

I only played with it a little (time just not there), but the results were funny. For instance, apparently when the sos comes in while in the IDE (and I suspect outside as well), it comes in as a regular stack with a card and you can add buttons to it, as an example!
aPic_sosAsStack.png
Stop poking my buttons!
Simply fascinating (but then, I am easily amused :P )
Image

Klaus
Posts: 12462
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Why Script-only stacks?

Post by Klaus » Thu Apr 23, 2020 11:12 am

bogs wrote:
Thu Apr 23, 2020 10:58 am
...For instance, apparently when the sos comes in while in the IDE (and I suspect outside as well), it comes in as a regular stack with a card and you can add buttons to it, as an example!
And what happens when you SAVE that stack, does it stay a SOS?

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

Re: Why Script-only stacks?

Post by bogs » Thu Apr 23, 2020 12:29 pm

I'm not entirely sure what your asking, Klaus.

If you integrate the sos as a substack as Paul did, then add a button to it as I did, if you save it out as the substack of the main stack, all comes back on re-opening as you saved it out. If you then dislocate it, the substack returns to its previous existence, sans button on re-opening.

(freed up another 5 seconds or so to find that out, but class is starting now).
Image

Klaus
Posts: 12462
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Why Script-only stacks?

Post by Klaus » Thu Apr 23, 2020 12:30 pm

bogs wrote:
Thu Apr 23, 2020 12:29 pm
If you integrate the sos as a substack as Paul did...
Ah, OK, that's the bit I obviously missed.

mrcoollion
Posts: 614
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Why Script-only stacks?

Post by mrcoollion » Fri Apr 24, 2020 10:56 am

bogs wrote:
Thu Apr 23, 2020 10:58 am
Fascinating stuff there Paul!

I only played with it a little (time just not there), but the results were funny. For instance, apparently when the sos comes in while in the IDE (and I suspect outside as well), it comes in as a regular stack with a card and you can add buttons to it, as an example!

aPic_sosAsStack.png

Simply fascinating (but then, I am easily amused :P )
It could be interesting for creating dynamic interfaces but have the script in a SOS. Very interesting :D
Or also creating a complete dynamic interface with a dynamic SOS behind it from within LC ? :shock:

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 869
Joined: Wed Nov 22, 2006 3:42 pm
Location: France
Contact:

Re: Why Script-only stacks?

Post by Thierry » Fri Apr 24, 2020 12:37 pm

mrcoollion wrote:
bogs wrote: Simply fascinating (but then, I am easily amused :P )
It could be interesting for creating dynamic interfaces but have the script in a SOS. Very interesting :D
Or also creating a complete dynamic interface with a dynamic SOS behind it from within LC ? :shock:
Hi,

FYOI, here is how I'm using SOS stack since a year or so to edit, run tests and
finally deploy sunnYrex library as a protected stack.
All SOS stacks being under git automatically (no extras tools needed for that).

screenshot sunnYrex-Tests.jpg


I'm working 95% only with BBEdit without opening the LC-IDE.

Ok, I just wanted to show you a use-case
to set up a whole workflow, if you are creative enough...
As a side note, these tools are still under development; thus not available yet.

Hope this gives some ideas to few of you...
and thanks to Edinburgh for adding script only stacks :)

Thierry
Thierry Douez
- Senior computer scientist
- Conseil, dévelopement et support en Français
https://sunny-tdz.com
https://sunny-tdz.com/livecode/externals

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

Re: Why Script-only stacks?

Post by bogs » Fri Apr 24, 2020 12:43 pm

Which I still think is pure awesome heh.
Image

mrcoollion
Posts: 614
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Why Script-only stacks?

Post by mrcoollion » Fri Apr 24, 2020 2:37 pm

Thierry wrote:
Fri Apr 24, 2020 12:37 pm
Ok, I just wanted to show you a use-case
to set up a whole workflow, if you are creative enough...
As a side note, these tools are still under development; thus not available yet.
I would love to understand how and what you are doing to make this possible. Seems I will just have to wait :(
thanks for sharing.

Paul

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 753
Joined: Fri Jun 27, 2008 9:00 pm

Re: Why Script-only stacks?

Post by Mikey » Fri Apr 24, 2020 3:13 pm

we've been messing around with the text file interface idea, too. i was messing around with one of the installers for levure being built from/with an SOS, but I don't know if i ever PR'd it.
another idea we were messing with here that we haven't gotten completely usable was using yml files to describe the interface elements and building them dynamically, or exporting all the properties to yml or json to make it easier to use version control to track them, but trevor is right - the interface doesn't change very often. once you spend the hours and hours and hours to get it the way you want it (we generally budget a day per screen, because let's face it, that's how long it takes once you're done messing with it), you don't usually mess with it very often. what you do mess with a lot is the code underneath.
when you go into revisions, even years (or in our case oftentimes decades) later, the interface usually is not touched. the code is. again, an example from our ERP project, for the last month or so, a developer has been wonking around in sales commissions. most of that code that i've seen is copyright 1980-83, so it's been 40 years since we touched it. the screens are still the same.
our shipping/inventory control software was written in the mid-90's. the consultant working on that one is going to be making a couple of very minor interface changes, on the order of 4 hours of time, total, modifying two forms, and adding a couple of others. the code changes that we have planned are going to be probably a month or so of full-time development.
hell, database structures get changed more frequently and dramatically than interfaces do.

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

Re: Why Script-only stacks?

Post by FourthWorld » Fri Apr 24, 2020 3:22 pm

mrcoollion wrote:
Fri Apr 24, 2020 10:56 am
bogs wrote:
Thu Apr 23, 2020 10:58 am
Fascinating stuff there Paul!

I only played with it a little (time just not there), but the results were funny. For instance, apparently when the sos comes in while in the IDE (and I suspect outside as well), it comes in as a regular stack with a card and you can add buttons to it, as an example!

aPic_sosAsStack.png

Simply fascinating (but then, I am easily amused :P )
It could be interesting for creating dynamic interfaces but have the script in a SOS. Very interesting :D
Or also creating a complete dynamic interface with a dynamic SOS behind it from within LC ? :shock:
Yep. Because of the dependency on GitHub, most of the IDE - libraries and GUI alike - are SoS.

There is only one difference between an SoS and a binary stack: the storage format.
viewtopic.php?f=7&t=33891&start=15#p190178
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 869
Joined: Wed Nov 22, 2006 3:42 pm
Location: France
Contact:

Re: Why Script-only stacks?

Post by Thierry » Fri Apr 24, 2020 6:19 pm

mrcoollion wrote:
Fri Apr 24, 2020 2:37 pm
I would love to understand how and what you are doing to make this possible.
thanks for sharing.
Hi Paul,
Well, it's a bit complicate for me to explain in simple words
as there are a lot of things involved behind the scene...

And to confuse you a bit more,
look for komodo tools for LiveCode at the end of this page:

https://sunny-tdz.com/livecode/externals

this tool was made around year 2000 and I guess it was still Metacard.
And we didn't have SoS at this time!

The architecture was actually quite the same,
basically communicating to LC via the -u option (background mode, no UI).

If you are interested on this subject,
I kindly suggest to spend some time reading the IDE scripts.
Nowadays it is much easier to read and follow them as they are well organized by family
and most of them are Sos.

Hope this gives you some insights to start a new adventure :)
and apologies for not being more precise.

Thierry
Thierry Douez
- Senior computer scientist
- Conseil, dévelopement et support en Français
https://sunny-tdz.com
https://sunny-tdz.com/livecode/externals

mrcoollion
Posts: 614
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Why Script-only stacks?

Post by mrcoollion » Fri Apr 24, 2020 7:36 pm

Thanks Thierry,

I have got some reading to do... :D

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 869
Joined: Wed Nov 22, 2006 3:42 pm
Location: France
Contact:

Re: Why Script-only stacks?

Post by Thierry » Sat Apr 25, 2020 8:21 am

mrcoollion wrote:
Fri Apr 24, 2020 7:36 pm
Thanks Thierry,
I have got some reading to do... :D
Sure :)
I went down this road...

Next step is to try to add a new feature in the IDE or correct a bug...

If you ever jump into it and when you're at ease with this environment,
I'll be happy to exchange with you in private.

Have a nice day,

Thierry
Thierry Douez
- Senior computer scientist
- Conseil, dévelopement et support en Français
https://sunny-tdz.com
https://sunny-tdz.com/livecode/externals

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”