Fwd: Plain text library stacks
Mark Waddingham
mark at livecode.com
Thu Apr 23 03:59:32 EDT 2015
On 2015-04-23 07:37, Peter W A Wood wrote:
> Is it possible to load a Library stack in plan text format from another
> stack?
Yes - although we've not explicitly published details on the feature yet
:)
However, if you want to play around with it then from the message box
try:
create script only stack "MyLibraryStack"
Then
edit script of stack "MyLibraryStack"
You can save the stack in the normal way but the only thing it will save
will be the stack script - the file on disk is just a UTF-8 text file.
We've been using this to great effect in the IDE where a good number of
libraries and non-UI stacks are now script-only - the motivation being
that they work in version control just like a lower-level language
source file.
In addition with 6.7.5-rc-1 and 7.0.5-rc-1 we've added the ability for
the behavior property to reference stacks - this has a nice synergy with
script only stacks. (Before anyone asks - there are no plans to extend
behaviors to any other object type at the moment, stack references were
addable without a file format change hence why its occurred).
I should point out that the script-only-stacks are 'caveat scriptor' in
the sense that the engine will only ever save the stack script when you
save one, it will not warn you if you've put anything else beyond a
stack script on the stack (whether it be custom properties or other
objects), nor will it stop you from making it have anything beyond a
stack script.
Warmest Regards,
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list