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

Home » Public Forums » archive » Re: array of objects?
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: array of objects? [message #29366 is a reply to message #29276] Tue, 12 February 2002 23:19 Go to previous message
thomas.bielser is currently offline  thomas.bielser
Messages: 2
Registered: February 2002
Junior Member
Thanks to Ted and Pavel: Your were absolutely right!

After creating the array with 100 elements (each with a null pointer):

; array for holding 100 elements of the type 'own_class'
a = OBJARR( 100 )

I added the following statement in the loop, which runs over all the elements:

; label each array-element with it's number
for i=0, 99 do begin

; create a new object and put the point to it via the variable "a"
a[ i ] = OBJNEW( 'own_class')

; call the method setproperty
a[ i ] -> setproperty, integer_value = i

endfor

Afterwards I had the expected output as mentioned in my former posting.

Cheers,
Tom
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Displaying bitmap pictures
Next Topic: Object method compiling

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

Current Time: Sun Oct 12 12:15:31 PDT 2025

Total time taken to generate the page: 0.72804 seconds