JFace Data Binding/Getting started [message #561] |
Mon, 04 May 2009 17:34 |
|
Hello,
I am following the JFace Data Binding/Getting started article on
http://wiki.eclipse.org/JFace_Data_Binding/Getting_started, which was
written by Boris Bokowski and Frank Schaare. I am getting several
compilation errors in this example, but the most notable one is in
SWTObservables.java. The line import sun.security.krb5.Realm gives an
error: "Access restriction: The type Realm is not accessible due to
restriction on required library C:\Program Files\Java\jre6\lib\rt.jar."
Here are my two concerns:
1) I checked access permissions on this jar file, and everything seems
fine.
2) Why is this import specified in the first place? Can't we just use the
Realm object that was defined by Eclipse, instead of Sun??
|
|
|
|
Re: JFace Data Binding/Getting started [message #586 is a reply to message #573] |
Mon, 04 May 2009 19:45 |
|
Thank you, my mistake. However, there is still a compilation error in
SWTObservables.java. Namely, in this method:
public static ISWTObservableValue observeDelayedValue(int delay,
ISWTObservableValue observable) {
return new SWTDelayedObservableValueDecorator(Observables
.observeDelayedValue(delay, observable), observable.getWidget());
}
I get an error "The method observeDelayedValue(int, ISWTObservableValue)
is undefined for the type Observables". Any ideas?
I feel that SWTObservables should have been explained in this tutorial.
|
|
|
Re: JFace Data Binding/Getting started [message #599 is a reply to message #586] |
Mon, 04 May 2009 19:59 |
|
Ok, I resolved the last error by using the following method signature:
SWTDelayedObservableValueDecorator(observable, observable
.getWidget());
The only problem left is when I run GettingStarted I get this error:
Exception in thread "main" java.lang.Error: Unresolved compilation
problem:
The method runWithDefault(Realm, Runnable) in the type Realm is not
applicable for the arguments (Realm, new Runnable(){})
at starting.GettingStarted.main(GettingStarted.java:84)
Any suggestions about this? Thank you.
|
|
|
Re: JFace Data Binding/Getting started [message #610 is a reply to message #599] |
Mon, 04 May 2009 22:42 |
|
Hi Igor,
a JFace databinding example for the list viewer is also included in this
tutorial:
http://www.vogella.de/articles/EclipseDataBinding/article.ht ml
Best regards, Lars
Igor Ganapolsky wrote:
> Ok, I resolved the last error by using the following method signature:
> SWTDelayedObservableValueDecorator(observable, observable
> .getWidget());
>
> The only problem left is when I run GettingStarted I get this error:
> Exception in thread "main" java.lang.Error: Unresolved compilation
> problem: The method runWithDefault(Realm, Runnable) in the type
> Realm is not applicable for the arguments (Realm, new Runnable(){})
>
> at starting.GettingStarted.main(GettingStarted.java:84)
>
>
> Any suggestions about this? Thank you.
>
>
|
|
|
Re: JFace Data Binding/Getting started [message #623 is a reply to message #610] |
Mon, 04 May 2009 22:45 |
|
Sorry, I misread your post. I believed you were asking explicitly for a
JFace viewer databinding example.
The tutorial posted above can also serve as a general introduction into
JFace Databinding.
Lars Vogel wrote:
> Hi Igor,
>
> a JFace databinding example for the list viewer is also included in this
> tutorial:
>
> http://www.vogella.de/articles/EclipseDataBinding/article.ht ml
>
> Best regards, Lars
>
> Igor Ganapolsky wrote:
>> Ok, I resolved the last error by using the following method signature:
>> SWTDelayedObservableValueDecorator(observable, observable
>> .getWidget());
>>
>> The only problem left is when I run GettingStarted I get this error:
>> Exception in thread "main" java.lang.Error: Unresolved compilation
>> problem: The method runWithDefault(Realm, Runnable) in the type
>> Realm is not applicable for the arguments (Realm, new Runnable(){})
>>
>> at starting.GettingStarted.main(GettingStarted.java:84)
>>
>>
>> Any suggestions about this? Thank you.
>>
>>
|
|
|
|
Re: JFace Data Binding/Getting started [message #645 is a reply to message #634] |
Tue, 05 May 2009 22:11 |
|
Boris, here are all my imports for GettingStarted.java. Are these what
you were intending to include the tutorial?
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.eclipse.core.databinding.AggregateValidationStatus;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.BeansObservables;
import org.eclipse.core.databinding.observable.Realm;
import org.eclipse.core.databinding.observable.value.IObservableVal ue;
import org.eclipse.jface.databinding.swt.SWTObservables;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04953 seconds