Not per-property for "sealed" classes.  If you inherit from
flash.utils.Proxy, you can handle all property accesses

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Whitelock
Sent: Sunday, May 25, 2008 1:42 PM
To: [email protected]
Subject: [flexcoders] Detecting the Access of a Non-Existant Property

 

I thought I read somewhere that there is a way to intercept an
attempted access of a non-existent object property.

For example, suppose an attempt is made to access the property "bar"
of an object "foo" which is an instance of the class "FooBar" (i.e. x
= foo.bar). Further suppose that the property "bar" does not exist for
"foo". Is there a way to define a method in FooBar that will catch the
attempt to access the non-existent property "bar" and return a value
as if "bar" actually did exist?

Even something similar to the way the prototype property works would
be helpful (if it is scoped to the instance rather than to the class).
Thanks.

 

Reply via email to