Item Renderer doesn't work with just one Item :-(

View: New views
7 Messages — Rating Filter:   Alert me  

Item Renderer doesn't work with just one Item :-(

by Nate Pearson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a custom item render on a bar chart.  

When my the data provider for my bar chart has just one item in it the set data function is never gets called.  Updatedisplaylist doesn't trigger and my bar chart is blank.

Any ideas?  I've had this bug for a while but I need to figure it out now.

Thanks!

-Nate


Re: Item Renderer doesn't work with just one Item :-(

by valdhor-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I seem to remember some time back (Although my memory is not what it used to be) that if returned data only has one item it is not converted to an array (ie. it is only a string). You may like to try checking to see if it is an array and, if not, coercing it to an array.

I could be completely off track here though.

--- In flexcoders@..., "Nate Pearson" <napearson99@...> wrote:

>
> I have a custom item render on a bar chart.  
>
> When my the data provider for my bar chart has just one item in it the set data function is never gets called.  Updatedisplaylist doesn't trigger and my bar chart is blank.
>
> Any ideas?  I've had this bug for a while but I need to figure it out now.
>
> Thanks!
>
> -Nate
>



Re: Item Renderer doesn't work with just one Item :-(

by Nate Pearson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well my label shows up on the graph, it just doesn't call the item renderer (I think).  I get a label on the left side and a blank graph.  I try to debug the renderer and I can't hit any break points.

Any other ideas?

--- In flexcoders@..., "valdhor" <valdhorlists@...> wrote:

>
> I seem to remember some time back (Although my memory is not what it used to be) that if returned data only has one item it is not converted to an array (ie. it is only a string). You may like to try checking to see if it is an array and, if not, coercing it to an array.
>
> I could be completely off track here though.
>
> --- In flexcoders@..., "Nate Pearson" <napearson99@> wrote:
> >
> > I have a custom item render on a bar chart.  
> >
> > When my the data provider for my bar chart has just one item in it the set data function is never gets called.  Updatedisplaylist doesn't trigger and my bar chart is blank.
> >
> > Any ideas?  I've had this bug for a while but I need to figure it out now.
> >
> > Thanks!
> >
> > -Nate
> >
>



Re: Item Renderer doesn't work with just one Item :-(

by Nate Pearson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a filter function applied.  Could that be part of it?

--- In flexcoders@..., "valdhor" <valdhorlists@...> wrote:

>
> I seem to remember some time back (Although my memory is not what it used to be) that if returned data only has one item it is not converted to an array (ie. it is only a string). You may like to try checking to see if it is an array and, if not, coercing it to an array.
>
> I could be completely off track here though.
>
> --- In flexcoders@..., "Nate Pearson" <napearson99@> wrote:
> >
> > I have a custom item render on a bar chart.  
> >
> > When my the data provider for my bar chart has just one item in it the set data function is never gets called.  Updatedisplaylist doesn't trigger and my bar chart is blank.
> >
> > Any ideas?  I've had this bug for a while but I need to figure it out now.
> >
> > Thanks!
> >
> > -Nate
> >
>



Re: Item Renderer doesn't work with just one Item :-(

by valdhor-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Possibly. Is there any way you could put together a small example of what you are seeing?

--- In flexcoders@..., "Nate Pearson" <napearson99@...> wrote:

>
> I have a filter function applied.  Could that be part of it?
>
> --- In flexcoders@..., "valdhor" <valdhorlists@> wrote:
> >
> > I seem to remember some time back (Although my memory is not what it used to be) that if returned data only has one item it is not converted to an array (ie. it is only a string). You may like to try checking to see if it is an array and, if not, coercing it to an array.
> >
> > I could be completely off track here though.
> >
> > --- In flexcoders@..., "Nate Pearson" <napearson99@> wrote:
> > >
> > > I have a custom item render on a bar chart.  
> > >
> > > When my the data provider for my bar chart has just one item in it the set data function is never gets called.  Updatedisplaylist doesn't trigger and my bar chart is blank.
> > >
> > > Any ideas?  I've had this bug for a while but I need to figure it out now.
> > >
> > > Thanks!
> > >
> > > -Nate
> > >
> >
>



RE: Re: Item Renderer doesn't work with just one Item :-(

by Tracy Spratt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you are using the default resultFormat, this behavior is an issue.  I'd
advise "e4x".  Or, test the result to see what it contains and conditionally
react.  ArrayUtil.toArray might also be helpful.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: flexcoders@... [mailto:flexcoders@...] On
Behalf Of Nate Pearson
Sent: Thursday, July 02, 2009 12:27 PM
To: flexcoders@...
Subject: [flexcoders] Re: Item Renderer doesn't work with just one Item :-(

 






I have a filter function applied. Could that be part of it?

--- In flexcoders@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
"valdhor" <valdhorlists@...> wrote:
>
> I seem to remember some time back (Although my memory is not what it used
to be) that if returned data only has one item it is not converted to an
array (ie. it is only a string). You may like to try checking to see if it
is an array and, if not, coercing it to an array.
>
> I could be completely off track here though.
>
> --- In flexcoders@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
"Nate Pearson" <napearson99@> wrote:
> >
> > I have a custom item render on a bar chart.
> >
> > When my the data provider for my bar chart has just one item in it the
set data function is never gets called. Updatedisplaylist doesn't trigger
and my bar chart is blank.
> >
> > Any ideas? I've had this bug for a while but I need to figure it out
now.
> >
> > Thanks!
> >
> > -Nate
> >
>




Re: Item Renderer doesn't work with just one Item :-(

by Nate Pearson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nope, I'm putting my data into an array collection before I bind it.

--- In flexcoders@..., "Tracy Spratt" <tracy@...> wrote:

>
> If you are using the default resultFormat, this behavior is an issue.  I'd
> advise "e4x".  Or, test the result to see what it contains and conditionally
> react.  ArrayUtil.toArray might also be helpful.
>
>  
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
>   _____  
>
> From: flexcoders@... [mailto:flexcoders@...] On
> Behalf Of Nate Pearson
> Sent: Thursday, July 02, 2009 12:27 PM
> To: flexcoders@...
> Subject: [flexcoders] Re: Item Renderer doesn't work with just one Item :-(
>
>  
>
>
>
>
>
>
> I have a filter function applied. Could that be part of it?
>
> --- In flexcoders@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
> "valdhor" <valdhorlists@> wrote:
> >
> > I seem to remember some time back (Although my memory is not what it used
> to be) that if returned data only has one item it is not converted to an
> array (ie. it is only a string). You may like to try checking to see if it
> is an array and, if not, coercing it to an array.
> >
> > I could be completely off track here though.
> >
> > --- In flexcoders@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
> "Nate Pearson" <napearson99@> wrote:
> > >
> > > I have a custom item render on a bar chart.
> > >
> > > When my the data provider for my bar chart has just one item in it the
> set data function is never gets called. Updatedisplaylist doesn't trigger
> and my bar chart is blank.
> > >
> > > Any ideas? I've had this bug for a while but I need to figure it out
> now.
> > >
> > > Thanks!
> > >
> > > -Nate
> > >
> >
>