No, source is a compile-time flag. You'll want to look into HTTPService for dynamically loading this stuff.
Matt -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Sam Sent: Thursday, December 15, 2005 1:02 PM To: [email protected] Subject: [flexcoders] data binding question Can you bind the source of a Model to a DataGrid. I have a code here for that purpose and it's giving me an error. Is there another way around this? Attach Code <mx:Script> <![CDATA[ var flag:Booleanl function test():String { if (flag) { return "holding.xml"; } else { return "holding2.xml"; } } ]]> </mx:Script> <mx:Model id="myModel" source="{test()}"/> <mx:DataGrid id="myDataGrid" dataProvider="{myModel.item}"> -- 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/2jUsvC/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/

