Re: Script Only Stack Properties

2020-04-04 Thread David Bovill via use-livecode
The approach I take is to use getorop and set prop handlers for this. The data is then seperated from the code and Ibuse one standardised technique for accessing a model: out the model_Data of stack stackName into someData On 4 Apr 2020, 19:39 +0100, How to use LiveCode , wrote: > > ? > > What

Re: Script Only Stack Properties

2020-04-04 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote: > True, but with properties, I can envision a use case for persistent > values between sessions. Persistence is essential in many contexts. But is it necessary that data be bound to code? Sometimes it is. When it is, is it necessary that the file format be text? > This

Re: Script Only Stack Properties

2020-04-04 Thread Bob Sneidar via use-livecode
True, but with properties, I can envision a use case for persistent values between sessions. This is quite separate from GUI objects. By saving and reloading properties of a script only stack, everything is still text file only based. Bob S On Apr 4, 2020, at 11:17 AM, Richard Gaskin via use-

Re: Script Only Stack Properties

2020-04-04 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote: > Hmmm… If that is the case then theoretically, on closeStack the new > properties could be arrayEncoded and saved to disk, and then on > openStack they could be read and then arrayDecoded and reset again. Stacks can also contain controls, each of which can be expressed as an

Re: Script Only Stack Properties

2020-04-04 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote: > I just discovered an interesting aspect of script only stacks. They > CAN have Custom Properties… but ONLY while in memory! Once closed, the > properties disappear. Seems like a slight mod would be able to save > these properties as a separate file so that they can remain > p

Re: Script Only Stack Properties

2020-04-04 Thread Bob Sneidar via use-livecode
Hmmm… If that is the case then theoretically, on closeStack the new properties could be arrayEncoded and saved to disk, and then on openStack they could be read and then arrayDecoded and reset again. Bob S On Apr 4, 2020, at 10:20 AM, J. Landman Gay via use-livecode mailto:use-livecode@lists.

Re: Script Only Stack Properties

2020-04-04 Thread J. Landman Gay via use-livecode
When a script only stack is opened, LC creates a temporary stack and plops the script into it. At that point its just like any other library stack. You could add images, controls, other scripts, custom props, anything. The only difference is that when the stack closes, the text of the stack scri