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

Home » Public Forums » archive » Problems realizing menu changes under IDL 5.5 on Solaris
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Problems realizing menu changes under IDL 5.5 on Solaris [message #31743] Thu, 15 August 2002 12:30
Phillip David is currently offline  Phillip David
Messages: 36
Registered: April 1999
Member
Hi all;

I am having a new problem with an old code that runs on a Solaris box.
The code adds menu items when the user selects certain functions, then
selects the new button by sending a fake selection event to it using
Widget_Control, send_event. However, when I attempt to run this code
under IDL 5.5, I'm getting a warning message about the menu being
unrealized.

For the sake of brevity, I've stripped it down to the following
example. When I test my code, I select "Add a button" from the "Test"
menu, then select the "Am I realized?" button from the same menu. When
I run it on a PC using either IDL 5.4 or 5.5, I get the message "I AM
realized". Under Solaris v5.4, I also get "I AM realized". but under
IDL 5.5, I get "I am NOT realized".

Does anyone have any idea WHY I get the message I do, and WHAT I can do
about it?

Thanks,
Phillip David

pro testQuit, event
Widget_Control, event.top, /Destroy
end ; pro testQuit

pro testAdd, event
parent = Widget_Info(event.id, /parent)
new = Widget_Button(parent, Value='Am I realized?',
event_pro='testRealized')
end ; pro testAdd

pro testRealized, event
if Widget_Info(event.id, /Realized) then begin
print, 'I AM realized'
endif else begin
print, 'I am NOT realized'
endelse
end ; pro testRealized

pro test
tlb = Widget_Base(scr_xsize=200, scr_ysize=100, mbar=menubar,
title='Menu Test')
fileMenu = Widget_Button(menubar, value='File', /menu)
quitItem = Widget_Button(fileMenu, value='Quit',
event_pro='testQuit')
testMenu = Widget_Button(menubar, value='Test', /menu
addItem = Widget_Button(testMenu, value='Add a button',
event_pro='testAdd')
Widget_Control, tlb, /realize
XManager, 'Test', tlb
end ; pro test
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: How to pick columns in a base widget?
Next Topic: ENVI Development Position - Boulder, CO

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

Current Time: Wed Oct 08 17:29:43 PDT 2025

Total time taken to generate the page: 0.00490 seconds