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

Home » Public Forums » archive » WIDGET_CONTROL: Invalid widget identifier: 2
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
WIDGET_CONTROL: Invalid widget identifier: 2 [message #57617] Fri, 14 December 2007 10:58 Go to next message
envi35@yahoo.ca is currently offline  envi35@yahoo.ca
Messages: 48
Registered: March 2005
Member
Hi, when I run an idl programm (in envi batch mode) a second time in
an idl session, I got the following error: WIDGET_CONTROL: Invalid
widget identifier: 2. I don't think I opened or used any widget in the
programm if this is what it meant. Why am I getting this? Sorry if
this question is too simple and bored you...


Thanks,
Jenny
Re: WIDGET_CONTROL: Invalid widget identifier: [message #78610 is a reply to message #57617] Tue, 06 December 2011 09:02 Go to previous message
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
On 12/5/2011 4:41 PM, DB wrote:
>
> pro testt
> compile_opt idl2
> envi, /restore_base_save_files
> envi_batch_init
>
> End

Don't forget to call ENVI_BATCH_EXIT at the end of TESTT (as well as any
time TESTT would terminate with an error). The first time TESTT is
called this won't cause a problem, but subsequent calls to TESTT in the
same ENVI+IDL session will give the error message you're seeing.

mp
Re: WIDGET_CONTROL: Invalid widget identifier: [message #78611 is a reply to message #57617] Tue, 06 December 2011 07:28 Go to previous message
DB is currently offline  DB
Messages: 2
Registered: December 2011
Junior Member
Thanks David,

That was the tip I needed, all it takes is a reset of the idl session
(I imagine I slopply forgot to destroy something). For some reason I
did not think of trying this before.

As usual a question out of ignorance
Thanks
David




On Dec 5, 5:31 pm, David Fanning <n...@dfanning.com> wrote:
> DB writes:
>> I am pretty new to idl but have experience in other languages. I am
>> working on a very large program originally created in idl 7, but I am
>> working in idl 8.0.1. The following has been simplified from the
>> program and produces an unusual error
>
>> % Stepped to: ENVI_REAL_MAIN_BASE % WIDGET_CONTROL: Invalid widget
>> identifier: 17.
>
>> This error persists when the problematic portion of code is isolated
>> as below. I have included the entire error message. Any suggestions to
>> my ignorance or ways to overcome/fix this problem.
>
>> pro testt
>> compile_opt idl2
>>   envi, /restore_base_save_files
>>   envi_batch_init
>
>> End
>
> I'm not much of an ENVI person, but I *think* you have
> execute those two ENVI commands from the IDL main-level.
> That is, not from inside a program module. (I seem to recall
> having the same problem once.)
>
> The invalid widget identifier comes about when you try
> to use a widget identifier in a command and that widget
> no longer exists. This could happen, for example, if you
> saved a program that used widgets, then killed all the widgets.
> When you restore the program, you will have to re-create all
> the widgets and update the widget identifiers. Otherwise, this
> is exactly what can happen.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: WIDGET_CONTROL: Invalid widget identifier: [message #78618 is a reply to message #57617] Mon, 05 December 2011 16:31 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
DB writes:

> I am pretty new to idl but have experience in other languages. I am
> working on a very large program originally created in idl 7, but I am
> working in idl 8.0.1. The following has been simplified from the
> program and produces an unusual error
>
> % Stepped to: ENVI_REAL_MAIN_BASE % WIDGET_CONTROL: Invalid widget
> identifier: 17.
>
> This error persists when the problematic portion of code is isolated
> as below. I have included the entire error message. Any suggestions to
> my ignorance or ways to overcome/fix this problem.
>
> pro testt
> compile_opt idl2
> envi, /restore_base_save_files
> envi_batch_init
>
> End

I'm not much of an ENVI person, but I *think* you have
execute those two ENVI commands from the IDL main-level.
That is, not from inside a program module. (I seem to recall
having the same problem once.)

The invalid widget identifier comes about when you try
to use a widget identifier in a command and that widget
no longer exists. This could happen, for example, if you
saved a program that used widgets, then killed all the widgets.
When you restore the program, you will have to re-create all
the widgets and update the widget identifiers. Otherwise, this
is exactly what can happen.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: faster convol on local subsets?
Next Topic: Coyote Graphics PDF Files

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

Current Time: Wed Oct 08 19:23:40 PDT 2025

Total time taken to generate the page: 0.00736 seconds