[WD20] Internal Procedure Quirk

Startbeitrag von David Egan am 02.12.2015 06: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

Antworten:

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

von CCC2 - am 02.12.2015 09:42
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.