lots of stack to manage....

thierry Douez douez at wanadoo.fr
Fri Sep 10 07:36:02 EDT 2004


Hello Revolution's users,


>  In the first version, for every script  ( laboratory experiment )
>  i had a folder with few files and folders.
>  Now, i would like to make a stack for every experiment; such a stack
>  will contains the Datas of all the old files using custom properties; 
> but
>  nothing more ( no user interface ).
>  The size can be from 100kb up to 2 Mbyte of texts by stack.
>  Would like to manage around  100 of these stacks.
>  So, in the IDE, would like to be able to see the hundred stacks name
> in one field; so the user can choose one of them with one click.
>
>  My question is How to manage a list of all these stacks
>  without putting them into RAM, except when the user choose One.
>
>  Any tricks, ideas will be very much welcomed :-)


Well, thanks a lot especially to xavier, klaus ( Vielen Danke ), Robert...

1) Ok for an index stack

2) Ok using a list field with all my stacks' name in it

3) Ok using the files() to get the list of stacks
this one is interesting if the user has suppress some stacks
from the Window's desktop.

4) more precise question: in the list field i would like to put
few parameters ( multi-columns ), each of these parameter could belong
to these stacks or to be manage outside in the Main stack. Klaus says
about almost no overhead; can I understand that i could get few properties
( 3 or 4 ) of every stack, build the list with multiple columns and then
view  it  in  a  list field..
and the user would have to wait 3 or 4 seconds Max ????   ( acceptable )

or these parameters has to be managed globally in the main stack ? they can
be updated each time one of the stacks is modified or creaed.   I would prefer
the first solution for not having duplication o the same information.

this is the main point in fact :-)

the problem is I can't check in live the final solution before a while
( reengineering.. )    so, i'm looking for the right direction.

------ From xbury :

Just list the files in a field!
If you create one file, add them to the "index" stack and that's about it.

If they don't go all in one folder, you can add a hidden field with the
paths of the stacks...


------- From Klaus Major

OK, i am sure you know that a list field will be the solution for the 
display of all available files...?! ;-)

When the user clicks, you can retrieve any custom property of that stack
WITHOUT opening that stack!

Of course that stack will be read into memory, but with almost no 
overhead and no part of that stack will be visible!

Example:

A list-field with lots of filenames of your stacks...
...
C:/Folder1/folder1/a_stack.rev
C:...
...

Now put something like this into the script of that list-field:

on mouseup
    put the selectedtext of me into target_file
    put the whatsoever of stack target_file into yadda
    ## do something with yadda :-)
end mouseup

Au revoir Klaus Major



--------- From Robert :

Since they are stored as physical files, you could use the files() 
command to fetch the list. If some description or additional info 
from each file is needed, you can maintain a separate stack or text 
file with the list of file names, the extra info as well as last 
update date. That list could be cross-referenced to what you get from 
files(). New files could be opened to fetch the required information 
but closed immediately to free the memory.

Just a quick idea anyway :)

Robert



------------
Best regards,
 thierry



More information about the use-livecode mailing list