BudgetListener
I wish to be notified when a new budget is added/removed so I can change a Combo Box. I have added a BudgetListener and I get notified. I then want to reload the list of budgets from the BudgetList but I am getting a:
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
at java.util.ArrayList$Itr.next(Unknown Source) at
com.infinitekind.moneydance.model.BudgetList.notifyBudgetModified(BudgetList.java:206)
at
com.infinitekind.moneydance.model.AccountBook$SyncableAccounts.handleItemUpdated(AccountBook.java:1143)
I assume the notification is being fired before the change to the budgetlist has completed. How do I ensure the update has completed?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Mike Bray (Quot... on 07 Jul, 2015 09:36 AM
I was getting two notifications (BudgetAdded and BudgetListModified), just responding to BudgetListModified worked.
Mike Bray (Quote Loader Author) closed this discussion on 07 Jul, 2015 09:36 AM.
Mike Bray (Quote Loader Author) re-opened this discussion on 07 Jul, 2015 10:04 AM
2 Posted by Mike Bray (Quot... on 07 Jul, 2015 10:05 AM
A follow on question, does the BudgetModified method get called if a BudgetItem is added?
Support Staff 3 Posted by Sean Reilly on 07 Jul, 2015 10:43 AM
Hi Mike,
Yes, it should be called if an item is added, removed, or even modified. If not, it's a bug!
Thanks,
Sean
4 Posted by Mike Bray (Quot... on 07 Jul, 2015 11:03 AM
Thanks Sean, I got confused the BudgetListener seems to be a combination of BudgetList and Budget, I have added the listener to both objects and got the notification.
Mike Bray (Quote Loader Author) closed this discussion on 12 Jul, 2015 09:56 AM.