Don`t work for me. The Flash Player shows the follow error:
----------------------
TypeError: Error #1034: Type Coercion failed: cannot convert "Forms.controleTempos" to Class
at Main/::menuHandler()
at Main/__myMenuBar_change()
at flash.events::EventDispatcher/dispatchEvent()
at mx.controls::MenuBar/eventHandler()
at flash.events::EventDispatcher/dispatchEvent()
at mx.controls::Menu/dispatchEvent ()
at mx.controls::Menu/::dispatchMenuEvent()
at mx.controls::Menu/mouseUpHandler()
---------------------
And here its my app again:
<?xml version="1.0"?>
<mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" >
<mx:Script><![CDATA[
import Forms.*;
import mx.managers.PopUpManager;
private function menuHandler(oEvent:Object) {
var test = 'Forms.'[EMAIL PROTECTED];
PopUpManager.createPopUp(this, test, false);
}
]]></mx:Script>
<mx:MenuBar id="myMenuBar" labelField="@label" showRoot="false" x="0" y="30" width="100%" change="menuHandler(event)" >
<mx:XML>
<menuitem label="Home"/>
<menuitem label="Aquisição"/>
<menuItem label="Produção">
<menuItem label="Tempos de Produção" data=""
</menuItem>
<menuitem label="Qualidade" />
<menuitem label="Vendas" />
</mx:XML>
</mx:MenuBar>
<mx:Spacer />
</mx:Application>
If I use ' var test = Forms.controleTempos' it`s works perfect. But how I wanna call the window dynamically, i need to use the string generated by the XML node.
There`s a way to transform a string in a class?
Thanks.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

