[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Listing all top-level widgets

William Thompson (thompson@orpheus.nascom.nasa.gov) writes:

> It used to be the case that modal widgets were allowed to have child widgets.
> However, this capability went away when RSI decided to move the /MODAL keyword
> from the XMANAGER call to the call to WIDGET_BASE.  This severely restricted
> the usefulness of modal widgets, and we've had to emulate the /MODAL
> functionality by having the modal-like widget desensitize its caller, and then
> remember to resensitize it when it's done.  

I've got bad news for you, Bill. On Windows NT at least, desensitized widgets
*still* generate events. Although if you are lucky the desensitized look will
discourage users from clicking all your controls just to see what happens. :-)

> We also needed to add some funny
> business with a timer widget in the calling routine so that it would know that
> the modal-like widget was done, and it could do something with the answer.  

Yuck. I normally write Modal widgets as functions that will
return whatever information I am looking for when the widget
is destroyed.

> It's been a while since I've tried it, but I believe that a modal widget can
> have a modal child widget.  Perhaps that would solve James's problem?

Well, now you mention it, I have a program running from
a modal widget and it *does* seem to generate events--much
to my consternation. These things just seem to have no respect
for learned opinion. :-(

Another item for the To Do list, I guess. 
> Personally, I'm very disappointed with the restrictions of the present
> implementation of modal widgets compared with what we used to be able to do.
> From now on, unless the widget is extremely simple, I'll be avoiding modal
> widgets.

I'm big on non-modal object widgets, but--of course--they are
too difficult to write unless you are getting paid the big bucks. :-)


David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155