Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strong typing
Message
 
 
To
15/09/2003 09:54:58
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00828965
Message ID:
00828971
Views:
17
VFP doesn't have strong typing. In the best case (COM DLL) variable type info is added to a type library. In other cases it's treated as a comment.
You cannot pass parameters to a COM object INIT so 'AS' is useless there. Try to remove them.

>Hi,
>I am new to "strong typing" of vfp7. May I know what wrong with this code?
>
>
>	PROCEDURE INIT(toHostObject AS Object) AS Boolean
>		IF IsObject(toHostObject)
>			THIS.oHostObject = toHostObject
>		ENDIF
>		
>		WITH THIS
>			.oWarningCollection = CREATEOBJECT(.cCollectionClass)
>			.oBrokenRuleCollection = CREATEOBJECT(.cCollectionClass)
>			.oRequiredFieldCollection = CREATEOBJECT(.cCollectionClass)
>			.oEmptyRequiredFieldCollection = CREATEOBJECT(.cCollectionClass)
>		ENDWITH
>	ENDPROC
>
>
>I get error
>
>Statement:IF IsObject(toHostObject)
>Message: No PARAMETER statement is found.Error: 36
>
>Any ideas?
>
>Thank you
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform