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

Home » Public Forums » archive » Re: IDL v5.1 impressions
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: IDL v5.1 impressions [message #11739] Fri, 15 May 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Hi Folks,

I don't want to rain on the IDL 5.1 parade (because I like
it too), but I have noticed that almost all of my object
graphics programs are broken. :-(

Here is a simple program that illustrates the problem. This
program runs in IDL 5.0.3 and fails in IDL 5.1.

pro test
thisView = OBJ_NEW('IDLgrView')
thisModel = OBJ_NEW('IDLgrModel')
thisView->Add, thisModel
thisSurface = Obj_New("IDLgrSurface")
thisModel->Add, thisSurface
thisContainer = Obj_New('IDLgrContainer')

; The next line causes the following error:
;
; % IDLGRCONTAINER::ADD: Objects can only have one
; parent at a time: <ObjHeapVar10(IDLGRSURFACE)>

thisContainer->Add, thisSurface
end

My container object is where I put the assorted objects
I create so that they can be destroyed when the widget
program is destroyed. Apparently I cannot add a surface
object (or any other object) to both the model and
the container. Nor can I, for example, add the model
to both the view and the container.

This is reported to be a bug in the IDL 5.1 code, according
to RSI technical support, but other than that they aren't
telling me anything. (I should put JD on to them.)

Oddly, instead of being a bug, I think this is how it is
*suppose* to work! Some of you may remember me ranting
and raving about memory leakage from my object programs
earlier this year. I made the assumption then that anything
I added to the model would be cleaned up when the model
was cleanup up. That turned out NOT to be the case, which
is why I started adding anything and everything I created
to the container object.

But I think this behavior now is great. At least it makes
perfect sense to me.

Unfortunately, I am now at a point where I don't know HOW
to write object graphics code, unless I put a lot of
"which version of IDL" checks in my code. My question is this:
are we SURE this is a bug?

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: spawning to my dir, not IDL dir !DIR
Next Topic: Re: PS file and annotate.pro?

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

Current Time: Thu Oct 16 18:43:11 PDT 2025

Total time taken to generate the page: 0.07679 seconds