I'm getting an error "White space is not allowed before an XML 
Processing Instruction (<?...?>)" but the error isn't tied to a line 
of code, so I have no clue how to correct. Also, initializations 
don't appear to work, since the Alerts I've put in code don't appear. 
(Oddly, pie chart responds to events, go figure). Code follows, any 
ideas welcome!

initialize="init()"<--part of header

 

Part of code>>

 

public function init():void

                                                {

                                                                
mainPieChart.addEventListener(ChartItemEvent.ITEM_CLICK, pieClick);

                                                                
Alert.show("first try","");

                                                                
initCollections();

                                                                

                                                }

public function initCollections():void{

                                                                
menubarCollection=new XMLListcollection(menubarXML);

                                                                
Alert.show("here","");

                                                } 

 

[Bindable]

            public var menuBarCollection:XMLListCollection;

    

            private var menubarXML:XMLList =

                <>

                    <menuitem label="File">

                        <menuitem label="New..." data="fileNew"/>

                        <menuitem label="Open..." data="fileOpen"/>

                        <menuitem label="Save" data="fileSave"/>

                        <menuitem label="Save As..." 
data="fileSaveAs"/>

                    </menuitem>

                    

                </>;


Reply via email to