I use following code to get the appropriate style sheet loaded, but if I start the browser, the _7rWeb style is not taken. The code is on the onOpen() method of the main module (property normal). Any idea?
if (application.getApplicationType() == APPLICATION_TYPES.WEB_CLIENT) {
application.overrideStyle('_7rMac', '_7rWeb');
...
}
else if (application.getApplicationType() == APPLICATION_TYPES.SMART_CLIENT) {
...
}
Best regards, Robert
Servoy 5.2.16
OS X 10.8.4
Java 1.6.0_51
Safari 6.0.5
I have the _7rMac (style) set for the Login form property styleName. I changed it for a test to Default, but it still doesn’t work.
I am not sure which style you mean shouldn’t be used on the Login form?
Robert
ngervasi:
That should work, make sure that you didn’t use that style in the login form, that could prevent the override if I remember correctly.
Used another style than _7rMac on the Login form, but still the same result, i. e. does not use the desired _7rWeb style(sheet). I also can’t debug, as the debugger does not stop on a breakpoint with the Web Client. It does stop on breakpoints when using the Smart Client.
Thanks Nicola, I hope someone using the “static” code jumps in to say if it works.
BTW, can you debug a web client setting breakpoints and the debugger stops at them?
I start the web client from Servoy Developer, but wherever I set a breakpoint, the debugger does not stop. No idea what the problem could be. I also do not get any application.output() message displayed in the Eclipse Console (tab). Hmmm.
ngervasi:
Robert, you can only debug when starting the clients (web or smart) trough Servoy Developer. No matter the version.
That happens sometimes on mac after developer has been running for a while. Restart developer and as the first thing start a smart client, dunno why but that helps a lot.
I found the reason why the debugger did not work. I am starting via the launchctl mechanism the application server (java process). This is not a problem for the Smart Client debugger, but the debugger does not work under this circumstances in the Web Client. May be there is a technical reason for that (Servoy?).
The application.overrideStyle() problem is also solved. The command was not executed, as the method got quit before that statement because of a plugin.dialog error.
Thanks for all the suggestions which led me at last to try what was the problem, i. e. deactivating the automatic startup of the application server.
ngervasi:
That happens sometimes on mac after developer has been running for a while. Restart developer and as the first thing start a smart client, dunno why but that helps a lot.