Yes, you can set the url programmatically. That error usually means malformed xml. Verify your treeNav.xml file, be sure it has a single root node. Test with a stripped down xml file. Look at it in the console window or other debugger.
Trace the tree xml result with toString(), to make sure you have the node and content you think. Tracy -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ghislain Simard Sent: Sunday, September 11, 2005 12:51 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: main app build on the fly ok...here is what I tried. This could be ok if I can figured out what's wrong with my code. Error Message: HttpService Fault: A start tag had no corrresponding end tag. I initialized the app using xmlFeed.send()....starts the HTTPService <mx:HTTPService id="xmlFeed" url="XML/treeNav.xml" resultFormat="xml"/> The Script: // this resultHandler is initiated by a RemoteObject result. // Put attention on the code in the switch. around xmlFeed.url... // I am trying to change the url in the HTTPService ...can I? function resultHandler(result):Void{ projID = ecranRO.affichage.result.PROJECTID; _global.projectID = projID; projectIDTitle.text = projID; if(result.NATURE == "Neuf"){ switch(result.VOCATIONREFERENCE){ case "Hôtels et motels": xmlFeed.url = "XML/treeNavExist.xml"; xmlFeed.send(); //Is this refreshing the TreeNav break; } } } The MXML Code: <!-- This code is bound to the XML from the HTTPService --> <mx:Tree id="treeNav" dataProvider="{xmlFeed.result}"/> --- In flexcoders@yahoogroups.com, "Matt Chotin" <[EMAIL PROTECTED]> wrote: > It's pretty difficult to get the app to load data before the rest > initializes. I suppose what you could do is have your application not > instantiate anything except for the data service, have the data service > execute, and then in the result handler have it continue the > instantiation of the children. You could do this very quickly using a > ViewStack that has an empty VBox for its initial child, and then could > make it a little more robust by looking into creationPolicy="none" and > other techniques. > > > > Matt > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Ghislain Simard > Sent: Saturday, September 10, 2005 6:18 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] main app build on the fly > > > > Hi, > I am trying to get a navigation tree build on the fly based on the > content in the database. > > My problem is when and where I should put the code to get the tree > build before the app is initialize. > > 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 > <http://groups.yahoo.com/gads? t=ms&k=Web+site+design+development&w1=Web+ > site+design+development&w2=Software+design+and+development&w3=Macrome dia > +flex&w4=Software+development+best+practice&c=4&s=131&.sig=FkTWphZzV9 mFu > lU7V3u7pQ> > > Software design and development > <http://groups.yahoo.com/gads? t=ms&k=Software+design+and+development&w1= > Web+site+design+development&w2=Software+design+and+development&w3=Mac rom > edia+flex&w4=Software+development+best+practice&c=4&s=131&.sig=w0jnvy 4gy > xC04c4dhRnw6A> > > Macromedia flex > <http://groups.yahoo.com/gads? t=ms&k=Macromedia+flex&w1=Web+site+design+ > development&w2=Software+design+and+development&w3=Macromedia+flex&w4= Sof > tware+development+best+practice&c=4&s=131&.sig=XXu7YeegB3Vi- 5Qngf6oNQ> > > Software development best practice > <http://groups.yahoo.com/gads? t=ms&k=Software+development+best+practice& > w1=Web+site+design+development&w2=Software+design+and+development&w3= Mac > romedia+flex&w4=Software+development+best+practice&c=4&s=131&.sig=ZT_ U6e > _iPgXSriY_dI9nIg> > > > > > > > > ________________________________ > > YAHOO! GROUPS LINKS > > > > * Visit your group "flexcoders > <http://groups.yahoo.com/group/flexcoders> " on the web. > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED] subject=Unsubscribe> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/> . > > > > ________________________________ -- 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 ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- 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/ <*> 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/