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--