Bindable interfaces with custom events
I’m surprised I haven’t stumbled across this before, but it caused a little hiccup in recent development. If you have a class with a mixture of binding tags (i.e. with and without events), but you’re programming to the interface, then making it bindable is a little unintuitive. It seems binding in interfaces doesn’t quite follow the practice of binding in classes.
Imagine you have an class called Artist with two getter/setter properties: name and age. One of them uses a standard binding tag: [Bindable], the other uses a bindable tag with a custom event: [Bindable(event="artistAgeUpdate")]. Now you may be inclined to copy the tags into your interface and paste them above the getter/setter pair, like so:
Posted: December 6th, 2008 under Uncategorized.
Comments: none