Saving as LiveCodeScript
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 9746
- Joined: Fri Feb 19, 2010 10:17 am
Saving as LiveCodeScript
While I understand it is comparatively straightforward to write a script-only stack in a text editor . . .
. . . I wonder if there is a way to convert a stack into a script-only stack.
It is entirely possible, also, to edit a script-only stack using a text editor (I know, I have done that):
but one of the difficulties about that is if one wants the script-only stack to generate a full stack that is visible to end-users with graphic elements.
Re: Saving as LiveCodeScript
In LC 9.6.11 (and probably in versions below) we have a menuitem for that.
Get it? SCRIPT ONLY!
However a "script-only" stack is exactly what the name says, so this:
is not possible with a "script-only" stack.but one of the difficulties about that is if one wants the script-only stack to generate a full stack that is visible to end-users with graphic elements.
Get it? SCRIPT ONLY!
-
- Livecode Opensource Backer
- Posts: 9746
- Joined: Fri Feb 19, 2010 10:17 am
Re: Saving as LiveCodeScript
The menuBar.livecodescript script-only stack generates the LC menuBar.is not possible with a "script-only" stack.
Re: Saving as LiveCodeScript
Yes, sorry, looks like I misunderstood your question.
Well, a script-only stack can of course create another stack with lots of controls, if that is what you mean.
Well, a script-only stack can of course create another stack with lots of controls, if that is what you mean.
-
- Livecode Opensource Backer
- Posts: 9746
- Joined: Fri Feb 19, 2010 10:17 am
Re: Saving as LiveCodeScript
That is part of what I meant.
But, just as a script-only stack can create another stack with lots of controls, I want to know if one can reverse the process where a "stack with lots of controls" can be saved as a script-only stack in such a fashion that on that script-only stack being opened inwith the IDE it can re-create that "stack with lots of controls".
But, just as a script-only stack can create another stack with lots of controls, I want to know if one can reverse the process where a "stack with lots of controls" can be saved as a script-only stack in such a fashion that on that script-only stack being opened inwith the IDE it can re-create that "stack with lots of controls".
Re: Saving as LiveCodeScript
I don't think this is possible this way.
The only way seem to save the actual stack script as a script-only stack
The only way seem to save the actual stack script as a script-only stack
Re: Saving as LiveCodeScript
Richmond.
How could a stack that contains even a single control ever be reduced to a script-only stack? What would we do with that control?
Craig
How could a stack that contains even a single control ever be reduced to a script-only stack? What would we do with that control?
Craig
Re: Saving as LiveCodeScript
I am not sure that even a control-less stack can be "reduced" to being script-only. Such a stack has properties, for example its rect, that a script only stack does not, and aren't there conservation laws such as:
Craig"rects can neither be created not destroyed"?
-
- VIP Livecode Opensource Backer
- Posts: 9960
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Saving as LiveCodeScript
What benefit are you looking for with that? We can come up with a solution once we know the goal.richmond62 wrote: ↑Sun Apr 21, 2024 1:07 pmThat is part of what I meant.
But, just as a script-only stack can create another stack with lots of controls, I want to know if one can reverse the process where a "stack with lots of controls" can be saved as a script-only stack in such a fashion that on that script-only stack being opened inwith the IDE it can re-create that "stack with lots of controls".
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 9746
- Joined: Fri Feb 19, 2010 10:17 am
Re: Saving as LiveCodeScript
Many years ago I wrote a stack to modify the revMenBar stack on the fly to make it horizontal, vertical, black, blue and sky-blue-pink.
The revMenuBar is generated from a script-only stack: I should like to have a way where end-users of the LC IDE can modify the appearance of the revMenuBar so that those modifications will stick between LC sessions.
The revMenuBar is generated from a script-only stack: I should like to have a way where end-users of the LC IDE can modify the appearance of the revMenuBar so that those modifications will stick between LC sessions.
Last edited by richmond62 on Sun Apr 21, 2024 7:33 pm, edited 1 time in total.
Re: Saving as LiveCodeScript
I'm not sure why you want a script-only stack instead of a regular one. Script-only stacks are just text files. However you could probably script the creation of controls when the stack loads but that seems like way more work than just using a normal stack.richmond62 wrote: ↑Sun Apr 21, 2024 1:07 pmBut, just as a script-only stack can create another stack with lots of controls, I want to know if one can reverse the process where a "stack with lots of controls" can be saved as a script-only stack in such a fashion that on that script-only stack being opened inwith the IDE it can re-create that "stack with lots of controls".
Why are you thinking a script-only stack is preferable?
Edit: I see you answered while I was writing a response.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9960
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Saving as LiveCodeScript
Modify the revMenubar file directly. But upgrades will overwrite your changes. Modifying IDE stuff is an ongoing treadmill.richmond62 wrote: ↑Sun Apr 21, 2024 6:25 pmMany years ago I wrote a stack to modify the revMenBar stack on the fly to make it horizontal, vertical, black, blue and sky-blue-pink.
The revMenuBar is generated from a script-only stack: I should like to have a way where end-users of the LC IDE can modify the appearance of the revMenuBar so that those modifications will stick between LC sessions.
Simpler to do as suggested in these forums years ago: write a plug-in that makes the mods to the revMenubar stack after it's been instantiated.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 9746
- Joined: Fri Feb 19, 2010 10:17 am
Re: Saving as LiveCodeScript
That is exactly what I am trying to avoid,that makes the mods to the revMenubar stack after it's been instantiated
-
- VIP Livecode Opensource Backer
- Posts: 9960
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Saving as LiveCodeScript
Why?richmond62 wrote: ↑Sun Apr 21, 2024 9:00 pmThat is exactly what I am trying to avoid,that makes the mods to the revMenubar stack after it's been instantiated
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 9746
- Joined: Fri Feb 19, 2010 10:17 am