Russ,
You cann not ADD OBJECT with an empty object, because it's empty. This means none of the EVENTS and PROPERTIES that need to be called are available. A empty object could only be used via an property of the containing object
o=CREATEOBJECT([bizob])
DEFINE CLASS bizob as custom
PROCEDURE Init
THIS.ADDPROPERTY('data',NEWOBJECT('EMPTY'))
ENDPROC
ENDDEFINE
, so it's not realy "contained". That means you can not use .Data.PARENT and will not be within .OBJECTS.
HTH
Agnes
>When I run the following code in a prg file:
>
>o=CREATEOBJECT([bizob])
>
>DEFINE CLASS bizob as custom
> ADD OBJECT data AS empty
>ENDDEFINE
>
>I get an "object class is invalid for this container" error. If I hit cancel and make an edit to the prg (hit enter to add a new line, for example), I get the C0..05 exception.
>
>Crash bug aside, what container can I put an empty object in? Neither custom or container classes seem to work. Up until now I had been setting up a property in my business class and using SCATTER TO NAME to turn it into an object. I have a situation where this is not desirable now, and I want to define my data object explicitly...and I don't want any properties except those that correspond to fields in my table.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]