I bet it is because you used "MenuEvent" for your click handler function
name and there is a name collision with the built-in MenuEvent. 

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of williamchadwick
Sent: Monday, January 25, 2010 1:26 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] MenuEvent causes 1046 error

 

  

I have a menu bar component

<mx:MenuBar id="mainMenu" labelField="@label" 
click="{MenuEvent(event)}"
itemClick="{MenuItemEvent(event)}">

Everytime I create a handler like this:

private function MenuItemEvent(e:MenuEvent):void

I get a "Type was not found or was not a compile-time constant: MenuEvent"

But, I've explicitly imported this event:

import mx.events.MenuEvent;

Am I going mad? What am I doing wrong? I'm using standalone Flex Builder
3.0.2.214193 on Windows XP- not the Eclipse plug-in.

Please help,

William Chadwick



Reply via email to