sorry... if(value == null)



On 7/30/06, Brendan Meutzner <[EMAIL PROTECTED]> wrote:
Check for if(data == null) before doing anything inside the implicit set for data...





On 7/30/06, Barry Beattie < [EMAIL PROTECTED]> wrote:

I've finally upgraded from Beta3 to current version, and of course
some things broke.

I've traced the latest problem back to a LiveDocs example** I based my
code from which generates the error:

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at MyRenderers::MyTreeItemRenderer/set data()

// Override the set method for the data property
// to set the font color and style of each node.
override public function set data(value:Object):void {
super.data = ""> if(TreeListData(super.listData).hasChildren) {
setStyle("color", 0xff0000);
setStyle("fontWeight", 'bold');
}
else {
setStyle("color", 0x000000);
setStyle("fontWeight", 'normal');
}
}

I just can't see what's wrong with it what it might be in the "Flex 2
changes between Beta 3 and Release"
(http://weblogs.macromedia.com/flexteam/archives/2006/06/flex_2_changes.cfm )
It's a bit of a show stopper at the moment...

any suggestions?
thanx

** http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000856.html



__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to