Only visible items have renderers, plus a couple off-screen ones,
regardless of how much datat there is.
 
Please use a debug version and show the entire stack trace.
 
 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Ham
Sent: Tuesday, October 02, 2007 7:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Honey, my ItemRenderer is fubar!



I have a List with a custom item renderer. Each item in the list will
have a slightly different height, and I got this working through the
generous help of Alex and Tracy on this list.

Here's the thing: My app started crashing yesterday, and I traced it
to my set data() method, which is as follows:

override public function set data(value:Object):void {


if ( value != null) {
super.data = value;
var item:FeedItem = value as FeedItem;
if ( item.linkStatus == false ) {
itemTitle.setStyle("fontStyle", "italic");
itemTitle.setStyle("color", 0x999999);

itemText.styleName = "brokenLink";
itemSource.styleName = "brokenLink";
} else {
itemTitle.setStyle("fontStyle", "normal");
itemTitle.setStyle("color", 0x333333 );

itemText.styleName = "normLink";
itemSource.styleName = "normLink";
}

dispatchEvent( new FlexEvent(FlexEvent.DATA_CHANGE) );
}

The error I get is a #1009 null object reference.

I hadn't wanted to use set data() at all, but I need to display my
items differently based on their linkStatus, and this was not working
when I did it in commitProperties(), where I thought it should go.

In a possibly related issue, what are the guidelines for how much data
a List can display? My dataProvider has 7000+ items, and the list can
toggle between different filtered views of this data. Some of the
views contain a thumbnail image, and when you toggle between a
thumbnail view and a non-thumbnail, it hangs for several seconds. Any
way to optimize this, or is my data set just too big?

Thanks as always,

OK
DAH



 

Reply via email to