From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Miranda
Sent: Friday, March 24, 2006 6:49 AM
To: [email protected]
Subject: RE: [flexcoders] Cairngorm Model binding problem
Hmmm, alright I think I
narrowed down the problem and with coffee this morning Im a bit clearer on the
problem here.
The binding is working fine (the class is bindable, so
properties dont need to be using Cairngorm 2) because Ive tested the exact
same thing with a label/string and the same ICV/datagrid and it works
.but my
chart wont update. To make it real simple, Ive got a basic
example:
<mx:DataGrid id="HourGrid" dataProvider="{model.hourData}" width="100%"
height="100%">
<mx:columns>
<mx:Array>
<mx:DataGridColumn dataField="name"
headerText="Hour"/>
<mx:DataGridColumn dataField="revenue" headerText="Revenue"
labelFunction="dataGridCurrencyFormat"
textAlign="right"/>
</mx:Array>
</mx:columns>
</mx:DataGrid
<mx:LineChart
id="salesChart" dataProvider="{model.hourData}" showDataTips="true" width="100%"
height="100%"
dataTipFunction="formatDataTipTotals">
<mx:horizontalAxis>
<mx:CategoryAxis dataProvider="{model.hourData}" categoryField="name"
name="Hour"/>
</mx:horizontalAxis>
<mx:verticalAxis>
<mx:LinearAxis minimum="0" maximum="1500" labelFunction="currencyFormat"
name="Revenue"/>
</mx:verticalAxis>
<mx:series>
<mx:Array>
<mx:LineSeries lineSegmentRenderer="mx.charts.renderers.LineRenderer"
id="current" yField="revenue" showDataEffect="{interpolate}"
>
<mx:lineStroke>
<mx:Stroke color="#000000" weight="3"/>
</mx:lineStroke>
</mx:LineSeries>
</mx:Array>
</mx:series>
</mx:LineChart>
Ive even removed everything
from the LineChart besides the horizontalAxis (removed
dataTipFunctions,verticalaxis, etc
) making it a 5 lines of code chart and it
doesnt update even the horizontalAxis. These are right next to each other in
code as shown above.
As you can see my
datagrid comes out fine, but my chart doesnt update and stays
empty....
Ideas?
_________________________________________
Jonathan
Miranda
Flexible
Master of the Web
"Try not to become a man of success, but a
man of value." - Albert Einstein
HealthGrades: Guiding
NASDAQ:
HGRD
w (720)
963-3832
c (707)
761-0868
_________________________________________
The message contains
confidential and/or legally privileged information and is intended for use only
by the indicated addressee. If you are not the named addressee you should
not disseminate, distribute, or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. E-mail transmissions cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost,
destroyed,arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents of this
message which arise as a result of e-mail transmission. If verification is
required please request a hard-copy version.
From:
Sent: Friday, March 24, 2006 2:05
AM
To:
Subject: RE: [flexcoders] Cairngorm Model
binding problem
You also need
to put [Bindable] in your ModelLocator class.
[Bindable]
public var ICV:
ICollectionView;
Benoit
Hediard
De :
Envoyé : vendredi 24 mars 2006
01:30
À :
Objet : [flexcoders] Cairngorm Model
binding problem
Alright, Im attempting to move my
little dashboard to Cairngorm and its going alright but now Ive got a real
basic problem and its stumping me I know its something little but Im stuck.
In my ModelLocator instance I have an ICollectionView. Service gets called by
event/delegates and the command responder is setting the model.ICV
correctly
.but my chart which uses dataProvider={model.ICV} isnt updating.
Now, since I made in my chart
component:
[Bindable]
public var model : ModelLocator =
ModelLocator.getInstance();
<mx:LineChart id="salesChart"
dataProvider="{model.ICV}"
.
And in my ModelLocator file:
public
var ICV: ICollectionView;
Im assuming the problem is somewhere in the
binding do I need to broadcast an update event to the Chart
.that doesnt
sound right though, anytime an ICV changes I shouldnt have to do that right?
Bah, having a headache isnt helping
.anyone got any ideas where I went
wrong?
_________________________________________
Jonathan
Miranda
Flexible Master
of the Web
"Try not to become a man of success, but a man of
value." - Albert Einstein
HealthGrades: Guiding
NASDAQ:
HGRD
w (720)
963-3832
c (707)
761-0868
_________________________________________
The message contains confidential
and/or legally privileged information and is intended for use only by the
indicated addressee. If you are not the named addressee you should not
disseminate, distribute, or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. E-mail transmissions cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost,
destroyed,arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents of this
message which arise as a result of e-mail transmission. If verification is
required please request a hard-copy
version.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

