Our convention is that if a component dispatches a "foo" event, then it handles it with fooHandler(). If the "foo" event is dispatched by some other object, and bar is the component's reference to that object, then the component handles it with bar_fooHandler().
We don't use the onFoo() convention. This can be confusing to people coming from earlier version of Flash, where "on" functions got called automatically. Arguments and vars referencing events are named 'event' or 'fooEvent'. We shouldn't be abbreviating 'event' to 'evt' or 'e'; in general we use relatively few abbreviations. Gordon Smith Adobe Flex SDK Team -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Fabio Serra Sent: Thursday, December 20, 2007 2:36 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] AS 3 and Flex naming convention Muzak wrote: > There's a non-official guide here: > > http://blog.dclick.com.br/2007/02/13/adobe_flex_coding_guidelines_englis h/ > http://blog.dclick.com.br/wp-content/uploads/adobe-flex-coding-guideline s-v12-english.pdf > > Thank you, it is very interesting and I follow the most part of the rules. I haven't found any suggestion how to name event and event handlers. Looking at UIComponent.as it seems that events doesn't have any special suffix (eg itemSelectedEvt or itemSelectedEvent) instead of function handler that always use the "handler" suffix (eg updateCompleteHandler(event:FlexEvent):void). I don't like very much to use a suffix for event handlers because at some point they create a "semantic" friction, but if I have to do I would probably prefer to use the prefix "on" (onCreationCompletePod) as in the dashboard application: http://examples.adobe.com/flex3/labs/dashboard/srcview/index.html -- FABIO SERRA - faser(at)faser.net PGP available -- 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