In Flex 2.0 you should be able to override the set dataObject and do 
what you need to do there. 


--- In [email protected], "keishichi2001"
<[EMAIL PROTECTED]> wrote:
>
> Flex 2.0
> 
> A TileList definition has a CellRenderer with 'listItemRenderer'.
> This CellRenderer should be able to handle value of dataObject which
> is passed from the TileList.
> I think there are two cases to handle dataObject within CellRenderer.
> 
> (i) Direct access to a property of dataObject.
>     ie) <mx:Label text="{dataObject.abc}" />
> (ii) Handle a property of dataObject in AS function.
>     ie) public function onCreationComplete(event:Object) {
>           if (dataObject.abc == "brabra") {
>           .....
> 
> I have no issue at case (i), but case (ii).
> I got following error dialog at the time.
> 
> =======
> TypeError: Error #1010: undefined has no properties.
>       at adayCellRenderer/onCreationComplete()
>       at adayCellRenderer/___Canvas0_creationComplete()
>       at flash.events::EventDispatcher/dispatchEvent()
>       at
>
mx.core::UIComponent/mx.core:UIComponent$protected::dispatchCreationCompleteEvent()
>       at
>
mx.core::UIComponent$/http://www.macromedia.com/2005/flex/mx/internal::dispatchCreationCompleteEvents()
>       at
>
mx.managers::LayoutManager/LayoutManager$1689$private::doPhasedInstantiation()
>       at mx.core::UIComponent/UIComponent$480$private::callLaterDispatcher2()
>       at mx.core::UIComponent/UIComponent$480$private::callLaterDispatcher()
> =======
> 
> As you see, this function is invoked at creationComplete event of the
> CellRenderer, so all objects should be accessible at the time.
> Therefore i totally don't understand why i'm getting this error....
> 
> Any information will be appreciated.
> 
> Best Regards,
> Keishichi
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/WpTY2A/izNLAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to