Question regarding solutionModel.newStyle

Questions, tips and tricks and techniques for scripting in Servoy

Question regarding solutionModel.newStyle

Postby rvpm » Tue Sep 17, 2013 10:34 am

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?
Ron McBean
Realm Information Technologies
SAN Partner
rvpm
 
Posts: 41
Joined: Fri Feb 09, 2007 3:35 am
Location: Chandler, AZ

Re: Question regarding solutionModel.newStyle

Postby rgansevles » Mon Sep 30, 2013 8:45 am

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
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL


Return to Methods

Who is online

Users browsing this forum: No registered users and 5 guests