Thanks everyone for your replies. I must admit I¹m not yet up to speed on
all things Flex.
Nicholas mentioned combobox.dataProvider = anotherone? At runtime. From my
perspective I figured I could do it like this;
Chartdp = combobox.selectedItem; <or> linchart1.dataProvider =
combobox.selectedItem
<mx:LineChart id="linechart1" showDataTips="true"
dataProvider="{chartdp}">
The combobox would list all the available arrays. This does not work
however. (I tried selectLabel as well, changing to String and Object in AS)
Tracy mentioned about not binding directly the lastResult and use instance
variables. Yes, I do believe I am doing this correctly;
[Bindable] private var ALCTrending:ArrayCollection = new ArrayCollection();
var ALCgateway:HTTPService = new HTTPService();
ALCgateway.url = "Kit_ALC.php?method=FindAll";
ALCgateway.addEventListener(ResultEvent.RESULT, ALCresultHandler);
ALCgateway.send();
private function ALCresultHandler(e:ResultEvent):void {
ALCTrending = e.result.response.data.row; }
So, if the above is correct and I¹m not grossly overlooking something, I
believe the best solution for our specific requirements is to combine all
the tables into one. While perhaps large and not as efficient as it possibly
could be, all the data must be analyzed together anyway. Last night we
calculated it would take at least 3-5 years for a customer to populate the
database to the point where there would be a performance hit. Each customer
will have their own isolated database.
Cheers, thanks again for the help :)
--
Blair
From: Howard Fore <[EMAIL PROTECTED]>
Reply-To: <[email protected]>
Date: Thu, 21 Aug 2008 22:25:51 -0400
To: <[email protected]>
Subject: Re: [flexcoders] Re: Change dataProvider at runtime?
If you're not going to change the column names when you change
dataproviders, a third option might be to create a database view to query
against. Have the view stitch together the appropriate columns from each
table into the view's columns (probably via that Union query), then query
the view to get the data that is filled into the dataprovider. That way you
leave the complexity where it already is, in the the database, you wouldn't
need logic to switch out the dataproviders, etc.