Hello,
I have a technical issue that i think is important for a correct standard code preservation.
Let's say i have an standard class:
public class A
{
public ExampleEDT test(String _a, String _b, boolean _c=false, boolean _d=false)
{
ExampleEDT ret;
if(primisDefault(_c) && primisDefault(_d))
{
//some if code
}
else
{
//some else code
}
return ret;
}
}
Then i create a test() method extension:
[ExtensionOf(classStr(A))]
public class A_Extension
{
public ExampleEDT test(String _a, String _b, boolean _c, boolean _d)
{
ExampleEDT ret;
ret = next test(_a,_b,_c,_d);
return ret;
}
}
I detected that, even when initially i call the test method 'a.test(string1, string2)' without using the extension, the standard code works as expected entering the first 'if', detecting _c and _d parameters as default. BUT, when using the extension it doesn't detect as default parameters. so the logic on the standard method doesn't work properly. (entering in the else part). The problem I see, is that I must call the next method using all the parameters (not only the mandatory) otherwise i get a runtime error.
In some cases, i can resolve this situation bringing the standard method logic to the extension's method, but in my opinion this is a bad practice since i am ignoring the standard code (and future changes).
I would like to know if there is any way to preserve the @_isDefaultSet property between extensions and standard classes
Thanks in advance,
Eisenberk.