// instantiate a new object var myObject:Object = new Object(); // define the __resolve function myObject.__resolve = function (name) { return "Hello, world!"; }; trace (myObject.property1); // output: Hello, world! trace (myObject.property2); // output: Hello, world
________________________________ De: flexcoders@yahoogroups.com de la part de jruud68 Date: ven. 18/11/2005 19:56 À: flexcoders@yahoogroups.com Objet : [flexcoders] Defining default value for missing dynamic properties (doesNotUnderstand:)? For a dynamic object 'MyObject', does actionscript support returning a default value for missing properties? For example, I'd like: MyObject.MissingProperty to return "there is no such property", if MissingProperty has not been added to MyObject. (This would be similar to implementing a 'doesNotUndertand:' method, that would be invoked if the property is missing, in Smalltalk) Thanks, John -- 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 * Visit your group "flexcoders <http://groups.yahoo.com/group/flexcoders> " on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . ________________________________ ------------------------------------------------------------------ **STATEMENT OF CONFIDENTIALITY** This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited. We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus. ------------------------------------------------------------------ ------------------------ Yahoo! Groups Sponsor --------------------~--> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- 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 <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
<<winmail.dat>>