Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strong typing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00828965
Message ID:
00829016
Vues:
19
>sorry, the error is occured at
>
>PROCEDURE INIT(toHostObject AS Object) AS Boolean

I stripped the code to this:
CLEAR 
LOCAL t, o
t = CREATEOBJECT('f')
RELEASE t
t = CREATEOBJECT('f',CREATEOBJECT('custom'))
RELEASE t
o = CREATEOBJECT('custom')
t = CREATEOBJECT('f',o)
RELEASE t
o = null
t = CREATEOBJECT('f',o)

DEFINE CLASS f as Custom
PROCEDURE init(toA AS Object) AS Boolean 
   IF IsObject(toA)
      ?'Is Object'
   ELSE
      ?'Nope, not this time'
   ENDIF
ENDPROC
ENDDEFINE

PROCEDURE IsObject(tvObject AS Variant) AS Boolean
   RETURN TYPE('tvObject') = 'O' AND NOT ISNULL(tvObject)
ENDPROC
I don't see the problem. What object is the INIT in? Is it possbile you have a second init? like:
DEFINE CLASS f as Custom
PROCEDURE init(toA AS Object) AS Boolean 
   IF IsObject(toA)
      ?'Is Object'
   ELSE
      ?'Nope, not this time'
   ENDIF
ENDPROC
PROCEDURE INIT AS Boolean
   RETURN .T.
ENDPROC
ENDDEFINE
This would cause that error, not a compile error. VFP uses the last procedure with the same name.

Tracy
ENDDEFINE
Tracy
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform