public method say(fila as usual, columna as usual, ptext as usual, ppicture as usual, flgbold as usual, flgunderline as usual, flgreverse as usual) as void
in 2.6a i can call them with less parameters like this
Juan Pablo,
How did you declare oFormTest ? And did you change that ?
I guess that before you did not declare it as a specific type and now you declared it with a type.
The difference is that without a specific type this was compiled into a "Late Bound" method call. The compiler then generates a call to a function in the runtime (Send) and this Send() function at runtime uses reflection to figure out what the right number of parameters is that the Say() method wants to have and will add default values for the missing arguments.
If you declare the local variable as your type (MyForm) then the compiler checks the # of parameters and the type of the parameters passed to the method and makes sure that you do not forget an argument.
If you want to omit arguments and still declare oFormTest then you can add default values for the arguments that you allow to skip like this (assuming the first 3 are mandatory):
public method say(fila as usual, columna as usual, ptext as usual, ppicture := NIL as usual, flgbold := NIL as usual, flgunderline := NIL as usual, flgreverse := NIL as usual) as void
or better, if you know the types that you are expecting then use:
public method say(fila as LONG, columna as LONG, ptext as STRING, ppicture := "" as STRING, flgbold := FALSE as LOGIC, flgunderline := FALSE AS LOGIC, flgreverse := FALSE as LOGIC) as void
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu