IllegalStateException on an observable list
tbee at tbee.org
Wed Oct 24 04:37:20 PDT 2012
This indeed was the problem. Point is; I simply used code completion on the Change class, found the getRemoved method, and used that. I figure this will be happening to a lot of people. Maybe it is user friendly to provide a small hint in the IllegalStateException's text, something like "Have you maybe forgotten to iterate over the change sets?".
On 2012-10-21 22:12, Tom Eugelink wrote:
> How blond can one be, overlooked that. Thanks.
> On 2012-10-21 22:07, Martin Klähn wrote:
>> it seems you've missed to iterate through the collected changes in that Change. if you wrap your for-loop in while(c.next()) it'll work. you can then optionally check if the change was caused by appointments being removed from the list or by something else. See http://docs.oracle.com/javafx/2/api/javafx/collections/ListChangeListener.Change.html for reference.
More information about the openjfx-dev