Sheet woes...

Klaus Major klaus at major-k.de
Sun Sep 28 08:19:01 EDT 2003


Bon jour Domi,

> Klaus Major <klaus at major-k.de> wrote:
>
>> Can't you just store the date and check with a
>>
>> on preopenstack
>>    if my_date <> the date then
>>     ###do preopenstuff...
>>    end if
>>    ...
>> end preopenstack
>>
>> or something like that?
>
> Sure, I have to rewrite this preopentack handler...
>
> How to make it understand I didn't really leave the stack, but only
> opened a substack???

I think that this message is also sent when you just come back to that 
stack.

> IMHO, that's a curious behaving...
>
> In fact, I tried to "memorize" the originating card, by push/pop, by cd
> id... but no luck: it seems that the preopenstack handler takes a
> precedence, or goes after to go to "today" card!

I do this always by setting a customprop and then ckeck it afterwards.

If i want that my "preopenstack" will be run ONLY ONCE DEFINITVELY ;-)
then i save that stack with a customprop -> firstrun -> set to true

Then i script in my handler:

on preopenstack
   if the firstrun of this stack = true then
     ### do my stuff the first and only time!!!
     set the firstrun of this stack to false
   end if
end preopenstck

This way this script will only run the very first time and only once.
Must not be saved after that, of course ;-)
Or set the firstrun back to true before saving!

You get the picture...

> Nouvelles photos :
> http://cooldomi.free.fr/CP/Barcelonnette/

Have a nice sunday...


Au revoir

Klaus Major
klaus at major-k.de
www.major-k.de




More information about the use-livecode mailing list