Hi Folks - during the time it takes for our SM to start from a server (not in developer) the main form is shown with the solution title correct but between the form showing and the form being populated there is a toolbar shown, which then disappears as soon as the form is populated.
This seems not to effect the solution but is ugly to the end user.
All the toolbars are turned off in our solution onOpen event - so none should be showing at all. This seems to be a default behaviour that is not influenced until the solution has actually loaded.
The toolbars only are gone then when the solution is loaded and the onload happened because thats the time where you do it.
I do think that the next time (so after the very first start) it shouild be that then the toolbars (at least the text and edit toolbar) are hidden by default. because those are stored in the preferences.
if i do it by hand, disabling the 2 toolbars through the menu, and i close the client and then reopen it then they are gone.
So if that also works for you then the method by removing them is not correct.
JOhan, we see the same, we hide the menu, AND toolbars directly in onOpen of the login-solution
var x = plugins.window.getMenuBar()
x.setVisible(false)
plugins.window.setStatusBarVisible(false)
plugins.window.setToolBarVisible(false)
but every time, we restart or relogin the client, we first see the menu_bar AND the toolbar again, for 2 or 3 seconds…
In some releases before 5.2.6, this was not the case, but I believe Rob, fixed some other issues hiding/restoring menu’s on MAC, which maybe, why this change of behaviour!
I have disabled the code, now, and trying to hide the toolbar by hand, but something very weird is going on (testing this on Servoy 5.2.7 i1 in debug client)
I can’t hide one toolbar!!
i do hear that there is a special thing for mac users build in because they wouldn’t go away
But in the end it should result in the same behavior i think, or we way that when you go through the plugin that is not a user triggered action so that shouldn’t be stored (so then the current behavior is sort of correct)
jcompagner:
i do hear that there is a special thing for mac users build in because they wouldn’t go away
But in the end it should result in the same behavior i think, or we way that when you go through the plugin that is not a user triggered action so that shouldn’t be stored (so then the current behavior is sort of correct)
make a case for this if you want
Johan - if this is correct behaviour and we are screwing up the toolbar switch code - could you please give us the code we should apply in solution start-up to COMPLETELY stop the toolbars showing before the solution has fully loaded?
A code example you know works for you would be very useful!
no, that doesn’t seem to be possible by code currently…
Thats currently the conclusion of this thread… If the user itself does it then it seems to be stored correctly, but if you do it by code then it seems to be only gone if you run that code again.
I guess we could look into the window plugin to see why it doesn’t persist.
But i think there is a reason for this if you use the same client for multiply none related solutions…
jcompagner:
I guess we could look into the window plugin to see why it doesn’t persist.
But i think there is a reason for this if you use the same client for multiply none related solutions…
Thanks Johan - yes please look into it - its an ugly 10 to 30 seconds the end-user really does not need to see and it serves no purpose in our solution. Look’s a bit unprofessional especially when a user is first introduced to our solution.
but the first introduce will not change because your solution doesn’t run that And needs to be downloaded first
In the second install it should already be really quick (not 20 seconds…) But i guess for you it could be that your startup code does quite a lot (that same startup code that also sets the menu bar)
and because of that the menu bar only disappears after the startup code is fully done
What you could try is hide the menu bar as soon as possible (so the first line of code in your onload method) and then call application.updateUI(100)
doing application.updateUI(100) does indeed help a bit, only not the first time. (ofcourse, the solution, has to be loaded first!)
but the second time, now it shows much shorter, but still flashed for a second!!
what about two extra properties in servoy_properties file that the servoy client will take over, the first time: