Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optional number of parameters and protected procedure
Message
From
04/01/2007 14:40:26
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01182425
Message ID:
01182463
Views:
33
This message has been marked as a message which has helped to the initial question of the thread.
Naomi

This is a rough outline of something I did for Drew in MaxFrame.

Parent method
LPARAMETERS ONE, TWO, THREE

subclassed method
LPARAMETERS ONE, TWO, THREE
LOCAL lcParms, luReturn
lcParms = x5pitems("ONE, @TWO, THREE", PCOUNT())
luReturn = EVALUATE("DODEFAULT(" + m.lcParms + ")")

x5pitems.prg
lparameters m.tcString, m.tnItems
LOCAL m.lcString
m.lcString = m.tcString + ","
m.lcRetval = LEFTC(m.lcString, AT_C(",", m.lcString, m.tnItems) - 1)


>>How about to name parameteres in public method:
>>
>>param1, param2.....,param3
>>** Then in that same method:
>>
>>PARAMETERS param1, param2.....,param3
>>LOCAL lcMacros, lnFor
>>lcMacros = [thisform.PrivateMethod(]
>>FOR lnFor = 1 TO PCOUNT()
>>    lcMacros = lcMacros + [param]+TRANSFORM(lnFor)+[,]
>>NEXT
>>lcMacros = LEFT(lcMacros, LEN(lcMacros)-1)+[)]
>>&lcMacros
>>
>>not tested at all.
>
>I did something like this before, but thought it would be easier to just add one more parameter with the number of parameters <g> And I already did, so now I'm struggling with other problems I introduced trying to merge two different frameworks into one.
Previous
Reply
Map
View

Click here to load this message in the networking platform