initDataBindings not updated in code

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

initDataBindings not updated in code

Postby codegod » Wed Oct 01, 2008 5:18 am

Hi NG,

I have the following behaviour, which in my opinion is a bug of the designer. I have two SWT-Text-fields, add a SWT-databinding for both fields. Ok, works, but when I remove one Text-field (delete) in the designer, the databinding is not removed in the code:

Code: Select all
   protected DataBindingContext initDataBindings() {
      IObservableValue projectPlanDescriptionObserveValue = BeansObservables.observeValue(projectPlan, "description");
      IObservableValue projectPlanNameObserveValue = BeansObservables.observeValue(projectPlan, "name");
      IObservableValue txtPrjPlanDescriptionTextObserveWidget = SWTObservables.observeText(txtPrjPlanDescription, SWT.Modify);
      //
      //
      DataBindingContext bindingContext = new DataBindingContext();
      //
      bindingContext.bindValue(txtProjNameTextObserveWidget, projectPlanNameObserveValue, null, null);
      bindingContext.bindValue(txtPrjPlanDescriptionTextObserveWidget, projectPlanDescriptionObserveValue, null, null);
      //
      return bindingContext;
   }


The txtProjName does not exist anymore, but the databinding for it still exists.
codegod
 
Posts: 1
Joined: Wed Oct 01, 2008 5:05 am

Re: initDataBindings not updated in code

Postby Eric Clayberg » Thu Oct 02, 2008 6:24 am

Give this a try in the latest SWT Designer build.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
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