Any documents i should read first to understand your answer well?

-k

--- In flexcoders@yahoogroups.com, "Stacey Mulcahy" <[EMAIL PROTECTED]> wrote:
>
> No- something like this. 
> 
>  
> 
>  
> 
> <?xml version="1.0"?>
> 
> <!-renderer.mxml -->
> 
>  
> 
> <mx:VBox xmlns:mx="http://www.macromedia.com/2005/mxml";
backgroundAlpha="0"
> borderThickness="0">
> 
>    <mx:Script>
> 
>    
> 
>         <![CDATA[
> 
>         import flash.util.*;
> 
>  
> 
>             // Override the setter method. 
> 
>  
> 
>             override public function set dataObject(value:Object):Void{
> 
> 
>                 if(value != null) 
> 
>                 {// Use super to set the value in the base class. 
> 
>                     super.dataObject = value; 
> 
>                    my_icon.visible=true; 
> 
>             } else{
> 
>               my_icon.visible=false;
> 
>             }
> 
>             }
> 
>             
> 
>           
> 
>              
> 
>         ]]>
> 
>     </mx:Script>
> 
>       <mx:HBox height="16" width="100%" horizontalAlign="left">
> 
>           <mx:Image id="my_icon" source="@Embed('icon.png')"
visible="false"
> width="16"></mx:Image>
> 
>           <mx:Label htmlText="{dataObject.label}"></mx:Label>
> 
>       </mx:HBox>
> 
> </mx:VBox>
> 
>  
> 
>   _____  
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of keishichi2001
> Sent: Thursday, November 24, 2005 9:11 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Handling dataObject within a CellRenderer
> 
>  
> 
> Do you mean it's a bug?
> Any workaround that i could take?
> 
> -- Keishichi
> 
> 
> --- In flexcoders@yahoogroups.com, "bitchwhocodes" <[EMAIL PROTECTED]> wrote:
> >
> > In Flex 2.0 you should be able to override the set dataObject and do 
> > what you need to do there. 
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "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::dispatchCreationComplete
> Event()
> > >       at
> > >
> >
>
mx.core::UIComponent$/http://www.macromedia.com/2005/flex/mx/internal::dispa
> tchCreationCompleteEvents()
> > >       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
> > >
> >
> 
> 
> 
> 
> 
> 
> --
> 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
>
<http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site
>
+design+development&w2=Computer+software+development&w3=Software+design+and+
>
development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=1
> 66&.sig=L-4QTvxB_quFDtMyhrQaHQ>  site design development 
> 
> Computer
>
<http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+si
>
te+design+development&w2=Computer+software+development&w3=Software+design+an
>
d+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s
> =166&.sig=lvQjSRfQDfWudJSe1lLjHw>  software development 
> 
> Software
>
<http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+
>
site+design+development&w2=Computer+software+development&w3=Software+design+
>
and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5
> &s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>  design and development 
> 
> 
> Macromedia
>
<http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+deve
>
lopment&w2=Computer+software+development&w3=Software+design+and+development&
>
w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6n
> PIrz7_EpZI36cYzBjw>  flex 
> 
> Software
>
<http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=W
>
eb+site+design+development&w2=Computer+software+development&w3=Software+desi
>
gn+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&
> c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>  development best practice 
> 
>  
> 
>  
> 
>   _____  
> 
> YAHOO! GROUPS LINKS 
> 
>  
> 
> *      Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>   
> *      To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> 
>   
> *      Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/>  Terms of Service. 
> 
>  
> 
>   _____
>









------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/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