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

Home » Public Forums » archive » Object SetProperty Not inherited
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
Object SetProperty Not inherited [message #78871] Wed, 04 January 2012 16:59
godber is currently offline  godber
Messages: 4
Registered: January 2012
Junior Member
Using IDL 8.1 I am having a hard time setting properties on objects as the documentation suggests I can. Using the sample object from the documentation:

PRO myObjectClass__define
structure = { myObjectClass, $
PROPERTY1: 0L, $
PROPERTY2: '', $
INHERITS IDL_Object $
}
END

I then instantiate and try to set a property as follows and I get an undefined method error

IDL> o = Obj_New('myobjectclass')
% Compiled module: MYOBJECTCLASS__DEFINE.
IDL> o.property2 = 'foo'
% Attempt to call undefined method: 'MYOBJECTCLASS::SetProperty'.
% Execution halted at: $MAIN$

The documentation suggests that subclassing IDL_Object should make using the dot operator possible:

"If your object inherits from the IDL_Object class, you can set or change the object's properties after object initialization by calling the property directly using the dot operator:

Obj.PROPERTY = value, ...
"

What am I missing?

Austin
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: running IDL as a 'sleeping' process
Next Topic: Updates to Markwardt Library

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

Current Time: Wed Oct 08 17:38:11 PDT 2025

Total time taken to generate the page: 0.00530 seconds