>>
>>Your method looks like:
>>
>>procedure OpenForm( m.tcClassName, m.tcClasslib, m.tuParm1, m.tuParm2, m.tuParm3 )
>>local lnParameters, objForm
>>lnParameters = pcount()
>>do case
>> case m.lnParameters = 0
>> objForm = NEWOBJECT( m.tcClassName, m.tcClassLib)
>> case m.lnParameters = 1
>> objForm = NEWOBJECT( m.tcClassName, m.tcClassLib, '', m.tuParm1)
>> case m.lnParameters = 2
>> objForm = NEWOBJECT( m.tcClassName, m.tcClassLib, '', m.tuParm1, m.tuParm2)
>> case m.lnParameters = 3
>> objForm = NEWOBJECT( m.tcClassName, m.tcClassLib, '', m.tuParm1, m.tuParm2, m.tuParm3 )
>>endcase
>>
>>Where is the problem?
>>
>>Cetin
>
>There is absolutely no problem with your code - this is pretty much what I thought too. But I was concerned that this was not the most, how do I put it, "professional" approach. And since you recommend it (and I have the highest regard for your technical expertise), this approach is good now. Although I will try the parameter object also recommended in this thread.
>
>Thank you very much.
Dmitry,
I understand your concern but that is professional (for example you may think of it as C methods with the same name but different number of parameters, each would be a different "signature").
Object parameter (and I am one of those who advocate object parameter usage) is not appropriate for this case IMHO. For example you would then need all of your forms invoked this way have an lparameters line even if they don't have anything to do with parameters.
Cetin