Databinding and WindowBuilder Pro 7.1 Upgrade

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

Databinding and WindowBuilder Pro 7.1 Upgrade

Postby octavio » Sat Oct 24, 2009 1:42 pm

I had databinding working fine with code generated by the prior major release of SWT Designer.
I upgraded to WindowsBuilderPro 7.1 and the code (shown below) is now throwing an error:
org.eclipse.core.runtime.AssertionFailedException: assertion failed: Getter called on disposed observable org.eclipse.core.internal.databinding.beans.BeanObservableMapDecorator@2635ee49

This error is thrown if I call
m_bindingContext.dispose();
and re-bind immediately after with
m_bindingContext = this.initDataBindings();

I'm thinking of removing all databinding code and recreating it. Appreciate any alternatives to this approach or a link that will explain the differences in databinding between the current and older versions.

Thanks in advance...
Octavio




Code: Select all
   protected DataBindingContext initDataBindings() {
      //
      ObservableSetContentProvider customerListViewerContentProviderSet = new ObservableSetContentProvider();
      listViewer.setContentProvider(customerListViewerContentProviderSet);
      //
      IObservableMap[] customerListViewerLabelProviderMaps = BeansObservables.observeMaps(customerListViewerContentProviderSet.getKnownElements(), Customer.class, new String[]{"officialName"});
      listViewer.setLabelProvider(new ObservableMapLabelProvider(customerListViewerLabelProviderMaps));
      //
      WritableSet customerSetWritableSet = new WritableSet(customerSet, Customer.class);
      listViewer.setInput(customerSetWritableSet);
      //
      DataBindingContext bindingContext = new DataBindingContext();
      //
      //
      return bindingContext;
   }


octavio
 
Posts: 8
Joined: Sun May 04, 2008 4:50 pm

Re: Databinding and WindowBuilder Pro 7.1 Upgrade

Postby Eric Clayberg » Sat Oct 24, 2009 7:04 pm

Please send a complete test case.

Also note that the latest build is v7.2, not v7.1.
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: Google [Bot] and 2 guests