Re: Newbie questions, text processing, for each etc.

Scott Raney ((no email))
Thu, 31 Mar 94 19:39:02 MST

> Thanks for the code. It's rather enlighting. Now, my next question,
> how do you set the loc of a answer dialog. I am using
>
> set loc of stack "Answer Dialog" to new_loc
> show stack "Answer Dialog"
> answer "prompt" with "reply1" or "reply2"
>
> The result is rather interesting. One time out of 2 or 3, it will
> get it right. Other times, it will leave it at rough center of the
> current stack, the default location.

You're not supposed to do this. The Motif spec says that modal
dialogs should appear centered over the window that opened them. But
if you insist, you'll have either edit the answer dialog and set the
position in the openStack handler, or clone the answer dialog and use
the "modal" command to open this copy. You'll have to use global
variables to pass information in and out of the dialog if you do the
latter, however.

Note that in general, schemes to position windows from the scripting
language are doomed to failure. The window manager has ultimate
authority about where to put windows, and they frequently (if not
usually) will ignore or incorrectly implement what MetaCard tells them
to do. You may think you have a way around this figured out, but
switching window managers or even versions of the window manager will
usually break your carefully crafted hack ;-)
Scott

-- 
***********************************************************************
* Scott Raney  303-447-3936            Remember: the better you look, *
* raney@metacard.com                   the more you'll see -- Lidia   *
***********************************************************************