pointer to object confusion (C++ programmer, IDL n00b) [message #70726] |
Mon, 03 May 2010 23:18 |
Matt Francis
Messages: 94 Registered: May 2010
|
Member |
|
|
Hi All, I'm new to IDL but am a reasonable C++ coder. I'm trying to
set up some object classes in IDL and am having some trouble.
I can create custom objects and use them okay, but I can't seem to get
a custom object to use another custom object within it. So say I have
defined allready a class FOO, and now I want another class FOO2 which
stores within it an instance of FOO:
PRO FOO2__DEFINE
struct = {FOO2, ...., FOO:<???>, ...}
END
What I want to know is what goes in <???>. I can't use OBJ_NEW because
I don't know yet what arguments will be fed to FOO when it gets
instantiated in some method of FOO2. I tried using simply OBJ_NEW() to
get a null pointer, but then when I try something like
PRO FOO2::some_method
...
FOO = OBJ_NEW('FOO',[ARGS])
END
I get an error. I've tried various combinations of *FOO etc to try and
get the above to work without success.
Can anyone help me? I'm probably thinking too much like a C++
programmer here, but I can't see that I'm trying to do something crazy
so there must be a way to do this. Any hints?
|
|
|