Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strong typing
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00828965
Message ID:
00829016
Views:
18
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform