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

Home » Public Forums » archive » Large widget identifiers
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
Large widget identifiers [message #33184] Fri, 13 December 2002 02:59 Go to next message
Ian Dean is currently offline  Ian Dean
Messages: 26
Registered: January 2000
Junior Member
Hi,
Has anyone come across widget IDs "wrapping" when they reach a short int
limit (65535)?

We have a run-time IDL program that is running continuously for days/weeks.
During this time several runs of data are processed. Each run requires
approximately 400 widgets. However, without wishing to exit the software,
the runs are performed within one program.

The problem occurrs when the widget ID reaches 65535, the next widget to be
created is 0, not 65536. This looks like a short int problem, but IDs are
supposed to be long int.

Is there a way under program control to reset the widget ID back to 1 at the
beginning of a run?
I realise using the development environment .reset achieves this, but that
cannot be used in a running program.

This occurrs on IDL PC versions 5.2-5.5. However, it does not happen on
OpenVMS versions.

The following lines will cause the error to occur:-

FOR J=0L, 50000L DO BEGIN
Base=WIDGET_BASE()
WIDGET_CONTROL, Base, /DESTROY
ENDFOR

Any suggestions would be welcome
Regards,
Ian
Re: Large widget identifiers [message #33243 is a reply to message #33184] Sun, 15 December 2002 13:55 Go to previous message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
Ian Dean wrote:
>
> Hi,
> Has anyone come across widget IDs "wrapping" when they reach a short int
> limit (65535)?
>
> We have a run-time IDL program that is running continuously for days/weeks.
> During this time several runs of data are processed. Each run requires
> approximately 400 widgets. However, without wishing to exit the software,
> the runs are performed within one program.
>
> The problem occurrs when the widget ID reaches 65535, the next widget to be
> created is 0, not 65536. This looks like a short int problem, but IDs are
> supposed to be long int.
>
> Is there a way under program control to reset the widget ID back to 1 at the
> beginning of a run?
> I realise using the development environment .reset achieves this, but that
> cannot be used in a running program.
>
> This occurrs on IDL PC versions 5.2-5.5. However, it does not happen on
> OpenVMS versions.
>
> The following lines will cause the error to occur:-
>
> FOR J=0L, 50000L DO BEGIN
> Base=WIDGET_BASE()
> WIDGET_CONTROL, Base, /DESTROY
> ENDFOR
>
> Any suggestions would be welcome
> Regards,
> Ian

Hi Ian,

What about trying Widget_control,/RESET? Carefully, of course...

Andrew

------------------------------------------------------------ -----------------
Andrew D. Cool
Electromagnetics & Propagation Group
Intelligence, Surveillance & Reconnaissance Division
Defence Science & Technology Organisation
PO Box 1500, Edinburgh
South Australia 5111

Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@no-spam.dsto.defence.gov.au
Please remove the no-spam from my email address to reply ;-)
------------------------------------------------------------ -----------------
Re: Large widget identifiers [message #33257 is a reply to message #33184] Fri, 13 December 2002 16:53 Go to previous message
Jeff Guerber is currently offline  Jeff Guerber
Messages: 41
Registered: July 2000
Member
Works for me (up to 70000) in IDL 5.5 on HP-UX 11. Took a while to
create all those widget_bases, though!

Jeff Guerber
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: handling numbers
Next Topic: Clean your PC properly - wk u10 i32dq3 87idq2iw71

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

Current Time: Wed Oct 08 16:55:09 PDT 2025

Total time taken to generate the page: 0.00225 seconds