|
FOROS PROFESIONALES WINDEV, WEBDEV y WINDEV Mobile |
| | | | | |
| [WD20] Internal Procedure Quirk |
| Iniciado por guest, 02,dic. 2015 07:11 - 1 respuesta |
| |
| | | |
|
| |
| Publicado el 02,diciembre 2015 - 07:11 |
Hi I love these new internal procedures but I have just come across some undocumented behaviour which might save someone else some time. In a nutshell don't try using RESULT in an internal procedure.
I call a procedure from a button. This procedure returns true or false. Within that 'parent' procedure I have an internal procedure which also returns true or false. The code RESULT InternalProcedure seems to work correctly in the debugger but the button always gets False returned to it. I then declared a variable in the 'parent' procedure, changed my code to MyVar=InternalProcedure Result MyVar with exactly the same result. The odd thing is according to the debugger MyVar gets set to the correct value but the result returned to the button is always negative. The only way I can get it to work is to forget about using RESULT in the internal proc & just directly set the value of MyVar to true or false within the internal proc.
Cheers
David |
| |
| |
| | | |
|
| | |
| |
| Publicado el 02,diciembre 2015 - 10:42 |
Quote David Egan
Hi
I love these new internal procedures but I have just come across some undocumented behaviour which might save someone else some time. In a nutshell don't try using RESULT in an internal procedure.
I call a procedure from a button. This procedure returns true or false. Within that 'parent' procedure I have an internal procedure which also returns true or false. The code
RESULT InternalProcedure seems to work correctly in the debugger but the button always gets False returned to it. I then declared a variable in the 'parent' procedure, changed my code to MyVar=InternalProcedure Result MyVar with exactly the same result. The odd thing is according to the debugger MyVar gets set to the correct value but the result returned to the button is always negative. The only way I can get it to work is to forget about using RESULT in the internal proc & just directly set the value of MyVar to true or false within the internal proc.
Cheers
David
I confuse . internal procedure is a callback procedure . you don't return value from callback procedure . in javascript callback procedure run in async |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|