[Server] create stack trouble
stephenREVOLUTION2 at barncard.com
Mon Aug 8 02:05:14 EDT 2011
Odd results, in your case. I have had no problem creating and saving a stack
with LIvecode Server 4.6.3, as well as saving and load multidimensional
custom properties. Creating cards is no problems as well.
here's my create stack code, be it simple as it is, that worked for me on
LIvecode Server 4.6.3:
* get stacknamedesired*
* if it is not empty*
* put it & ".rev" into tFilename*
* put it into tStackName*
* create stack tStackName*
* save stack tStackName as tFilename*
* end if*
this is assuming that the stack and the script file are at the same level.
Not sure if the .rev suffix is necessary, but I did it anyway.
*One does have to look out for extra furniture* that isn't supported for any
useful purpose, like buttons and fields. I'm not sure a field would be any
better or worse than a CP anyway. But these not-applicable objects in
servers stacks don't always have traps to generate error messages or fail
silently and instead prevent the stack from responding at all. I'm sure this
vagueness will be sorted out in due time.
Custom properties in stacks could be an excellent way to store lookup
tables, boilerplate text and code libraries neatly in custom properties as
an alternative to many text files. But stacks really should not be used to
store transitive information, due to the multi-user nature of web serving.
Again, if this is a database situation, a real database is the solution.
It's more hassle but the speed and multi-tasking is worth it. Think about
the nightmare of creating and debugging the file record locking you'd have
to manage with stacks, or any file.
For instance, years ago I wanted to use the desktop-based rev code in Mark
Smith's id3lib on a site on my On - Rev account, which allowed a way to
extract Song and Title information from an mp3 encoded file. I tried and
failed because there were many lookup tables stored in custom properties,
which of course were not possible at the time. I spent a lot of time
creating 'fake' properties using *getProp* to replace the custom properties.
It turned out to be a mess to substitute all the custom prop calls to be
The other day, with 4.6.3 on my Dreamhost account, the same stack works with
no modification with a simple 'start using'.
That's cool. The stack was written back in 2007.
On 7 August 2011 15:38, Robert Mann <rman at free.fr> wrote:
> Why create and save stacks? To use stacks in publishing process :: "one to
> many", where one author or a reduced number of persons update some
> hierchical and finally structured datas. That's what I hope I can now do
> with these stacks long awaited!
> Relationnal database is of course much needed in a many to many kind of
> process, but not in that precise "publishing" situation. Or do I miss
> So yes it would be deceiving to learn stacks cannot be saved in the server
> View this message in context:
> Sent from the Revolution - User mailing list archive at Nabble.com.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
San Francisco Ca. USA
more about sqb <http://www.google.com/profiles/sbarncar>
More information about the Use-livecode