Re: Object definition [message #20537 is a reply to message #20536] |
Fri, 07 July 2000 00:00   |
promashkin
Messages: 169 Registered: December 1999
|
Senior Member |
|
|
I guess I understand it now. Named structures are not retained after
session is over. If a named structure is defined as a variable, its
definition and name are gone after a session reset (or IDL quit).
However, for object definitions, executing "HELP, {my_obj}, /obj" in
fact calls the object definition code "my_obj__define" and creates a
blank instance of that object for HELP to use. Then, HELP returns info
on blank object instance. But, for a variable that contained a named
structure, such call results in the message:
% Attempt to call undefined procedure/function: 'TEMP__DEFINE'.
% Structure type not defined: TEMP.
Just as expected.
I did not realize that HELP will call definition method without me
creating an object instance first.
Cheers,
Pavel
Ben Tupper wrote:
> It is expected (at least I expect) the named structure to be retained
> from session to session. When I start-up a new session,
> I can do as you describe, HELP, {temp}, /Str and get output of all of the
> fields. The pointers are all null-pointers and the
> other fields are as I defined them in the Temp__Define procedure.
>
> I think you are describing a different behavior and I'm not clear on what
> the behavior is. As an example, it sounds like you might have defined a
> string field in the temp__DEFINE procedure as Temp.Name = ''. Later
> you did something like oTemp->SetProperty, Name = 'PAVEL'. Then you
> quit (or reset). Doing the Help, {Temp},Str shows Temp.Name =
> 'PAVEL'. Am I getting that right?g
|
|
|