Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Anything better than PCOUNT()?
Message
De
16/11/2015 12:38:08
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
16/11/2015 11:03:59
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01627034
Message ID:
01627505
Vues:
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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform