I guess I stumped everyone. :(
Charles Hartman
charles.hartman at conncoll.edu
Wed Nov 2 22:42:42 EST 2005
Wow! Until I read this message it didn't occur to me that the
preOpenStack in the main stack of the database app I'm working on was
being called (I just checked) every time one of the five or six
substacks opens. Since that handler opens the database and reads much
of it into RAM, that would have gotten pretty awful if I hadn't known
until there was a lot of data in there . . .
This is a pretty bad pitfall. I've been surprised by this before
(though I forgot it) -- that "preOpenStack" doesn't mean, as it so
obviously seems to, "preOpenTHISStack" it means this stack and all
its substacks . . .
Charles Hartman
On Nov 2, 2005, at 10:18 PM, Ken Ray wrote:
> On 11/2/05 7:18 AM, "AbilityForms at aol.com" <AbilityForms at aol.com>
> wrote:
>
>> Thanks for responding Jacque,
>>
>> As I said before in other questions to the group I've apparently
>> suffered
>> some sort of corruption. These three windows all open to the full
>> screen every
>> time. It doesn't matter that I resize and save them. They still
>> open full
>> screen
>> size the next time. Someone told me how to fix the preference
>> panel and that
>> worked. I was just hoping I could fix the other three panels in a
>> similar
>> fashion. If these windows are in a stack I could address the
>> problems with an
>> openCard or openStack handler.
>
> I've run into something similar, and it had to do with the fact
> that I had a
> preOpenStack handler that was doing some automatic sizing of a
> stack, but
> forgot to set it up so that ONLY the main stack got the message...
> here's an
> example:
>
> In the mainstack I had this stack script:
>
> on openStack
> set the rect of this stack to the screenRect
> end openStack
>
> And it had three substacks. Two of them hand their own 'openStack'
> handler,
> but the third one didn't. We couldn't figure out why the third one was
> opening to fill the screen until we finally realized that the
> 'openStack'
> message that went to the substack was not being trapped by it and was
> falling through to the mainstack. The code *should* have been either:
>
> on openStack
> if the owner of the target is me then
> set the rect of this stack to the screenRect
> else
> pass openStack
> end if
> end openStack
>
> OR, I should have moved the original code into the CARD and not
> leave it in
> the STACK.
>
> Is it possible that you have a plugin, library, backscript or
> frontscirpt
> that might be encountering this same kind of situation?
>
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list