[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: [Databinding] AssertionFailedException while disposing DataBindingContext

This is an implementation detail that should not be exposed. Would you file a bug for this?

Sebastian Paul wrote:
Hi,
I just wondered why I was getting a AssertionFailedException when calling DataBindingContext#dispose(). I'm doing this to unbind my view while it is hidden.


The exception comes from ObservableTracker#getterCalled(IObservable), which checks with Assert.isTrue(observable.getRealm().isCurrent()).

So I have make the call as follows:
dataBindingContext.getBindings().getRealm().exec(new Runnable(){
    public void run() {
        dataBindingContext.dispose();
    }
});

Why do I have to take care of this? Are there other situations where I have to regard the Realm? Any tutorials for this?

Kind regards, Sebastian