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

Home » Public Forums » archive » Once again, an error I don't understand
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: Once again, an error I don't understand [message #28358 is a reply to message #28282] Mon, 03 December 2001 09:37 Go to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"Adam Rankin" <arankin@irus.rri.on.ca> wrote in message
news:Pine.SUN.4.30.0111301250090.2048-100000@proxima.irus.rr i.on.ca...
> % IDLGRMODEL::ADD: Objects can only have one parent at a
> time: <ObjHeapVar3833(IDLGRIMAGE)>
>
> ;this statement creates an array of image objects
> oImage=REPLICATE(obj_new('IDLgrImage', PALETTE=oPalette), nb)

The above line is the problem. It creates an array of the SAME image
object.
Replace the above line with

oImage = OBJARR(nb)

and insert one line below -
I can't say that everything will work, but it will be a step closer.

>
> ;this loop defines and adds the images to the model
> FOR i=0, nb-1 DO BEGIN

oImage[i] = OBJ_NEW('IDLgrImage', PALETTE=oPalette)

> oImage[i] -> SetProperty, DATA=image[*,*,i]

Also, the following line can be moved out of the loop
> oImageView -> Add, oImageModel
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Once again, an error I don't understand
Next Topic: Re: Printing a text file.

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

Current Time: Wed Oct 08 17:50:17 PDT 2025

Total time taken to generate the page: 0.00443 seconds