[SOLVED] Nice coding - can I define something as function module on form?
Author: dammie@seznam.cz (dammie)
Hello, in my code I can use this : call L_my_proc_get_state ( ln_state ) if ( ln_state ) ... do something I would like use more nice and readable command as this... if ( $my_function_get_state ) ... do something Is there any way to do this on form or how to get it with proc / operation more nicely? Thanks for tips..
5 Comments
Local Administrator
Using the returns code. Examples below. regards, Iain
.....
Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Local Administrator
Thanks...But it seems with entry this doesnt work : v_numeric_variable = lp_get_the_state() ... I ve got error during compilation But it inspired me using operation... Proc code... variables
handle this endvariables
this = $instancehandle
if ( this->get_state() )
do something ...
...
... end Operation trigger operation get_state ... return ln_state end
Author: dammie (dammie@seznam.cz)
Local Administrator
Hmm, I use it all the time with entry what compiler error did you get? Iain
Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Local Administrator
Also, can you use $instancehandle->get_state()
Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Local Administrator
Ive found it, brackets cannot be ommited - compare with call ... variables
numeric v_numeric_variable endvariables
v_numeric_variable = lp_get_the_state() -- compiler OK
v_numeric_variable = lp_get_the_state -- compiler error
call lp_get_the_state() -- compiler OK
call lp_get_the_state -- compiler OK
return end entry lp_get_the_state
return 1 end So, thanks...
Author: dammie (dammie@seznam.cz)