| 
| [DataBinding] ~Example [message #313609] | Tue, 20 March 2007 11:48  |  | 
| Eclipse User  |  |  |  |  | Hi, I'm hoping to get a simple running example of databinding.  This is the sample I downloaded from the JFace DataBinding page on Eclipse.org:
 
 package org.eclipse.example;
 
 import org.eclipse.core.databinding.DataBindingContext;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 
 public class DataBind {
 Display display=new Display();
 Shell shell=new Shell(display);
 Text text = new Text(shell, SWT.BORDER);
 // Make Person (domain model) object
 SimplePerson person = new SimplePerson("Boris", "2670 Queensview Dr",
 "Ottawa",	"Canada");
 // Bind the Person's name to the SWT Text
 DataBindingContext dbc = BindingFactory.createContext(shell);
 dbc.bind(text, new Property(person, "name"), null);
 }
 
 It's giving me an error for BindingFactory, which I cannot find. I also
 replaced Person with SimplePerson.
 
 Does anyone see a problem with the code I'm trying to implement.  I
 can't keep up with what's in the old version and what will work with 3.3
 ..  I'd like to use it with 3.2, but I believe it was said that
 databinding was for 3.3.
 
 Thanks,
 Roshan
 |  |  |  | 
|  | 
|  | 
|  | 
Powered by 
FUDForum. Page generated in 0.03258 seconds