Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » [DataBinding] - SimplePropertyObservableValue.doGetValue() fires off value change event to its liste
[DataBinding] - SimplePropertyObservableValue.doGetValue() fires off value change event to its liste [message #548763] Thu, 22 July 2010 21:45
Vasanth Velusamy is currently offline Vasanth VelusamyFriend
Messages: 31
Registered: July 2009
Member
org.eclipse.core.internal.databinding.property.value.SimpleP ropertyObservableValue.doGetValue()
has a call to notifyIfChanged() which, at times, fires off value change
events to its listeners. This has undesired results when all I am
looking at is getting the current value.

Should such actions be even done in a 'getter' method?

Here is the sceario I faced the problem:

I am querying the IObservableValue for its value in an IChangeListener
used in
org.eclipse.core.databinding.observable.IObservable.addChang eListener(IChangeListener),
and I get the undesired behavior that some other databound model is
modified when I am just querying for a value.

And a possible solution, if the issue is a valid one:

I didn't look at the code too deep, but should the call to
notifyIfChanged() in SimplePropertyObservableValue.doGetValue() be
replaced by this? (If all that is needed is to keep the cached value
up-to-date)

cachedValue = property.getValue(source);


Thanks,
Vasanth
Previous Topic:Button cell in Jface table
Next Topic:Hiding top most element of CommonNavigator
Goto Forum:
  


Current Time: Fri Apr 26 15:19:52 GMT 2024

Powered by FUDForum. Page generated in 0.03825 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top