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

Re: Listing all top-level widgets

davidf@dfanning.com (David Fanning) writes:

>James Tappin (sjt@star.sr.bham.ac.uk) writes:

>> Is anyone aware of any way to generate a list of all the currently realized
>> top-level widgets (or better still all the realized modal top-level widgets
>> but getting that once provided with a list of all tlb's is easy)?

>The idea that comes immediately to mind for me is to write
>an object that "checks out" top-level base widgets. But
>objects are so incredibly difficult to write that you
>practically have to be a genus to write one. :-)

>> 2) Require that any modal top-level base deposit it's ID in a common block
>> 3) Dig out where the information is stored within xmanager (and hope that
>> there are no modal widgets that don't use xmanager
>> Or maybe there's a more elegant solution altogether to this problem, namely:
>> I have a menu that pops up when a file search fails, and it is possible that
>> the routine that called the file search was triggered from a modal menu, but
>> it's about half-a-dozen calls away so passing a group-leader ID down the
>> calling chain isn't really practical.

>I think one or the other of us is confused about what "modal"
>means. I am certain that any widget program "triggered"
>by a button from a modal widget is--almost by definition--
>guaranteed NOT to generate events itself. At least I've 
>never gotten it to work.


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.  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.  

For a while we were able to use the old style of modal widgets in IDL versions
5.1 and 5.2 with a slightly hacked version of xmanager.pro supplied to us by
RSI, but this had to be abandoned with IDL version 5.3.  I think that we have
everything working now in v5.3, but there may still be something lurking
somewhere in our code that we haven't run into yet.

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?

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

William Thompson