Re: Plain text library stacks - BOM needed

2015-05-01 Thread Mark Waddingham
I’ve found that when LiveCode saves the stack script file, it adds a Byte Order Mark (BOM) to denote the file is UTF-8 encoded. If the BOM is not present when you start using such a library stack, the engine will treat it as being natively encoding. I have found that to be true with both the IDE a

Re: Plain text library stacks

2015-04-28 Thread Robert Mann
Hi bouncing on my present subject which is how to implement a a simple "semaphore" system to be used by server stacks : could that simple forma t(and I suppose fast to load) be used to store some data along scripts, e.i for a semaphore? -- when loaded in memory, is it parsed and checked? are there

Re: Plain text library stacks

2015-04-24 Thread Peter M. Brigham
Ah, I see. Thanks. And may I say, your presence on this list, even if only occasional, is much appreciated. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Apr 24, 2015, at 2:11 PM, Mark Waddingham wrote: > 1. No - substacks are part of the parent stackfile when

Re: Plain text library stacks

2015-04-24 Thread Mark Waddingham
1. No - substacks are part of the parent stackfile when on disk so they only make sense as normally saved (binary) stacks. 2. Yes - script only stacks are stacks. The script only part only pertains to the on disk format which is a text file. Sent from my iPhone > On 24 Apr 2015, at 19:06, Pete

Re: Plain text library stacks

2015-04-24 Thread Peter M. Brigham
Questions about these script-only stacks: 1. can they be made substacks of another stack? 2. can you do "start using stack…" with them? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Apr 24, 2015, at 12:41 PM, Michael Doub wrote: > I just updated the MasterLibrary

Re: Plain text library stacks

2015-04-24 Thread Michael Doub
I just updated the MasterLibrary to allow you to create a Script Only Stack and insert functions and commands with just a few clicks. https://www.dropbox.com/s/3wpwn3hfbmpl7sk/MasterLibrary.livecode?dl=0 -= Mike On 4/23/15 2:58 PM, Thierry Douez wrote: Absolutely, that's what Peter was sho

Re: Plain text library stacks

2015-04-24 Thread Mark Waddingham
On 2015-04-23 20:41, Michael Doub wrote: Mark, It appears that when you programmatically create a script only stack and save it. The engine auto inserts the first line: script "stackname".I see that when I look at the file with a text editor. When I edit the script of the stack in liveco

Re: Plain text library stacks

2015-04-23 Thread Thierry Douez
Absolutely, that's what Peter was showing in his sample code. Regards, Thierry Thierry Douez - http://sunny-tdz.com Maker of sunnYperl - sunnYmidi - sunnYmage 2015-04-23 20:56 GMT+02:00 Devin Asay : > I’m curious—can these plain text stacks be

Re: Plain text library stacks

2015-04-23 Thread Devin Asay
I’m curious—can these plain text stacks be used by LC Server just like a regular stack as a library? Devin Devin Asay Office of Digital Humanities Brigham Young University ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this

Re: Plain text library stacks

2015-04-23 Thread Michael Doub
Mark, It appears that when you programmatically create a script only stack and save it. The engine auto inserts the first line: script "stackname".I see that when I look at the file with a text editor. When I edit the script of the stack in livecode the script "stackname" line is missi

Re: Plain text library stacks

2015-04-23 Thread Mark Waddingham
That is something to be aware of. The purpose of a script only stack is to be text on disk... Password protection requires binary output, so in that case you might as well just use a normal stack. Mark Sent from my iPhone > On 23 Apr 2015, at 17:49, Peter Haworth wrote: > > Not sure if this

Re: Plain text library stacks

2015-04-23 Thread Peter Haworth
Not sure if this is a problem or not but it appears that any password I set on the stack isn't retained. If I remove the stack from memory and re-open it, the password isn't retained. I guess just something to be aware of rather than a problem. Pete lcSQL Software Home of

Re: Plain text library stacks

2015-04-23 Thread Thierry Douez
2015-04-23 18:26 GMT+02:00 Mark Waddingham : >> So, script "stackname" must be at the 1st line of the textfile. > > Ah yes - that is indeed the case > Thanks Mark for your explanations. In fact, I started by putting some comments in the first lines then dropped them but leaving one blank line mor

Re: Plain text library stacks

2015-04-23 Thread Mark Waddingham
So, script "stackname" must be at the 1st line of the textfile. Ah yes - that is indeed the case - it is quite picky, for two reasons. The first was that the main use-case I had in mind when implementing it was to replace IDE stacks which were only scripts and thus they would be edited in the

Re: Plain text library stacks

2015-04-23 Thread Thierry Douez
Hmm, had a blank 1st line and script "stackname" as the second one. So, script "stackname" must be at the 1st line of the textfile. And now it works beautifully :) Regards, Thierry 2015-04-23 16:50 GMT+02:00 Mark Waddingham : >> Doesnt' work here with LC 6.7.4 or LC 7.0.4. > > What exactly is

Re: Plain text library stacks

2015-04-23 Thread Mark Waddingham
Doesnt' work here with LC 6.7.4 or LC 7.0.4. What exactly isn't working? The feature has actually been in the engine (albeit in nascent form) since around 6.6.4 / 6.6.5 IIRC. I originally hacked it together because of the issues we'd had keeping the core standalone builder stacks for iOS an

Re: Plain text library stacks

2015-04-23 Thread Thierry Douez
Hi Peter, Which version of LC are you using ? Doesnt' work here with LC 6.7.4 or LC 7.0.4. Thanks, Thierry Thierry Douez - http://sunny-tdz.com Maker of sunnYperl - sunnYmidi - sunnYmage 2015-04-23 15:34 GMT+02:00 Peter W A Wood : > Here is a

Re: Plain text library stacks

2015-04-23 Thread Peter W A Wood
Here is a very simple server script and a very simple “text” library script that show just what I was hoping. The Library Script: script "TextLib" function TL.compare pFirst, pSecond return pFirst = pSecond end TL.compare The Server Script: #!

Re: Plain text library stacks

2015-04-23 Thread David Bovill
Great. I can now refactor all those libraries. On Thu, 23 Apr 2015 at 11:44, Peter W A Wood wrote: > Many thanks, Mark. > > > On 23 Apr 2015, at 15:59, Mark Waddingham wrote: > > > > On 2015-04-23 07:37, Peter W A Wood wrote: > >> Is it possible to load a Library stack in plan text format from a

Re: Plain text library stacks

2015-04-23 Thread Peter W A Wood
Many thanks, Mark. > On 23 Apr 2015, at 15:59, Mark Waddingham wrote: > > 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

Re: Plain text library stacks

2015-04-22 Thread Peter W A Wood
Hi Thierry Thanks for the suggestion. Actually, I wasn’t thinking of Monte’s lcVCS. As I remember, the post that I saw suggested you could create a library stack in a text editor and then load it into LiveCode. Kind regards Peter > On 23 Apr 2015, at 13:45, Thierry Douez wrote: > > Hi

Re: Plain text library stacks

2015-04-22 Thread Thierry Douez
Hi Peter, Are you thinking of this: http://forums.livecode.com/viewtopic.php?f=77&t=18748&p=106514&hilit=monte+save+stack#p106514 HTH, Thierry > I remember reading a message to the effect that one of the recent releases to > the LiveCode engine included an enhancement to load “plain text”