Hello !!
I create a menu :
<mx:XML id="myMenuData">
<root>
<menuitem label="Nouvelle tâche" eventName="newTask"/>
<menuitem label="Supprimer une tâche" eventName="deleteTask"/>
<menuitem label="Editer une tâche" eventName="editTask"/>
</root>
</mx:XML>
Then, I have a function to show my menu :
private function showMenu():void
{
myMenu = Menu.createMenu(tasksDataGrid, myMenuData, false);
myMenu.labelField = "@label"
myMenu.addEventListener("itemClick", menuHandler);
// Calculate position of Menu in Application's coordinates.
/* point1.x=mybutton.x;
point1.y=mybutton.y;
point1=mybutton.localToGlobal(point1); */
myMenu.show(50,50);
}
And my problem is in the following function :
private function menuHandler(event:MenuEvent):void
{
createDialog([EMAIL PROTECTED], this,
[EMAIL PROTECTED](), 'filter');
}
Indeed, the first argument launch the following error :
TypeError: Error #1034: Echec de la contrainte de type : conversion de
[EMAIL PROTECTED] en Class impossible.
at TDBUser/::menuHandler()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.controls::Menu/dispatchEvent()
at mx.controls::Menu/mx.controls:Menu::mouseUpHandler()
Could you help me, please ?
Thanks
--
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> 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/