plugins.window.getMenuBar issue on Mac clients

Questions, answers, tips and ideas on Servoy Client

plugins.window.getMenuBar issue on Mac clients

Postby tgs » Tue Nov 23, 2010 2:47 pm

Hi,

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:
Code: Select all
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
Attachments
menubar_mac.png
menubar_mac.png (21.3 KiB) Viewed 7003 times
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: plugins.window.getMenuBar issue on Mac clients

Postby rgansevles » Wed Nov 24, 2010 4:24 pm

Thomas,

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.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: plugins.window.getMenuBar issue on Mac clients

Postby tgs » Wed Nov 24, 2010 6:08 pm

Ok Rob,

I filed a case ID 337764.
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: plugins.window.getMenuBar issue on Mac clients

Postby Harjo » Wed Nov 24, 2010 11:26 pm

yes, we saw this too, but there is a workaround:

Code: Select all
   var x = plugins.window.getMenuBar()
   x.setVisible(false)
   x.validate()
   x.removeAllMenus()
   x.validate()


Hope this helps
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: plugins.window.getMenuBar issue on Mac clients

Postby tgs » Thu Nov 25, 2010 12:20 am

Hi Harjo,

your workaround helps a lot. Do you also have one to show the menue manually?
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: plugins.window.getMenuBar issue on Mac clients

Postby Harjo » Thu Nov 25, 2010 12:29 am

You mean, manually, setting the menubar ON again?

yes:

Code: Select all
   //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()
   }


Hope this helps
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: plugins.window.getMenuBar issue on Mac clients

Postby tgs » Thu Nov 25, 2010 12:31 am

cool! thank you.
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: plugins.window.getMenuBar issue on Mac clients

Postby Harjo » Thu Nov 25, 2010 12:34 am

hmmm, I see this works on windows, (debug client)

but not on real MAC client......
will fiddle some more......
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: plugins.window.getMenuBar issue on Mac clients

Postby Harjo » Thu Nov 25, 2010 12:42 am

I have filed an issue in the support system for both issues (hiding & restoring the menubar on OSX)

CaseID: 337884

I hope this can make it, into 5.2.3
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: plugins.window.getMenuBar issue on Mac clients

Postby tgs » Sat Nov 27, 2010 2:47 pm

Harjo wrote:I have filed an issue in the support system for both issues (hiding & restoring the menubar on OSX)

CaseID: 337884

I hope this can make it, into 5.2.3

I have filed a case ID 337764 too for that! Better two than zero...

BTW, if the menubar items are visible, "Methods" and "Window" are not enabled. In the Smart Client I get no valuelist of this items.
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: plugins.window.getMenuBar issue on Mac clients

Postby rgansevles » Wed Dec 01, 2010 6:48 pm

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.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 11 guests