Object SetProperty Not inherited [message #78871] |
Wed, 04 January 2012 16:59 |
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
|
|
|