Within my main model object I have an array that must be unique and this array is, of course linked to a panel that will show the contents of this array.
Since the array must be unique, I decided to implement some sort of “set” (extending array and overriding its push method) that will check if the added item already exists before adding it, if it already exists, it will not do anything and return.
At some point a duplicate value is added to this collection, the collection works as expected, it does not add anything to the array, however the value appears duplicated.
Is there anyway to raise these events manually, as in “if my adding succeeds raise these events”? The idea is to make this addition undoable AND of course refreshing the binding and showing the updated model.
EDIT: Would manually raising a ChangedEvent suffice?