Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [EMF Forms] Text field to property binding issue on Mac OSX / Cocoa
[EMF Forms] Text field to property binding issue on Mac OSX / Cocoa [message #1718745] |
Tue, 29 December 2015 16:50 |
Erwin De Ley Messages: 52 Registered: August 2013 |
Member |
|
|
I have integrated EMF Forms with a Graphiti graphical editor, to provide configuration dialogs for diagram elements, or more correctly for the backing business/domain objects.
Versions are from Mars.1.
This works nicely on MS Windows, CentOS etc.
But on Mac OSX with SWT Cocoa, the binding from changed values in a text field towards the underlying EMF model properties is not working in the case of a form with just 1 text field, wrapped in a dialog with a close button.
While debugging on windows, we noticed that the property update is applied ( via a call to eSet() etc) based on a focus event triggered on the text field, when clicking on the dialog's close button, or navigating to it with a TAB-click.
On OSX we don't see this focus event being triggered at that moment. But when clicking outside of the RCP GUI it does happen.
Also when the form has multiple text fields (properties), the focus lost event gets triggered when jumping to the next field and the property update is done.
Is this a known issue with button focus events in EMF Forms? Or in SWT underneath?
I searched for problems for SWT and EMF Forms on OSX, but could not find something similar.
I am now considering triggering the update from the dialog closure for such cases, but that would be annoying as it would force me to develop exception logic for 1-field forms...
thanks
erwin
|
|
|
Re: [EMF Forms] Text field to property binding issue on Mac OSX / Cocoa [message #1718773 is a reply to message #1718745] |
Wed, 30 December 2015 05:11 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
Erwin,
Although perhaps not directly related, the problem reminds me of this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=383750
On 29/12/2015 5:50 PM, erwin de ley wrote:
> I have integrated EMF Forms with a Graphiti graphical editor, to
> provide configuration dialogs for diagram elements, or more correctly
> for the backing business/domain objects.
>
> Versions are from Mars.1.
>
> This works nicely on MS Windows, CentOS etc.
> But on Mac OSX with SWT Cocoa, the binding from changed values in a
> text field towards the underlying EMF model properties is not working
> in the case of a form with just 1 text field, wrapped in a dialog with
> a close button.
>
> While debugging on windows, we noticed that the property update is
> applied ( via a call to eSet() etc) based on a focus event triggered
> on the text field, when clicking on the dialog's close button, or
> navigating to it with a TAB-click.
>
> On OSX we don't see this focus event being triggered at that moment.
> But when clicking outside of the RCP GUI it does happen.
>
> Also when the form has multiple text fields (properties), the focus
> lost event gets triggered when jumping to the next field and the
> property update is done.
>
> Is this a known issue with button focus events in EMF Forms? Or in SWT
> underneath?
> I searched for problems for SWT and EMF Forms on OSX, but could not
> find something similar.
>
> I am now considering triggering the update from the dialog closure for
> such cases, but that would be annoying as it would force me to develop
> exception logic for 1-field forms...
>
> thanks
> erwin
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Re: [EMF Forms] Text field to property binding issue on Mac OSX / Cocoa [message #1718865 is a reply to message #1718782] |
Thu, 31 December 2015 10:25 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
Hi Erwin,
I agree with you and Ed that this issue is most probably causes by the
Mac SWT implementation. Except for fixing SWT itself, the only work
around I can come up with is: You implement a custom databinding
service. This service is used by controls to create the bindings and it
has the databinding context under control. When you click on OK in your
dialog, you trigger a manual update on this databinding service. It is
still a work around, but it keeps all manual things out of the forms,
meaning they are abstracted in your custom service.
If you are interested, I could come back next week with a more detailled
description on how to do that.
Best regards
Jonas
Am 30.12.2015 um 10:12 schrieb erwin de ley:
> Ed,
>
> Wow that's a nasty one indeed...
> In the meantime I also found
> https://www.eclipse.org/forums/index.php/t/696778/
> That one seems closer to what we're experiencing.
> When switching on the "Tab to move focus between all controls"-behaviour
> with the system settings mentioned there, the EMF form triggers the
> property update when TABbing to the dialog's close button. But it still
> fails when directly clicking on the button.
>
> With these two issues, it would seem that RCP form/text handling is in a
> bad shape on OSX Cocoa, most probably due to SWT issues with focus event
> handling on/in Cocoa. I find it difficult to believe that the bugzilla
> issue you mention stays open for > 3 yrs...
>
> Is this a known situation, impacting EMF Forms usage on Eclipse Mars?
> Are there known workarounds?
>
> thanks
> erwin
--
--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
| | | | | | | |
Goto Forum:
Current Time: Fri Sep 20 11:46:47 GMT 2024
Powered by FUDForum. Page generated in 0.04934 seconds
|