Dave,

Thanks!

Not sure what I was thinkin' when I used the Adobe class name MenuEvent as a
custom method name but that was the problem. An embarrassing problem to have
so publicly. But, hey, it's Monday morning!

About the coding conventions, thanks for your comments.  I work for a medium
sized corporation that does software development. We have no official
Flex/ActionScript standards, but I am following my company's published C#
standard. You may have the better standard, but you don't write my paycheck.


My apologies to those of you who didn't want to see MXML in the ActionScript
forum. Technically, my issue was on the AS3 side of things.

Thanks again,
William Chadwick

On 1/25/10, Dave Watts <[email protected]> wrote:
>
> > I'm following the example here:
> > http://livedocs.adobe.com/flex/3/langref/mx/controls/MenuBar.html
> >
> > which has almost identical code:
> >
> >            // Event handler for the MenuBar control's itemClick event.
> >            private function menuHandler(event:MenuEvent):void  {
> >            ....
> >            <mx:MenuBar labelField="@label"
> itemClick="menuHandler(event);"
> >            ....
> >
> > Although I always use just plain "e" for my parameter variable in event
> > handlers.
>
>
> In your code, you have a click handler bound to a MenuEvent function.
> There is a MenuEvent event object as well. There can be only one.
> Remove the click handler if you simply want to respond to the
> itemClick event, which has its own handler.
>
>
> > About the function name- I am following my company's C# standard which
> has
> > uppercase names for functions since my company does not have a Flex/AS3
> > coding standard. What is the convention you refer to called?
>
>
> I don't know if it has a name, other than "the convention followed by
> most AS3, Java and C# programmers". Since it's a convention, I'm not
> going to waste my time telling you it's the right way to do things, or
> that you're doing things the wrong way, but in my own opinion it does
> make things easier to follow.
>
>
> > But none of your comments seem to get at my real problem, I want to
> access
> > the label the user clicks on when they use the menu bar, but I can't use
> it
> > because.... why? My installation is corrupt? I don't understand...
>
>
> Again, I'm pretty certain that the cause of your problem is the click
> handler attached to your MenuBar.
>
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> http://training.figleaf.com/
>
> Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
> GSA Schedule, and provides the highest caliber vendor-authorized
> instruction at our training centers, online, or onsite.
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to