Hi Marco, first up you have to ask yourself why you want this feature?
There may be another way to solve the problem. However, here's what I
know of your specific question...

Last time I checked (Flex 3 beta 2) there was no *official* way to
inspect the bindings on a component at runtime. However, if you create
a component with bindings and load it up at runtime, you will find
there are undocumented properties that enable you to do this. Look for
a "_watchers" array -- you will also find it helpful to keep the
generated actionscript that the Flex compiler normally throws away so
you can read how databinding is implemented.

The properties above are not part of the public API, so could change
at any time. In fact, IIRC some of the very binding properties I just
mentioned may even have been deprecated in the final Flex 3 release...
proceed with caution.

Which is why I ask what the actual problem is you are trying to solve
-- perhaps the list can help you come up with other ideas :-)

For example, your idea of overriding addEventListener is cunning --
perhaps that solution can be explored further.

Cheers,
Jules

On Tue, Dec 2, 2008 at 23:05, Marco Catunda <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a singleton class with model data provider (like cairngorm model).
>
> Some user interface components binding this model in data provider property.
>
> I didn't find out any way to detect if there is binding in this model
> or not, and
> how many bindings.
>
> The binding model works with events, so my idea was override
> addEventListener
> in singleton model to detect binding. But it don't work because the
> removeEventListener
> isn't call when component go away.
>
> Does anyone has any tips?
>
> Regards
> --
> Marco Catunda
>
> 

Reply via email to