Thanks everyone, I just decided to manipulate the data (xml) on the
server side before it reaches the app.  I didn't want to do it that way
but it seems the best way for using this custom itemrenderer.

 

________________________________

From: [email protected] [mailto:[email protected]] On Behalf Of Brandon
Alexander
Sent: 2009-05-20 8:36 AM
To: [email protected]
Subject: Re: [AFFUG Discuss] ItemRenderer causing null error issues

 

Yeah, the dataChange event is the proper one to use.  Item renderers
don't necessarily get re-created when a list changes.  Relying on
initialize, creationComplete or any of the other creation events is not
a good idea for item renderers.

 

-B

On Tue, May 19, 2009 at 5:59 PM, Scott Talsma <[email protected]>
wrote:

Can you use another event other than initialize?  Maybe
creationComplete?  I think initialize fires before the data has been
injected in.


On Tue, May 19, 2009 at 4:50 PM, Kyle Patterson
<[email protected]> wrote:
> How can you call an initialize function on an itemrenderer and not
receive a
> null error.  I need to read the data from a loaded xml file but it
appears
> that the data isn't there yet when the initialized function is called,
I
> tried to use creationComplete as well still no luck.  Here's an
example of
> what I'm trying to do, if anyone has any suggestions I would
appreciate it.
>
>
>
> <VBox xmlns:mx".... Initialize="init();">
>
> <script>
>
> <![CDATA[
>
>
>
> Private function init():void{
>
>
>
> Var myVar:Number = data.myNumber;
>
>
>
> myVar += 2;
>
>
>
> trace(myVar);
>
> }
>
>
>
> </script>
>
> ....
>
>
>
>
>
> This is basically what I'm trying to do; from the example above
"myVar" is a
> null value how can I work around this?
>
> -------------------------------------------------------------
> To unsubscribe from this list, simply email the list with unsubscribe
in the
> subject line
>
> For more info, see http://www.affug.com
> Archive @ http://www.mail-archive.com/discussion%40affug.com/
> List hosted by FusionLink
> -------------------------------------------------------------
> -------------------------------------------------------------
> To unsubscribe from this list, simply email the list with unsubscribe
in the
> subject line
>
> For more info, see http://www.affug.com
> Archive @ http://www.mail-archive.com/discussion%40affug.com/
> List hosted by FusionLink
> -------------------------------------------------------------




--
Scott Talsma
CTO, echoEleven


-------------------------------------------------------------

To unsubscribe from this list, simply email the list with unsubscribe in
the subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/

List hosted by http://www.fusionlink.com
-------------------------------------------------------------



 




-------------------------------------------------------------

To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line



For more info, see http://www.affug.com

Archive @ http://www.mail-archive.com/discussion%40affug.com/

List hosted by http://www.fusionlink.com

-------------------------------------------------------------

Reply via email to