Why does the combobox not work on Mac?

We are trying to get our solution designed for Windows and Mac.

But, somehow the combobox on a Mac doesn’t listen to a mouse press when the default Mac LAF isn’t used.
It seems like we either have to accept using the default LAFs on both systems, and accept the differences. Or to design everything without using the LAF (basically creating images and stuff). Both options are not favorable, especially when the problem arrives just by the combobox not working on a Mac with a different (i.e. Kunststoff) LAF.

But why does a combobox not work on a Mac with a different LAF? Has this something to do with Servoy? And isn’t there a solution or workaround available?

Sem Tuekenmez

Can you reproduce this in a simple solution? You cannot open the popup or select in the list ? Is the combo editable or not ?

If you just simply change the LAF to Kunstoff or Nimbus on a Mac, then you can’t select a new value in the combobox popup.
It does work when using the keyboard. It’s just the selecting of a new value that doesn’t work, the popup comes up and you can click on a value. But the field won’t get the clicked value.

I’ve tried every variant of a combobox: editable, non-editable, populated with table values, related values, global, etc. etc.

Sometimes one or some comboboxes do work (this happens rarely), but then it’s always not predictable.

I’ve read in some other topics on the forum that since Leopard this doesn’t work on the Mac, only with the default Mac LAF. It looks like it has something to do with Servoy, because if I download Laffy (a LAF sampler demo, not Servoy related) on a Mac, all the comboboxes in different LAFs do work correctly.

Kaptan:
If you just simply change the LAF to Kunstoff or Nimbus on a Mac, then you can’t select a new value in the combobox popup.
It does work when using the keyboard. It’s just the selecting of a new value that doesn’t work, the popup comes up and you can click on a value. But the field won’t get the clicked value.

I’ve tried every variant of a combobox: editable, non-editable, populated with table values, related values, global, etc. etc.

Sometimes one or some comboboxes do work (this happens rarely), but then it’s always not predictable.

I’ve read in some other topics on the forum that since Leopard this doesn’t work on the Mac, only with the default Mac LAF. It looks like it has something to do with Servoy, because if I download Laffy (a LAF sampler demo, not Servoy related) on a Mac, all the comboboxes in different LAFs do work correctly.

Then you should open a case (http://www.servoy.com/s) and we’ll have a look how to fix it.

Opened a case: #378366

I really hope that this can be fixed. It would be great in order to have cross-platform design consistency.

Sem,

Unfortunately, the java implementation on MacOS X does not work fully with other Look&Feel implementation than the default one.
This is a limitation in java on MacOs that cannot be fixed in Servoy.

Rob

Hi Rob,

But how can it be that other LAF demo apps do work correctly on the Mac? And would this mean that for instance the LAF from the guys at Centigrade (we were thinking about implementing this in the future) would only be working on a Windows machine?

Sem

Further investigation reveals that indeed in a simple Java example is does work, but not within Servoy. We’ll investigate further.

Paul

And the Centigrade LAF is supported on Mac and Linux as well.

Paul

I’m very happy to hear that this is being investigated :)

The current situation is a bit of a status-quo because we can’t use the default Mac, because there is no equivalent in Windows (Quaqua is not suitable because Apple does not grant the license for using Aqua on a different OS than Mac).
And all the other LAFs we’ve tried (like Nimbus) look good on both OSes but on the Mac this issue with the combobox arises (within Servoy app) which prevents us from using it right now. If it will be something that can be fixed in one of the upcoming Servoy updates then we will have confidence to use a LAF that for now works correctly in Windows. But then we will be able to support Mac in the (near) future.

Very keen to see this resolved, getting one nice looking LAF to work on both Mac and Win.

This issue is fixed and will be included in Servoy 5.2.8.

That is fantastic news! :D Thank you for fixing this quickly!

I don’t know if this is related but it seems that also copy/paste doesn’t work on Mac with a non default LAF. I tested this with Nimbus LAF and if you try to copy content from a field it doesn’t work.

Kaptan:
I don’t know if this is related but it seems that also copy/paste doesn’t work on Mac with a non default LAF. I tested this with Nimbus LAF and if you try to copy content from a field it doesn’t work.

Don’t think is related, does it work with other LAF (Metal, for example) ?

Done some testing:

Nimbus LAF: doesn’t work
Metal LAF: works
Kunststoff LAF: works
CDE/Motif LAF: works

So it seems the copying only doesn’t work with Nimbus…

Kaptan:
Done some testing:

Nimbus LAF: doesn’t work
Metal LAF: works
Kunststoff LAF: works
CDE/Motif LAF: works

So it seems the copying only doesn’t work with Nimbus…

Probably is a nimbus bug, I guess

If you want to test such things, you can launch the Swing demo application of Sun/Oracle and see how the component behaves there. If it differs for the behavior in Servoy, then most likely there is something special going in in Servoy.

The demo app can be launched from here: http://download.java.net/javadesktop/swingset3/SwingSet3.jnlp

Paul

For me copy/paste also doesn’t work in LnF=Metal on Mac.

Btw, selecting an item from a valuelist in a combobox does work by a right mouseclick or the enter key (LnF=Metal)!? But <elements.combobox.readOnly = false> in the onShow function would be ignored.