Child pages
  • Specification (.spec file)

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The function description in the handlers section can be just "function" or a more complex type describing the arguments and return type

Code Block
"functionName" : {
        "returns" : "string",
        "parameters" : [
            { "name" : "start", "type" : "int" },
            { "name" : "end", "type" : "int" } 
        ]
}

The signature description json for functions in the api section describes the arguments, type of call and return type:

Code Block
"functionName"         : {
        "namereturns" : "startstring",
        "parameters" : [
            { "name" :         "start", "type" : "int" },
                               } 
                               { 
                                  "name":{ "name" : "end", "type" : "int" } 
        ],
        "blockEventProcessing":            "type":"int"
                                } 
                              ]
}

The  signature description should also be like the complex function type, describing the arguments and return type 

Code Block
"functionName": {
        "returns": "string",
        "parameters":[
                                { 
                                  "name":"start",
                                  "type":"int"
                                } 
                               { 
                                  "name":"end",
                                  "type":"int"
                                } 
                              ]
}true
}

"blockEventProcessing" is optional and not needed in almost all cases. It defaults to true. When it is set to false, Servoy will expect that this API call will be long-running (so it will not time out) and at the same time it will allow other events to be handled by the event dispatcher while waiting for the return value. This is helpful for example if a component would have an API call like "askForSomeValue(customForm)" which shows a modal dialog containing a form and returns a value. That API call has to wait for the return value an indefinite amount of time without blocking other events from being dispatched.

Tags

Properties can be configured with special tags that may be interpreted by the deployment environment.

...