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

Home » Public Forums » archive » Re: New Twist on %BadMatch (invalid parameter attributes) error in IDL module for ENVI
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
Re: New Twist on %BadMatch (invalid parameter attributes) error in IDL module for ENVI [message #80206] Tue, 22 May 2012 10:43
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
On Tuesday, May 22, 2012 10:40:08 AM UTC-4, David Fanning wrote:
>
>
> Try replacing this line in progressbar__define.pro:
>
> self.drawID = Widget_Draw(self.tlb, XSize=self.xsize, $
> YSize=self.ysize, RETAIN=1)
>
> With these two lines:
>
> retain = (StrUpCase(!Version.OS_Family) EQ 'UNIX') ? 2 : 1
> self.drawID = Widget_Draw(self.tlb, XSize=self.xsize, $
> YSize=self.ysize, RETAIN=retain)
>
> Does that help?

That did the trick. Thanks for the help!
Re: New Twist on %BadMatch (invalid parameter attributes) error in IDL module for ENVI [message #80213 is a reply to message #80206] Tue, 22 May 2012 07:40 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian J. Daniel writes:

>
> Hi all,
>
> I'm running ENVI+IDL 4.8 on Lion with a set of IDL code located in ENVI's save_add directory. My IDL code uses the CG routines for displays and status windows that are outside of ENVI's domain. While my progress bar windows are updating, the BadMatch errors are being thrown in the IDL window. After several hundred of these errors, the entire workbench/ENVI crashes in a glorious fashion. I've followed David's article:
>
> http://www.idlcoyote.com/misc_tips/badmatch.php,
>
> and included 'Device, Retain=2; in my IDL startup file (didn't work) and included it in the IDL code calling the progress bar, which also did not work.
>
> I checked the ENVI Preferences dialog and made sure Display Defaults->Display Retain Value was equal to 2.
>
> Below are the versions of the relevant software libraries.
> Mac OS X 10.7.4
> XQuartz 2.6.4 (xorg-server 1.10.6)
> ENVI+IDL 4.8 (built on IDL 8.0)
>
> Any suggestions?

Try replacing this line in progressbar__define.pro:

self.drawID = Widget_Draw(self.tlb, XSize=self.xsize, $
YSize=self.ysize, RETAIN=1)

With these two lines:

retain = (StrUpCase(!Version.OS_Family) EQ 'UNIX') ? 2 : 1
self.drawID = Widget_Draw(self.tlb, XSize=self.xsize, $
YSize=self.ysize, RETAIN=retain)

Does that help?

I should be doing this for all draw widgets (which I actually
do now), but this program is very, very old. :-)

I'll update the program in a second.

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: cgHistoplot colors
Next Topic: Re: cgHistoplot colors

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

Current Time: Fri Oct 10 04:48:20 PDT 2025

Total time taken to generate the page: 0.39915 seconds