Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » SWT not recognizing changes in focused FormField
SWT not recognizing changes in focused FormField [message #923223] Tue, 25 September 2012 18:21 Go to next message
juewe . is currently offline juewe .Friend
Messages: 3
Registered: September 2012
Junior Member
Hi,

i'm on my way to catch some first impressions on scout following the instructions in the 3.8 Tutorial Minicrm
(http://wiki.eclipse.org/Scout/Tutorial/3.8/Minicrm/Add_a_form_to_edit_the_data).

While editing (and updating) an existing record is ok unter rap and swing, it fails under swt - if one make a change to a single Formfield (in the "Edit Data" example) and click "ok" whithout moving the focus to another field.

It seems, that the FieldValue is still the old (initial) value, hence the "SAVE_NEEDED" detection result is false.

I'm not sure if this is a bug...so i start this question in here...



OSX 10.7.5
SCOUT 3.8.0.201206130843
Eclipse Juno 20120614-1722
Testet with Java 1.70_07 (64bit) and 1.60_35 (64bit)
Re: SWT not recognizing changes in focused FormField [message #923297 is a reply to message #923223] Tue, 25 September 2012 19:59 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 128
Registered: March 2010
Senior Member
Hi juewe

Unfortunately you're right, it is a bug, as you can see here https://bugs.eclipse.org/bugs/show_bug.cgi?id=372610. But only with os x, it works fine with windows.

We haven't found time yet to investigate it further, but the event handling seems to be different under mac os x and windows. Any input to solve the problem is appreciated. It may be a little tricky though...

Btw: Welcome to the forum!

Regards
Claudio

Re: SWT not recognizing changes in focused FormField [message #923321 is a reply to message #923297] Tue, 25 September 2012 20:33 Go to previous messageGo to next message
juewe . is currently offline juewe .Friend
Messages: 3
Registered: September 2012
Junior Member
Hi Claudio,

thx for welcome!

Ok, its already filed...i've searched a bit around with keywords swt an focus - didnt't found that one Wink

So it's SWT, it could be the same missbehaviour i've just seen in the Scout SDK Gui (also OSX):

- right click on StandardOutlineService (server)
- click "New Service Operation"
- entering "Operation Name" : every keystroke immediate changes the default Message "Operation Name Missing" to "Return Type Missing"
BUT
- entering then a valid Return Type did not enforce the same action (change the message & enable "Finish") ; you have to change the focus to the next field...

Perhaps the same problem or something completely different ?

ciao juewe


//edit correct button label

[Updated on: Tue, 25 September 2012 20:34]

Report message to a moderator

Re: SWT not recognizing changes in focused FormField [message #923727 is a reply to message #923321] Wed, 26 September 2012 06:26 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 118
Registered: November 2010
Senior Member
From what I know the Runtime of Scout (== Application developed with Eclipse Scout) and the SDK (== Scout Perspective/Wizard/... in Eclipse) do not share a lot of code...

You can open a second bug for the SDK: be sure to set "Component == Scout SDK".

The workarround for Bug 372610 is to press TAB in order to validate your input. It works even if you have only one field.
Re: SWT not recognizing changes in focused FormField [message #924486 is a reply to message #923297] Wed, 26 September 2012 22:21 Go to previous messageGo to next message
juewe . is currently offline juewe .Friend
Messages: 3
Registered: September 2012
Junior Member
ok, i played a liitle bit with the same project under osx and win7, looking for the reasons of https://bugs.eclipse.org/bugs/show_bug.cgi?id=372610.

Claudio, you're right estimating events:

win7:
- clicking ok in the dialoge will result in an WM_KILLFOCUS which is mapped on
- SWT.FocusOut leading to
- org.eclipse.scout.rt.ui.swt.form.fields.stringfield.SwtScoutStringField.handleSwtInputVerifier() where the
- getScoutObject().getUIFacade().setTextFromUI(text) fetch the changed string from gui into the StringField
- the later check of initialValue against currentValue will detect the new value

osX:
- clicking ok will result in window.close() , then
- DISPOSE-Event which is mapped on SWT.Dispose, catched in
- org.eclipse.scout.rt.ui.swt.basic.SwtScoutComposite.P_SwtFieldListener.handleEvent(Event)
but without any mechanism like the handleSwtInputVerifier, all changes in the field are lost.

Seemed to me, that the osx event-mechanism is principally different (surprise, surprise) - perhaps one have to treat the dispose event in osx like an LostFocus-event?

far beyond my knowledge...

ciao juewe
Re: SWT not recognizing changes in focused FormField [message #1236893 is a reply to message #924486] Tue, 28 January 2014 10:12 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 790
Registered: October 2011
Senior Member
We are happy to announce that we made some progress on bug 372610.

The fix is contained in the latest nightly build (Plug-in org.eclipse.scout.rt.ui.swt version >= 3.10.0.20140127-0950) and will be available in the next milestone build (Luna-M5 => Next week).

We would be happy to have feedback on the Mac OS X use case.
Previous Topic:User preferences implementation
Next Topic:Using the client locale in a server service
Goto Forum:
  


Current Time: Fri Nov 21 18:09:11 GMT 2014

Powered by FUDForum. Page generated in 0.03017 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software