#1 2017-02-22 17:13:12

Antonio.Cambule
Member
Registered: 2017-02-19
Posts: 38

[solved]: Howto process a ABScript Function with Return Result?

ABScript Function "MyFunction"

...do something

Return "true" "Boolean"

--------------------

How to process it lets say in an Click Event?
I tried:

MyFunction "" "[Result]"

if "[Result]" "==" "true"

...

EndIf

thanks and regards
Antonio

Last edited by Antonio.Cambule (2017-02-23 09:16:14)

Offline

#2 2017-02-22 17:15:32

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [solved]: Howto process a ABScript Function with Return Result?

Hello Antonio,

Certainly the "Return" action is intented to be used in functions that requires to provide a Javascript's way of return. Normally we deal with app's variables and they are global to the application, then, you can simply set a variable from the function's code and the look at that after the function has been called.

Online

#3 2017-02-22 17:24:13

Antonio.Cambule
Member
Registered: 2017-02-19
Posts: 38

Re: [solved]: Howto process a ABScript Function with Return Result?

Thanks David.

I'm used to work with functions and results and less with global variables. As coming from an Object oriented side of programming, i usually try to minimize the use of globals. but it's also ok

Offline

#4 2017-02-22 17:27:10

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [solved]: Howto process a ABScript Function with Return Result?

Hello Antonio,

Antonio.Cambule wrote:

Thanks David.

I'm used to work with functions and results and less with global variables. As coming from an Object oriented side of programming, i usually try to minimize the use of globals. but it's also ok

Certainly we can discuss about the conveniences and inconveniences of global variables. In fact AB doesn't use global variables in the "window" scope, but they are always in right the application's scope. On the other hand we can use objects variables to stack in their variable members instead of "simple" app's variables.

Online

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.