Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anything better than PCOUNT()?
Message
From
16/11/2015 15:18:25
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
16/11/2015 12:38:08
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01627034
Message ID:
01627524
Views:
69
>>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
Map
View

Click here to load this message in the networking platform