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

Home » Public Forums » archive » Re: Turn Object Automatic Clean-up Off?
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: Turn Object Automatic Clean-up Off? [message #81466 is a reply to message #81465] Thu, 20 September 2012 14:11 Go to previous messageGo to previous message
DavidF[1] is currently offline  DavidF[1]
Messages: 94
Registered: April 2012
Member
Marc writes:

> Out of curiosity:
>
> Could you please post an example code where this problem is exposed?
> How can an object which has no references any more be of relevance in
> an IDL program?
>
> I have a lack of imagination here.

Alright, here is *another* irritating example. I have a widget program,
cgZImage, that allows me to zoom into an image. As I move my cursor over
the zoomed image, it prints out the image location and the value of
the image at that location.

I'm working with GeoTiff files a lot, so it would be useful to
have the image location in lat/lon values rather than pixel values.
I want to pass the program a cgMap object, which is what I use to set up
a map projection and coordinate system. I can use this object to covert
a pixel location to a lat/lon value.

I create the map object outside the program:

mapObj = cgGeoMap(geoTiffFile, Image=image)

Then, I pass both the image and the map object into
my widget program:

cgZImage, image, Map=mapObj

Inside the program, I store the map object in the info
structure of the program, and try to use it in an event
handler. It is always invalid!!

Indeed:

IDL> mapObj = cgGeoMap(geoTiffFile, Image=image)
IDL> Print, Obj_Valid(mapObj)
1
IDL> cgZImage, image, MAP=mapObj
IDL> Print, Obj_Valid(mapObj)
0

Not at all what I wanted!

Cheers,

David
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: A new IDL Product Manager
Next Topic: Is MAP procedure in IDL8.2 BROKEN?

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

Current Time: Wed Oct 08 19:30:30 PDT 2025

Total time taken to generate the page: 0.00454 seconds