I think what he is referring to is that within the Adobe Framework it is standard practice to declare event handlers in a component as private.
When you (as a component developer) come to subclass the component and need to override the event handling functionality of the super class you cant as the handler is private. You can add another handler for the same event which is very ineffecient but in any case you cant stop the superclass handler from executing. The only exceptions to handlers being private rule seems to me where other Adobe dev's needed to extend a particular class and bumped in to this very same issue so they went and changed that particular super class handler to protected, lucky them! i.e in the framework there are 7 private and 1 protected mouseOverHandlers, the 1 being ListBase obviously where the DataGrid and Tree developer found they needed to override it. and to be honest, as I have said before, the "report this one function/var at a time" is unworkable/impractical, it needs someone at Adobe to take a fresh look at the whole framework from the perspective of a component developer. Yeah I understand component developers represent an insignificant blip on the radar (though maybe thats because the framework is so difficult to extend in the first place) :) Cheers! TGIF! --- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote: > > > What can i do to override private methods in as3? > > Nothing. Private methods can't be overridden. > > > 5 referring methods to mouseHandler > > I'm not sure what you mean as there is no mouseHandler() method in > MenuBar. Are you talking about wanting to override mouseOverHandler (), > mouseDownHandler(), mouseUpHandler() and mouseOutHandler()? If so, > perhaps you can add additional handlers to do what you need to do > instead of subclassing these. > > If all else fails, instead of subclassing you can always cut-and- paste > to create your own version of MenuBar. > > But that's gross, so please file a bug so that we can expose the methods > that you need to override. > > - Gordon > > ________________________________ > > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Lopes > Sent: Thursday, August 02, 2007 9:14 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [email protected] > Subject: [flexcomponents] Override a private function > > > > Hello... > I'm trying to create my own component derived by menubar component, > because menubar is horrible (don't have methods to get menu root item, > only show a submenu whe user clicked in menu... horrible!). > > In menubar class exists 5 referring methods to mouseHandler, but all > these methods are private, and when I try override these methods I have > the following message: 1020: Method marked override must override to > another method. > > What can i do to override private methos in as3? > > -- > www.areacriacoes.com.br <http://www.areacriacoes.com.br> >
