In general, we recommend using non-dynamic classes when possible because
they have better performance. What's your use case for wanting dynamic
addition of getter/setters?
- Gordon
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dion Mendel
Sent: Thursday, April 27, 2006 1:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex2: getters, setters and function literals
Hi all,
I can dynamically add a property with:
this.["prop1"] = 3;
I can dynamically add a function with:
this.["getProp1"] = function():int { return 3 }
How do I dynamically add a getter/setter? Is it possible in AS3?
What I'd like is a way to dynamically do the following:
private var _prop1:int;
public function get prop1():int { return _prop1 }
public function set prop1(value:int):void { _prop1 = value }
Thanks,
Dion.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.