Select to view content in your preferred language

Problem with InfoWindowRenderer migrating from 1.3 to 2.1, undefined property data

1045
1
10-07-2010 04:06 AM
MattiasEkström
Regular Contributor
Hello!

I need to quickly migrate a couple of my old SFV 1.3 widgets to the new 2.1 Viewer, I used the new HelloWorldWidget and added new spark components. Then I copied and pasted most of the code and went through all errors and fixed them as they occured. I think I've made almost everything working except one thing.
I have my own InfoWindowRenderer component that I use for a grahics layers which is populated by a query result. In the InfoWindowRenderer component i use {data.SOMETHING} for the text of some labels and so on to show the attributes of the current graphic.
But I'm getting the error "1120: Access of undefined property data."
If I changes the label text to a static string, everything works, except of course the infowindow doesn't show what I want... 
I don't never understood exactly were this data.SOMETHING came from when I first wrote the code, I just used code from other examples.
Am I supposed to define the property data somehow or is there another way?
What would be the best way to show meaningful infoWindows for my graphics in the new 2.1 Widget??
Tags (2)
0 Kudos
1 Reply
DasaPaddock
Esri Regular Contributor
The Spark Group doesn't implement IDataRenderer like mx.core.Container does, but you can use DataRenderer instead:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/DataRenderer.htm...
0 Kudos