IllegalStateException on an observable list
Tom Eugelink
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.
>
> Tom
>
>
> On 2012-10-21 22:07, Martin Klähn wrote:
>> Hi,
>>
>> 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.
>>
>> Martin
More information about the openjfx-dev
mailing list