Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Coding, syntax & commands
Environment versions
Network:
Windows 2008 Server
>>MaxFrame comes with a way to handle optional parameters if you order them so the optional ones are always at the end.
>>
>>LPARAMETERS tuInitialValue, tcFilter, tlNoAddButton
>>LOCAL lcParms
>>lcParms = x5pitems("m.tuInitialValue, m.tcFilter, m.tlNoAddButton",PCOUNT())
>>IF NOT EVALUATE("DODEFAULT(" + m.lcParms + ")")
>> RETURN .F.
>>ENDIF
>
>Won't help you much if you already did the classic dodefault() at the subclass level, copying all the parameters, even though only some were actually passed to the method. So if method has 5 parameters, was called with 3, and in the instance's level of subclassing you did dodefault(p1, p2, p3, p4, p5) - the default .f. will be passed (really passed) for p4 and p5 to the parent class. If this code is in the parent class only and not in the instance's class, it's getting false info. IOW, this has to be done at all levels of subclassing in order to work.
Yup.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only