calling a global method from a form method

Can a form method call a global method?

I have a form method ShowEmployees which calls a global method GetValueListValue. When it runs I get an error “null-value is not a function”.

If I change ShowEmployees to a global method it works fine – but I really don’t want it to be a global method. Can a form method call a global method?

hmm, can you send an example of what you do?

btw calling a global method/variable must be done like globals.methodname/globals.variable

Thanks.

I didn’t know to put the globals.methodName.

Thanks!!!

TIP: In general, especially when you’re first starting out in Servoy - it’s best to just double-click objects in the object tree in the Editor. That way you’ll ALWAYS get the right syntax.

Also, you can use the type-ahead feature - type the first letter then press control + space and you’ll see the objects starting with that name.

Type: g and then hit control + space and you’ll see “globals.” then single-click that and it will insert into your code, then it will show all global items (both variables and methods). It’s an easy way to ensure syntax without having to expose all the nodes on the editor tree.

Hope this helps,

Bob Cusick

bcusick:
You can use the type-ahead feature - type the first letter then press control + space and you’ll see the objects starting with that name.

Type: g and then hit control + space and you’ll see “globals.” then single-click that and it will insert into your code, then it will show all global items (both variables and methods). It’s an easy way to ensure syntax without having to expose all the nodes on the editor tree.

Wow!! Thanks for this tip. First I’d heard of it. Will be useful.

Morley:

bcusick:
You can use the type-ahead feature - type the first letter then press control + space and you’ll see the objects starting with that name.

Type: g and then hit control + space and you’ll see “globals.” then single-click that and it will insert into your code, then it will show all global items (both variables and methods). It’s an easy way to ensure syntax without having to expose all the nodes on the editor tree.

Wow!! Thanks for this tip. First I’d heard of it. Will be useful.

Morley,

Servoy calls this feature “code completion”.

You can read more about the “code completion” feature as well as see
examples in the Servoy Developer Edition Volume 1: User’s Guide, in
chapter 9, “Methods”; in “The Servoy Editor” section 9.4.3.5 "Using the
code completion context menu, beginning on page 319 of the printed
book.

You can also find information about “code completion” in the Servoy Help
Navigator. Choose Help>Help (F1) and open the “Search” tab.
Enter “code completion” and double click on “The Servoy Editor” from the
“Topics” list. Once the topic is open, choose Tools>Find and enter “code
completion” in “Find What”. Press the “Find Next” button to highlight each
succeeding instance of “code completion” in the open topic.


Marc Norman
Servoy