Headless client and scope method

The forum to discuss the Headless version of Servoy. Web, Java and Servlet development questions can all be posted here.

Headless client and scope method

Postby steve1376656734 » Wed Jan 27, 2021 7:11 pm

Looking at the documentation for plugins.headlessclient I can see that you can queue a method to be run in the headless client using client.queueMethod(). The first argument to the function is the context for the method and the documentation says to set it to the name of a form to run a form method or null for a global method. Is it possible to run a scope method (scopes.scopeName.methodName) and if so how?

SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
Posts: 251
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote

Re: Headless client and scope method

Postby jcompagner » Wed Jan 27, 2021 7:21 pm

scopes are also "global" methods

so you can give ("scopes.somescope", "functionname")

or even (null , scopes.somescope.functionname")

because of the scopes is null we try to extract it from the method name
Johan Compagner
User avatar
Posts: 8460
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Return to Servoy Headless Client

Who is online

Users browsing this forum: No registered users and 1 guest