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

Re: Q: Xmanager explanation?



David L. Keller (davekeller@pop.omah.uswest.net) writes:

> Using IDL in two different projects about 10 years apart,
> I have yet to figure out what 'Xmanager' does for me.
> 
> I realize that I have to keep track of widget ids, which
> I do by creating a common array of NAME and ID pairs:
>      a = {nameandnumber, wnam : "", wnum : 0L}
> I call a simple routine to add to the list of widgets:
>      add2namenumber,'DataMenu',data_menu_id
> To retrieve a widget id, I have a function 'wnum' that
> converts the NAME to the NUMBER (ID):
>      widget_control,wnum('DataMenu'),blah, etc=andSoOn)
> 
> I am more comfortable going through this effort myself,
> because I -dont- know what xmanager does for me.  Ok, I
> do know that it keeps track of the widget id's, but as
> I say, I'd rather do it myself and understand it.
> 
> Anyone able to clearly explain what I get with xmanager?
> What it's drawbacks might be?

I'm trying to be serious here, but all I can think
of are wisecracks this morning. :-(

Drawbacks!? There are no drawbacks to using XManager,
believe me. A widget program that doesn't use
XManager is is like going to the Rave with your
hair slicked back with Brylcreem. Let's just say
you chances of getting lucky are not too good.

XManager doesn't keep track of widget IDs, at
least not in any meaningful way that will help you
run your program. What it does keep track of is
which event should be sent to which event handler.
If you are still running IDL on your PDP-8 and you
like flipping those switches to program the darn
thing, then you will probably want to manage your
own events. But the rest of us use XManager to
take care of all this onerous work.

Your simple routine to keep track of widget IDs
and names is nice, but it's just so much easier
to use the built-in Find_By_UName keyword.

> I also don't trust Xmanager in that I am not sure that
> I can trust it with the 'interrupt' magic, and type IDL
> commands at the same time.

What version of IDL did you say you were
running? IDL 1.5? Setting the NOBLOCK keyword
gives you access to any widget program you want to
run and access to the IDL command line at the same
time.

There are any number of well-written widget programs
around. I suggest you download a couple of them and
have a look at what you are missing. A lot has happened
in the 10 years you have been gone. :-)

Cheers,

David

P.S. OK, I get it. This guy is really Martin Schultz
just having a go at me for some fun I poked at him
in this newsgroup a while ago. :-)

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