Skip navigation
Currently Being Moderated

Help with code

Mar 3, 2013 1:12 PM

I get this eror:

 

Data binding will not be able to detect assignments to "chartData".

 

Any help?

 


<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
  xmlns:mx="library://ns.adobe.com/flex/mx"
  xmlns:s="library://ns.adobe.com/flex/spark" title="Tracking"
  creationComplete="applicationCompleteHandler(event)">

private var chartData:ArrayCollection = new ArrayCollection;

protected function udpDataHandler(event:DatagramSocketDataEvent):void
   {
    var Value:String = event.data.readUTFBytes(event.data.bytesAvailable);
   
    if(Value)
    {    
     NewValue = Value;    
     chartData.source[chartIndex] = NewValue;        
    }
    else
    {    
     NewValue = 0;    
    }
   }

</fx:Script>

<mx:series>
<mx:LineSeries id="recordGraph" cacheAsBitmap="true" cachePolicy="on"
         dataProvider="{chartData}" form="curve" lineStroke="{s3}"
         sortOnXField="false"/>
</mx:series>


</s:View>

 
Replies
  • Currently Being Moderated
    Mar 3, 2013 1:51 PM   in reply to fsoender

    You really need to get a Book on Flex, There are alot of things wrong with your code. What you mention is not an error but a warning. It mean when that variable changes the data binding framwork will not be able to show those changes. You need to tag the variable with a [Bindable] metadata. You need a good flex book.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 4, 2013 8:56 AM   in reply to fsoender

    Data binding will not be able to detect assignments to "chartData".

     

    Just a little tip, this should be your post headline, instead of "Help with code".

     

    This is what you are missing.  But, it might not be the best way to do what you want to do.

    [Binable]
    private var chartData:ArrayCollection = new ArrayCollection;
    

     

     

    You probably should find an example on the web before trying stuff and keep trying the example until you get it working yourself.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points