but this generates a warning The method createBorder() is undefined for the type JSSolutionModel and, if I run the method, its crashes with a type error```
TypeError: Cannot find function createBorder in object SolutionModel. (/Users/john/Servoy 6.1/servoy_workspace/dbfa_global_service/globals.js#197)
Is this a bug or am I doing something terribly wrong?
MacOs X 10.8.2
java.version=1.6.0_35
Like the error says the function solutionModel.createBorder() doesn’t exists.
What you want is solutionModel.createLineBorder().
Check the solutionModel node in the SolutionExplorer tree for the other border options.
rioba:
I didn’t realize there is a borderType function at SolutionModel node. So, what’s the use of the createBorder function at the JSLabel node?
I double checked but there is no createBorder() function on any of the solutionModel classes so I am not sure where you got it from.
Anyway, the createLineBorder (and other createXXXXBorder functions) are just helper methods to produce the string that the borderType property understands.
Hi Roclasi,
the code I posted is the example generated by clicking the move sample button on the SolutionModel/JSLabel/borderType property and it is also in the Wiki page