Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Repeatable fatal exception error
Message
De
21/07/2004 02:51:25
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
20/07/2004 13:20:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Divers
Thread ID:
00926195
Message ID:
00926463
Vues:
12
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 &&Init
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.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform