The UID's in the data, not the renderer matter.  Renderers definitely
get recycled so you can't store anything about selection in the renderer
and have to use isItemSelected to update it during updateDisplayList.

 

If you want to post a mini-example, we can take a look.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of icepaco33
Sent: Sunday, November 11, 2007 4:04 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Can't select an item renderer in a list

 

No I do not have the same problem if I use the default renderer.
I checked the UIDs in the following manner :

- Manually changing the UID of each renderer to make sure they are
unique

- Using debug mode and monitoring the UID : they are different. 

In both cases tho the behavior of this bug is exactly the same :

Behavior of the list during a drag and drop is to create 2 new renderer:

1 that represent the item being dragged which will never make it to
the list. (So that new item doesn't cause the bug)
1 that will take the place of the item that you dragged but will
contain the info of the item next to it.

That last item for whatever reason will be considerer by the list's
selection model as the last item in the list.

So while you can still see the other items in the list you can no
longer rollover / select them.

If I repopulate the list by changing the list's dataProvider then for
some reason the list will use the renderer's already there but in
reverse order. That means that the first item is selectable but none
of the following items will be.(Unless the new list is longer than the
old one which means that all the new items which will require new
renderers will then be selectable)

Hope this help clarify !

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Double check the UIDs. Try using the default renderer and see if you
> still have the problem.
> 
> 
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of icepaco33
> Sent: Sunday, November 11, 2007 5:52 AM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Can't select an item renderer in a list
> 
> 
> 
> Greetings everybody,
> I have a peculiar problem. I have a list that is rendered by a custom
> item renderer. The list allows multiple selection and also drag and
> drop operation (in order to shuffle the item around)
> 
> However when I move an item further down the list (drag & drop) then I
> can't select the items that are below the item immediately following
> the item I moved.
> 
> Also if I change the content of my data provider, I will experience
> the same thing (can't select the items except the first one)
> 
> I found out something very interesting :
> It seems that my list doesn't allow me to select items which the
> renderer is older (has been instanciated before) the previous
renderer.
> 
> Allow me to demonstrate :
> If I have the following renderers :
> 
> Renderer1
> Renderer2
> Renderer5
> Renderer3
> Renderer4
> 
> And assuming the number after 'renderer' indicates the order into
> which the renderer have been instanciated in my list then in the above
> situation I will not be able to select or rollover Renderer3 and
> Renderer4...
> 
> This I believe is the problem that happens when I do a drag & drop
> operation and or when I reload my list by changing the DataProvider...
> 
> N.B. : I use only 1 class for my renderer so all renderers are of the
> same type. I have also checked their UID and they seem to be distinct
> as far as I can tell...
> 
> Hope you guys can help cuz this is really bothering me...
> 
> Thanx for your attention !
> 
> paco
>

 

Reply via email to