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

Home » Public Forums » archive » Dynamic menus on base widget using MBAR
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: Dynamic menus on base widget using MBAR [message #21690 is a reply to message #21146] Tue, 12 September 2000 13:21 Go to previous message
Phillip David is currently offline  Phillip David
Messages: 36
Registered: April 1999
Member
I can tell I haven't been keeping up with the newsgroup. The primary
reason to use the UValue of the button rather than the value is that you
might wish to change the value of the button (for example, you could
decide to internationalize the application and change the button values
to Swahili), yet you wish the button to continue to work as coded. If
you rely on the text printed on the button, you will be unable to change
it without major changes to your code. If, however, you use the UValue
of the button, the label on the button's face no longer matters.

Another time this makes a difference to me is when I change the value of
a button to reflect state. Some of our buttons say things like "Add
axes" until you select them. Once axes have been added, we change the
value of the text to "Remove axes". We can use the same event handler
in both cases if we rely on the UValue, but not if we use the value.

Phillip

David Fanning wrote:
>
> Pavel Romashkin (promashkin@cmdl.noaa.gov) writes:
>
>> Menu items then could have
>> different Uvalues and be used in the most conventional way in event handlers.
>
> I'm surprised to learn that button UVALUES are the "most
> conventional way" to learn which button was selected in
> event handlers, since I only rarely use this method. I
> prefer to use the button value itself, since this value
> is always obvious to me when I look at the button and I
> need all the visual clues I can get when I am writing
> programs. :-(
>
> But then again, I've always been slightly out of step
> with everyone else. It's a burden I've had to bear
> all my life. :-)
>
> Cheers,
>
> David
>
> P.S. Let's just say a vote from me in any election
> is almost a kiss of death. :-(
>
> --
> 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
Read Message
Read Message
Read Message
Previous Topic: Axis labels
Next Topic: slicer to movie

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

Current Time: Thu Oct 09 21:25:13 PDT 2025

Total time taken to generate the page: 1.28182 seconds