I've done it that way before, although sometimes its better to create an
"updateAll()" method, because now all of your bindings will fire when a
single property changes since your entire class is Bindable on the same
event. Just depends on exactly what the use case is, if your class is set up
with the default Binding events you could use describeType in your updateAll
method to dispatch a PropertyChangeEvent for each property in your class.

On Fri, May 16, 2008 at 1:36 AM, Josh McDonald <[EMAIL PROTECTED]> wrote:

>   Once again, two seconds after I post, the answer pops into my head...
> And as usual, the (simple) solution for anybody trawling the list in future:
>
>     [Bindable(event="populated")]
>     public class FooBar extends EventDispatcher  {
>
> ...
>
> //Pay attention to me!
> dispatchEvent(new Event("populated"));
>
>
> -J
>
>
> On Fri, May 16, 2008 at 4:30 PM, Josh McDonald <[EMAIL PROTECTED]> wrote:
>
>> Hi guys,
>>
>> Disclaimer: this is probably a stupid question, but I've been trying to
>> figure this out for way too long!
>>
>> I've got some code that does all sorts of things to this.foo, this.bar,
>> and this.baz etc etc. At the moment I'm dispatching several standard
>> PropertyChangeEvents as I change fields. What I'd like to do is once I've
>> finished all my voodoo, dispatch a single event that says "everything needs
>> to be updated", but I need to do it to this rather than on a reference in a
>> parent object, as it's a non-visual component that has no idea where it sits
>> in the object graph.
>>
>> I *know* there's a simple solution to this...
>>
>> -J
>>
>> --
>> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>>
>> :: Josh 'G-Funk' McDonald
>> :: 0437 221 380 :: [EMAIL PROTECTED]
>
>
>
>
> --
> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>  
>

Reply via email to