Yep, that was it. Blank line snuck in before header, propably when I copied code from another app. Now I can get to the other problems! Thanks much!
--- In flexcoders@yahoogroups.com, "Daniel Freiman" <[EMAIL PROTECTED]> wrote: > > "<?xml version="1.0" encoding="utf-8"?>" should be at the top of every MXML > file. My guess is that this line has whitespace in front of it. If that's > not doing it you should probably post the entire file. > > - Daniel Freiman > nondocs? <http://nondocs.blogspot.com/> > > On 06 Apr 2007 17:53:29 -0700, jjkruse1 <[EMAIL PROTECTED]> wrote: > > > > 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> > > > > </>; > > > > > > >