[databinding] Binding same TableViewer with 2nd input [message #20498] |
Sat, 11 July 2009 12:23  |
Eclipse User |
|
|
|
I am trying to use databinding to bind a model to a tableviewer. This
works fine using ViewerSupport.bind().
However when i try to bind the tableviewer a 2nd time (due to the input
object changing) i receive an
"assertion failed: Getter called on disposed observable message."
On initial inspection, ViewerSupport.bind() method sets the new content
provider which in turn disposes of the old one on the tableviewer which in
turn calls TableViewer.refresh(). At this point however the treeviewer is
still using the old LabelProvider and the error occurs.
Is there a correct way of doing this? If i manually set the LabelProvider
of the treeviewer to a new LabelProvider() (standard labelprovider class),
then rebind, it works fine, however i'm not sure if this will leak
listeners.
cheers
Matt
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.30351 seconds