Page 1 of 1

Question regarding solutionModel.newStyle

PostPosted: Tue Sep 17, 2013 10:34 am
by rvpm
I was expecting the following code to create a new style that could be referenced (seen in the Solution Explorer) by other applications. The style string is automatically generated by one application and is CSS format.

I can manually copy and paste the contents of the string into the Servoy's style editor but I am looking to automate the process.

Code: Select all
var s = solutionModel.newStyle("style2", styleStr);

The other applications read the name of the style from a database and use the application.overrideStyle('mystyle', 'mystyle_mace') to use the named style instead of the default style. Also is there anyway to get a list of existing

styles. Right now I test for uniqueness by asking the user for a new sytle name and trying to remove that style. If a "false" is returned, the new style name does not exist. A function such as getStyleNames() would be useful.

Having the new style appear in the Solution Explorer means that I do not have to recreate the new style or styles each time a different application is run. Is this possible in 7.1, 7.2 or 7.3?

Re: Question regarding solutionModel.newStyle

PostPosted: Mon Sep 30, 2013 8:45 am
by rgansevles
Ron,

Objects created in solution model are only created in the client that runs the code, they never show up design-time in solution explorer.

If you find a solutionModel.getStyleNames() useful, please file a feature request in the support system.

Rob