On Tue, 31 Aug 1999, Signe Marie Sanne wrote:

> Hello,
> 
> I have struggled with something which probably is simple if you do the
> right things. The problem is: I want a note pad to appear covering approx.
> 1/3 of the screen of the mainstack. I have tried toplevel, modal, palette,
> lockscreen to true etc., before I ended up with the following script (in
> MetaCard 2.2.5)
> 
> on åpneblokk
>   put the topleft of stack "franpo" into tl --"Franpo" is the mainStack
>   open inv stack "carnet"   -- the substack
>   set topleft of stack "carnet" to tl
>   show stack "carnet"
> end åpneblokk
> 
> (The substack has a button to close it.)
> 
> Then strange things happen: On the Mac:
> When in Standalone the substack appears only after a second click).

No idea why, unless the stack is being opened underneath the current
one.

> On the Windows:
> With the above script the loc of the mainstack changes to 0,0 while the
> topleft of the substack remains in the right place.

This is even weirder.

> Both in standalone and development:
> When I click outside the substack (both), the controls of the mainstack
> behave as usual, but sometimes the substack stays in front, at other times
> it goes away.

Or underneath the top level stack, which is the proper behavior unless
the substack is a modal dialog or palette.

> In development environment the substack appears after one click, but the
> message box pops up at the same time.

No explanation for this either, but my guess is that all three of
these problems are related to the fact that messages sent to substacks
pass through the main stack's script.  If you've got any handlers in
the main stack script for any standard messages (openCard, openStack,
etc.) this is most likely what's tripping you up.

> Any advice as to show the note pad (and block the controls of the
> mainstack) is greatly appreciated. Thanks in advance.


If the size and positioning is so critical, why use a separate stack
at all instead of just showing a hidden field in the stack you've
already got open?

If you must use a separate stack, generally the easiest way to make
sure it comes up where you want is to handle the preOpenStack handler
in the card script of the substack and set the rect of the stack
there.  Even this may not get you what you need on some UNIX systems,
and you'll have to set the decorations property of the stack to empty
if you really want to accurately position it.
  Regards,
    Scott

> Regards
> 
> -----------------------------------------------------------
> 1. amanuensis Signe Marie Sanne      e-mail: [EMAIL PROTECTED]
> Romansk Institutt                            tel:  +47 55 58 21 27
> Øisteins gt. 1
> 5007 Bergen          http://www.hf.uib.no/hfolk/sanne/default.html
> Norway
> -----------------------------------------------------------
> 
> 

********************************************************
Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...

Reply via email to