Or you can assign a default value to your parameters
parm = evl(parm, <default value>)
But then it would crash because parameters are normally used in expressions and will have wrong types at first call (all logical .F.). So should I provide dummy parameters in all Init() in case pcount()?
Oops, certainly not, your form would not instantiate ...
And RETURN .F. if PCOUNT()=0?
In Fact .Init() is executed twice:
- first time without parameters
- second time with parameters
Your Form.Init(parms) method should test for Pcount() > 0:LPARAMETERS parms
Dodefault()
IF Pcount() > 0
<your init code>
ENDIF
-- thn (FoxInCloud)