when I open a Smart Client on Mac OS X I always have the Servoy Menue items in the Mac OS X Menubar, although this code is running in the onOpenSolution() funtion:
var vMenueBar = plugins.window.getMenuBar();
vMenueBar.setVisible(false);
Some menue items are enabled (File, Edit, View, Select) and others (Methods, Window) not. Any changes in the function or manually settings e.g. to visible(true) does not work.
On Windows (Win 7) and in Smart Client from Developer on Mac the function is working! The Menubar can be set to visible true or false in that environments, but not in a Smart Client on Mac OS X from a Servoy App Server.
Servoy Client
Version 5.2.2 -build 1002
Java version 1.6.0_22 (Mac OS X)
Mac OS X 10.6.5
Server:
Servoy version 5.2.2 -build 1002
java.version=1.6.0_20
os.name=Linux
os.version=2.6.18-028stab070.5
os.arch=i386
This may be a limitation in the macos java env since on mac menus do not attach to app windows but to the screen.
Please file a case so we can investigate this.
//show input dialog ,returns nothing when canceled
var vTypedInput = plugins.dialogs.showInputDialog('Password', 'Give password:');
if (vTypedInput == 'yoursecretpassword') {
var x = plugins.window.getMenuBar()
x.reset()
x.setVisible(true)
x.validate()
// Note: method reset only works in the smart client.
plugins.window.setStatusBarVisible(true)
controller.recreateUI()
}
This is now changed in the window plugin bundled with version 5.2.4.
Specifically on macos, the application menubar cannot be hidden, so we remove all elements instead.
When set visible again, the items will be restored.