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
- 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.
__,_._,___
- [flexcoders] [v2.0] ItemRenderer error: Barry Beattie
- Re: [flexcoders] [v2.0] ItemRenderer error: Brendan Meutzner
- Re: [flexcoders] [v2.0] ItemRenderer error: Brendan Meutzner
- Re: [flexcoders] [v2.0] ItemRenderer error: Barry Beattie
- Re: [flexcoders] [v2.0] ItemRenderer error: Brendan Meutzner
Reply via email to
sorry... if(value == null)
On 7/30/06, Brendan Meutzner <[EMAIL PROTECTED]> wrote: