Palette window "stuck" at screenloc? -sb-OS

Ken Ray kray at sonsothunder.com
Mon Nov 24 22:23:24 EST 2003


One other way to do it (I do it this way myself) is to have the
mainstack use code like:

on preOpenStack
  if the owner of the target is me then
    set the loc of this stack to the screenLoc
  end if
end preOpenStack

Since the preOpenStack message goes to the card first, the "owner" of
the card is a stack. The "if the owner" line tests to see if the card
that got the message is a card from a mainstack (which would be true) or
a card from a substack (in which case the owner would be the substack,
which would not be "me" and would end up being false).

This way you don't have to be so specific if you don't want to.

Just my 2 cents,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Sannyasin Sivakatirswami
> Sent: Monday, November 24, 2003 3:43 PM
> To: How to use Revolution
> Subject: Re: Palette window "stuck" at screenloc? -sb-OS
> 
> 
> Monte: Thanks you got it... the preopenstack handler of the 
> main stack 
> had this:
> 
> set the loc of this stack to the screenloc
> 
> which of course applied to ALL stacks being opened... so I 
> changed that 
> to just
> 
> set the loc of stack "dws Youth" to the screenloc ## the name of the 
> mainstack itself
> 
> and now the palette behaves as expected. I can simply set it to the 
> position I want, save the stack and build the standalone and 
> it appears 
> where it should without the necessity of setting it's location.
> 
> 
> Thanks
> 
> On Nov 23, 2003, at 7:43 PM, Monte Goulding wrote:
> > I don't think there's an at modifier for the palette command??? At
> > least
> > it's not in the docs. If it's a substack you might want to check the
> > mainstack positioning script isn't getting triggered. don't forget 
> > that the
> > engine opens windows automatically where they were on the 
> last save so 
> > you
> > may not need to position the window with script. It could 
> be it's just 
> > a
> > message path issue.
> >
> > Cheers
> >
> > Monte
> >
> 
> 
> sivakatirsswmai wrote:
> >> I am have created a small palette stack with a table of 
> contents in a 
> >> field
> >>
> >> If I move the palette and close it, then reopen it by script... it 
> >> opens at the screenloc... right on top of the main 
> presentation, dead 
> >> center on the screen.
> >>
> >> I can't seem to change this behavior. The goal is to get 
> the palette
> >> to
> >> open with the top left of its rect just under the topleft 
> of the main
> >> presentation window. Then allow the user to move it off the main
> >> presentation window if he wants to later, but certainly 
> not right on
> >> top over   the main window.
> >>
> >> case "table of contents"
> >>    palette "toc" at 200,200
> >>    break
> >
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 




More information about the use-livecode mailing list