>>Could you please explain what you are trying to accomplish?
>>I can't remember exactly what returning .F. from an init in VFP does.
>>Are you trying to stop the object from being instantiated?
>>Einar
>
>
return .F., in an Init() method in VFP, will avoid an object from being instantiated.
>
>Examples, in VFP:
>
>
>* Form.Init()
>if gnUserLevel >= 3
> MessageBox("You are not authorized to view this form.")
> return .F. && The form doesn't show.
>endif
>
>
>
>* TextBox.Init()
>if (some condition)
> return .F. && The TextBox never appears on the form.
>endif
>
Scott,
That is what I thought but I wasn't 100% sure.
Throwing an exception from within the constructor will cause the object not to be instantiated.
throw new Exception("I don't want this object to be instantiated.");
If you explain a little further what you want then we might be able to find more ways to skin the cat.
Einar
Semper ubi sub ubi.