comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Can I make entries in CW_PDMENU insensitive?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Can I make entries in CW_PDMENU insensitive? [message #14474 is a reply to message #14397] Tue, 02 March 1999 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
David Foster (foster@bial1.ucsd.edu) writes:

> David -
>
> I agree that creating pulldown menus using the /MENU keyword to
> WIDGET_BUTTON() calls is very easy, and makes your code easier
> to read and maintain (especially your event handler!).
>
> But all of the limitations of CW_PDMENU mentioned above can be
> overcome by using the IDS= keyword to return a vector of the
> widget IDs for the buttons, and then using WIDGET_CONTROL to
> manage these widgets (eg. make insensitive, assign an event-handler,
> set the uvalue, etc.).

I don't dispute this. I just argue that using the button
IDs like this will make the code significantly harder to
extend and maintain over time. Since I'm not so bright that
I think of everything I need in a program at the time I write
it, extendability and maintainability is something I prize
highly. :-)

Adding a menu item as a button, assigning an event
handler for it, and writing the new event handler
can be done in a matter of minutes, as opposed to
re-ordering my index numbers in a large event
handler, making several mistakes that introduce
other errors, etc. When it comes to programming, I
need all the help I can get.

Cheers,

David

--
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: INSIGHT 3D Visualization ?
Next Topic: Map of the Moon's surface

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 02:08:28 PDT 2025

Total time taken to generate the page: 0.64349 seconds