I am trying to understand the concept of ObservableList and Realms. I tried to create an instance of ObservableList, for example:
public ObservableList createObservableList() {
ObservableList myObsList = new ObservableList(new ArrayList<String>(),
"test") {
};
return myObsList;
}
But when I call this method, I get:
org.eclipse.core.runtime.AssertionFailedException: null argument:Realm cannot be null
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
I understand that this is something to do, we are not set by default. But where can I find documentation on these concepts? I watched:
http://wiki.eclipse.org/JFace_Data_Binding/Observable
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/databinding/observable/list/ObservableList.html
but it contains very limited information / examples.
I also have an Eclipse EMF book, but I cannot find examples of how to use it, for example. Observablelist
Where can I find Observable rules / concepts tutorials / documentation?
I just tried:
public static ObservableList createObservableList() {
ObservableList myObsList = null;
Realm.getDefault().exec(new Runnable() {
@Override
public void run() {
myObsList = new ObservableList(new ArrayList<String>(), "test") {
};
}
});
return myObsList;
}
, myObsList . final run. ?