SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.
Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg
by octavio » Sun May 04, 2008 5:36 pm
I'm testing databinding using a composite that works similar to the web demo: one tableViewer and a form to update fields.
Everything works just like the web demo, except that after each keystroke while updating the text widget the caret is automatically placed in the first position, so it seems like I'm writting from right to left. The text widget has the default orientation(left-to-right).
I changed the update strategy to SWT.FocusOut rather than SWT.Modify. The table now gets updated when the text widget looses focus, which is good... but I loose the visual eye-candy of watching the table update as I type on the text widget.
My beans provide propertyChangeSupport (add/remove propertyChangeListener methods and a firePropertyChange method) and do not extend ModelObject.
My theory is that a key stroke in the text widget is updating the table. The change in the table is updating the bean. The change in the bean is triggering an update on the text widget, which causes the caret to move to position 1 (or zero).
Any thoughts on what I could be doing wrong?
Octavio
-
octavio
-
- Posts: 8
- Joined: Sun May 04, 2008 4:50 pm
by Eric Clayberg » Mon May 05, 2008 3:44 am
octavio wrote:Any thoughts on what I could be doing wrong?
No idea. Your theory may be correct, but I have never seen that happen before.
General questions about the Eclipse Data Binding API are best directed to the Eclipse newsgroups.
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
by octavio » Mon May 05, 2008 6:23 pm
OK... I called initDatabindings() twice, and that caused the problem.
By the way... I have the second edition of your book and I've learned a lot from it. RCP would have been very difficult without it. But, as you can tell, I need the third edition.
The book has been very helpful and SWT Designer is an extraordinary tool.
Your work is appreciated...
Thanks,
Octavio
-
octavio
-
- Posts: 8
- Joined: Sun May 04, 2008 4:50 pm
by Eric Clayberg » Mon May 05, 2008 7:14 pm
octavio wrote:By the way... I have the second edition of your book and I've learned a lot from it. RCP would have been very difficult without it. But, as you can tell, I need the third edition.
The third edition will be out in a few months and will target Eclipse 3.4.
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
Return to SWT Designer
Who is online
Users browsing this forum: No registered users and 2 guests