[flexcoders] Re: Can't select an item renderer in a list
I have found out the problem : In my sub class (Highlighter) I have the following code : this.field.parent.addChild(this.bitmap); //type = Bitmap This code was in the constructor and so was called as soon as the object was created (in the CreationCompleteEvent of the Renderer) and persisted throughout all the Renderer's life This caused an instability in the List's selection system. By removing this code and putting it only when needed (and immediately removing the bitmap with parent.removechild(bitmap) then I can now select all the item on my list after a drag & drop operation or after changing my list's data provider However I have no idea why ? So if anyone can explain this phenomenon I'd be interested to know... --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > There are no additional interfaces, but as my blog points out, your > renderer must be completely data-driven and get its visual state from > calls to isItemSelected/Highlighted as renderers are recycled so the > cannot retain state > > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of icepaco33 > Sent: Tuesday, November 13, 2007 5:34 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Can't select an item renderer in a list > > > > Humble excuse Alex, > but you are not answering my question / problem. > > I have no problem with my highlight / selection showing... > My problem is that if I do drag & drop operation and if I change the > Data Provider then sometimes I can no longer select some items even > tho they are showing... > > I have found out that if I remove my Highlighter class from my > renderer then everything will work out fine (I can drag & drop and > then select any / every items in the list). > > So I was wondering if it is because my Highlighter class isn't > implementing some Interface that are necessary for a sub component of > a Renderer... > > Thanx ! > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > , "Alex Harui" wrote: > > > > The Flex classes draw highlight and selection behind the renderer, so > > any renderer with an opaque background will obscure it. Folks either > > test for isItemSelected/Highlighted and change their own background > > color, or remove the background color. You can see examples on my blog > > (blogs.adobe.com/aharui > > > > > > > > > > > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > ] On > > Behalf Of icepaco33 > > Sent: Monday, November 12, 2007 9:22 PM > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] Re: Can't select an item renderer in a list > > > > > > > > Salutations, > > I have found out the culprit. > > So first here is the code of the renderer : > > > > > > http://www.adobe.com/2006/mxml > <http://www.adobe.com/2006/mxml> > > <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > " > width="100%" > > styleName="myStyle1" verticalScrollPolicy="off" > > implements="mx.managers.IFocusManagerComponent" toolTip="{data.uid}" > > creationComplete="SentenceRendererCreationCompleteEventHandler()"> > > > > > > > > > > > > > value="false"/> > > > > > > > SentenceRendererSelectedCurrentStateChangeEventHandler() > :handler> > > > > > > > > > > > > > > > > > > > borderStyle="none" text="{data.Text}" textIndent="25" > > styleName="myStyle1" textDecoration="none" selectable="false" > > verticalScrollPolicy="off" minHeight="60"> > > > > > height="15" color="#ff"> > > > > > @Embed('Ressources/Librairie/History/Btn_S_D.swf') > Skin> > > > > > @Embed('Ressources/Librairie/History/Btn_S_U.swf') > Skin> > > > > > @Embed('Ressources/Librairie/History/Btn_S_U.swf') > > > > > > > > > > > > > > > > The problem resides in the sub components Highlighter. This component > > draws a rectangle in the back of the text. (This is someone else'
RE: [flexcoders] Re: Can't select an item renderer in a list
There are no additional interfaces, but as my blog points out, your renderer must be completely data-driven and get its visual state from calls to isItemSelected/Highlighted as renderers are recycled so the cannot retain state From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of icepaco33 Sent: Tuesday, November 13, 2007 5:34 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Can't select an item renderer in a list Humble excuse Alex, but you are not answering my question / problem. I have no problem with my highlight / selection showing... My problem is that if I do drag & drop operation and if I change the Data Provider then sometimes I can no longer select some items even tho they are showing... I have found out that if I remove my Highlighter class from my renderer then everything will work out fine (I can drag & drop and then select any / every items in the list). So I was wondering if it is because my Highlighter class isn't implementing some Interface that are necessary for a sub component of a Renderer... Thanx ! --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > The Flex classes draw highlight and selection behind the renderer, so > any renderer with an opaque background will obscure it. Folks either > test for isItemSelected/Highlighted and change their own background > color, or remove the background color. You can see examples on my blog > (blogs.adobe.com/aharui > > > > > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of icepaco33 > Sent: Monday, November 12, 2007 9:22 PM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Re: Can't select an item renderer in a list > > > > Salutations, > I have found out the culprit. > So first here is the code of the renderer : > > > http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > " width="100%" > styleName="myStyle1" verticalScrollPolicy="off" > implements="mx.managers.IFocusManagerComponent" toolTip="{data.uid}" > creationComplete="SentenceRendererCreationCompleteEventHandler()"> > > > > > > value="false"/> > > > SentenceRendererSelectedCurrentStateChangeEventHandler() :handler> > > > > > > > > > borderStyle="none" text="{data.Text}" textIndent="25" > styleName="myStyle1" textDecoration="none" selectable="false" > verticalScrollPolicy="off" minHeight="60"> > > height="15" color="#ff"> > > @Embed('Ressources/Librairie/History/Btn_S_D.swf') Skin> > > @Embed('Ressources/Librairie/History/Btn_S_U.swf') Skin> > > @Embed('Ressources/Librairie/History/Btn_S_U.swf') > > > > > > > > The problem resides in the sub components Highlighter. This component > draws a rectangle in the back of the text. (This is someone else's lib > that I modified a bit) > > Anyway if I don't refer to this sub class at all then my application > works fine. > > I believe I have to implements some Interface from Flex so that I can > use this sub class in my Renderer... > > Thanx for the help > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > , "Alex Harui" wrote: > > > > 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:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > ] On > > Behalf Of icepaco33 > > Sent: Sunday, November 11, 2007 4:04 PM > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders
[flexcoders] Re: Can't select an item renderer in a list
Hello, Nope that's not it... As I said, if you remove all the calls to the sub class Highlighter (by commenting the data setter ( override public function set data(value:Object):void ) and removing the CompleteEventHandler ( private function SentenceRendererCreationCompleteEventHandler > ():void ) then everything will work fine. (Aka you will be able to do drag & drop and then select any item in the list etc.) So the problem lies in the sub class _Highlighter. Once again my theory is that since this class is totally custom my guess is that there is an Interface that it should implements as a sub component of a renderer... thanx ! --- In flexcoders@yahoogroups.com, "yossigordin" <[EMAIL PROTECTED]> wrote: > > Hi, > > When a drag-n-drop operation is made, the data setter is not fired, > rather the data changeEvent. > I think that the problem is with your itemRenderer - you have > overriden the data setter but you didn't add an event listener for > dataChange events. > Try to add a Flex.DataChangeEvent listener that does exactly what > the setter does. > > Hope it helps > Josef > > --- In flexcoders@yahoogroups.com, "icepaco33" wrote: > > > > Humble excuse Alex, > > but you are not answering my question / problem. > > > > I have no problem with my highlight / selection showing... > > My problem is that if I do drag & drop operation and if I change > the > > Data Provider then sometimes I can no longer select some items even > > tho they are showing... > > > > I have found out that if I remove my Highlighter class from my > > renderer then everything will work out fine (I can drag & drop and > > then select any / every items in the list). > > > > So I was wondering if it is because my Highlighter class isn't > > implementing some Interface that are necessary for a sub component > of > > a Renderer... > > > > Thanx ! > > --- In flexcoders@yahoogroups.com, "Alex Harui" wrote: > > > > > > The Flex classes draw highlight and selection behind the > renderer, so > > > any renderer with an opaque background will obscure it. Folks > either > > > test for isItemSelected/Highlighted and change their own > background > > > color, or remove the background color. You can see examples on > my blog > > > (blogs.adobe.com/aharui > > > > > > > > > > > > > > > > > > From: flexcoders@yahoogroups.com > [mailto:[EMAIL PROTECTED] On > > > Behalf Of icepaco33 > > > Sent: Monday, November 12, 2007 9:22 PM > > > To: flexcoders@yahoogroups.com > > > Subject: [flexcoders] Re: Can't select an item renderer in a list > > > > > > > > > > > > Salutations, > > > I have found out the culprit. > > > So first here is the code of the renderer : > > > > > > > > > http://www.adobe.com/2006/mxml > > > <http://www.adobe.com/2006/mxml> " width="100%" > > > styleName="myStyle1" verticalScrollPolicy="off" > > > implements="mx.managers.IFocusManagerComponent" > toolTip="{data.uid}" > > > creationComplete="SentenceRendererCreationCompleteEventHandler > ()"> > > > > > > > > > value="#ff"/> > > > > > > > > > > > value="false"/> > > > > > > > > > > SentenceRendererSelectedCurrentStateChangeEventHandler() > > > :handler> > > > > > > > > > > > > value="#808080"/> > > > > > > > > > > > > > > > > > borderStyle="none" text="{data.Text}" textIndent="25" > > > styleName="myStyle1" textDecoration="none" selectable="false" > > > verticalScrollPolicy="off" minHeight="60"> > > > > > > > > height="15" color="#ff"> > > > > > > @Embed('Ressources/Librairie/History/Btn_S_D.swf') > > > Skin> > > > > > > @Embed('Ressources/Librairie/History/Btn_S_U.swf') > > > Skin> > > > > > > @Embed('Ressources/Librairie/History/Btn_S_U.swf') > > > > > > > > > > > > > > > > > > > > > > > > > The problem resides in the sub compone
[flexcoders] Re: Can't select an item renderer in a list
Hi, When a drag-n-drop operation is made, the data setter is not fired, rather the data changeEvent. I think that the problem is with your itemRenderer - you have overriden the data setter but you didn't add an event listener for dataChange events. Try to add a Flex.DataChangeEvent listener that does exactly what the setter does. Hope it helps Josef --- In flexcoders@yahoogroups.com, "icepaco33" <[EMAIL PROTECTED]> wrote: > > Humble excuse Alex, > but you are not answering my question / problem. > > I have no problem with my highlight / selection showing... > My problem is that if I do drag & drop operation and if I change the > Data Provider then sometimes I can no longer select some items even > tho they are showing... > > I have found out that if I remove my Highlighter class from my > renderer then everything will work out fine (I can drag & drop and > then select any / every items in the list). > > So I was wondering if it is because my Highlighter class isn't > implementing some Interface that are necessary for a sub component of > a Renderer... > > Thanx ! > --- In flexcoders@yahoogroups.com, "Alex Harui" wrote: > > > > The Flex classes draw highlight and selection behind the renderer, so > > any renderer with an opaque background will obscure it. Folks either > > test for isItemSelected/Highlighted and change their own background > > color, or remove the background color. You can see examples on my blog > > (blogs.adobe.com/aharui > > > > > > > > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > > Behalf Of icepaco33 > > Sent: Monday, November 12, 2007 9:22 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Re: Can't select an item renderer in a list > > > > > > > > Salutations, > > I have found out the culprit. > > So first here is the code of the renderer : > > > > > > http://www.adobe.com/2006/mxml > > <http://www.adobe.com/2006/mxml> " width="100%" > > styleName="myStyle1" verticalScrollPolicy="off" > > implements="mx.managers.IFocusManagerComponent" toolTip="{data.uid}" > > creationComplete="SentenceRendererCreationCompleteEventHandler ()"> > > > > > > > > > > > > > value="false"/> > > > > > > SentenceRendererSelectedCurrentStateChangeEventHandler() > :handler> > > > > > > > > > > > > > > > > > > > borderStyle="none" text="{data.Text}" textIndent="25" > > styleName="myStyle1" textDecoration="none" selectable="false" > > verticalScrollPolicy="off" minHeight="60"> > > > > > height="15" color="#ff"> > > > > @Embed('Ressources/Librairie/History/Btn_S_D.swf') > Skin> > > > > @Embed('Ressources/Librairie/History/Btn_S_U.swf') > Skin> > > > > @Embed('Ressources/Librairie/History/Btn_S_U.swf') > > > > > > > > > > > > > > > > The problem resides in the sub components Highlighter. This component > > draws a rectangle in the back of the text. (This is someone else's lib > > that I modified a bit) > > > > Anyway if I don't refer to this sub class at all then my application > > works fine. > > > > I believe I have to implements some Interface from Flex so that I can > > use this sub class in my Renderer... > > > > Thanx for the help > > > > --- In flexcoders@yahoogroups.com <mailto:flexcoders% 40yahoogroups.com> > > , "Alex Harui" wrote: > > > > > > 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:flexcoders% 40yahoogroups.com> > > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders% 40yahoogroups.com> > > ] On > > > Behalf Of icepaco33 > > > Sent: Sunday, November 11,
[flexcoders] Re: Can't select an item renderer in a list
Humble excuse Alex, but you are not answering my question / problem. I have no problem with my highlight / selection showing... My problem is that if I do drag & drop operation and if I change the Data Provider then sometimes I can no longer select some items even tho they are showing... I have found out that if I remove my Highlighter class from my renderer then everything will work out fine (I can drag & drop and then select any / every items in the list). So I was wondering if it is because my Highlighter class isn't implementing some Interface that are necessary for a sub component of a Renderer... Thanx ! --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > The Flex classes draw highlight and selection behind the renderer, so > any renderer with an opaque background will obscure it. Folks either > test for isItemSelected/Highlighted and change their own background > color, or remove the background color. You can see examples on my blog > (blogs.adobe.com/aharui > > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of icepaco33 > Sent: Monday, November 12, 2007 9:22 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Can't select an item renderer in a list > > > > Salutations, > I have found out the culprit. > So first here is the code of the renderer : > > > http://www.adobe.com/2006/mxml > <http://www.adobe.com/2006/mxml> " width="100%" > styleName="myStyle1" verticalScrollPolicy="off" > implements="mx.managers.IFocusManagerComponent" toolTip="{data.uid}" > creationComplete="SentenceRendererCreationCompleteEventHandler()"> > > > > > > value="false"/> > > > SentenceRendererSelectedCurrentStateChangeEventHandler() :handler> > > > > > > > > > borderStyle="none" text="{data.Text}" textIndent="25" > styleName="myStyle1" textDecoration="none" selectable="false" > verticalScrollPolicy="off" minHeight="60"> > > height="15" color="#ff"> > > @Embed('Ressources/Librairie/History/Btn_S_D.swf') Skin> > > @Embed('Ressources/Librairie/History/Btn_S_U.swf') Skin> > > @Embed('Ressources/Librairie/History/Btn_S_U.swf') > > > > > > > > The problem resides in the sub components Highlighter. This component > draws a rectangle in the back of the text. (This is someone else's lib > that I modified a bit) > > Anyway if I don't refer to this sub class at all then my application > works fine. > > I believe I have to implements some Interface from Flex so that I can > use this sub class in my Renderer... > > Thanx for the help > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > , "Alex Harui" wrote: > > > > 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:flexcoders%40yahoogroups.com> > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > ] On > > Behalf Of icepaco33 > > Sent: Sunday, November 11, 2007 4:04 PM > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.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 b
RE: [flexcoders] Re: Can't select an item renderer in a list
The Flex classes draw highlight and selection behind the renderer, so any renderer with an opaque background will obscure it. Folks either test for isItemSelected/Highlighted and change their own background color, or remove the background color. You can see examples on my blog (blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of icepaco33 Sent: Monday, November 12, 2007 9:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Can't select an item renderer in a list Salutations, I have found out the culprit. So first here is the code of the renderer : http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> " width="100%" styleName="myStyle1" verticalScrollPolicy="off" implements="mx.managers.IFocusManagerComponent" toolTip="{data.uid}" creationComplete="SentenceRendererCreationCompleteEventHandler()"> SentenceRendererSelectedCurrentStateChangeEventHandler() @Embed('Ressources/Librairie/History/Btn_S_D.swf') @Embed('Ressources/Librairie/History/Btn_S_U.swf') @Embed('Ressources/Librairie/History/Btn_S_U.swf') The problem resides in the sub components Highlighter. This component draws a rectangle in the back of the text. (This is someone else's lib that I modified a bit) Anyway if I don't refer to this sub class at all then my application works fine. I believe I have to implements some Interface from Flex so that I can use this sub class in my Renderer... Thanx for the help --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > 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:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of icepaco33 > Sent: Sunday, November 11, 2007 4:04 PM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.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> <mailto:flexcoders%40yahoogroups.com> > , "Alex Harui" 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%40yahoogroups.com> > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.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> <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] Can't select an item renderer in a list > > > > > > > > Greetings everybody, > &
[flexcoders] Re: Can't select an item renderer in a list
Salutations, I have found out the culprit. So first here is the code of the renderer : http://www.adobe.com/2006/mxml"; width="100%" styleName="myStyle1" verticalScrollPolicy="off" implements="mx.managers.IFocusManagerComponent" toolTip="{data.uid}" creationComplete="SentenceRendererCreationCompleteEventHandler()"> SentenceRendererSelectedCurrentStateChangeEventHandler() @Embed('Ressources/Librairie/History/Btn_S_D.swf') @Embed('Ressources/Librairie/History/Btn_S_U.swf') @Embed('Ressources/Librairie/History/Btn_S_U.swf') The problem resides in the sub components Highlighter. This component draws a rectangle in the back of the text. (This is someone else's lib that I modified a bit) Anyway if I don't refer to this sub class at all then my application works fine. I believe I have to implements some Interface from Flex so that I can use this sub class in my Renderer... Thanx for the help --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > 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" 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) > &
RE: [flexcoders] Re: Can't select an item renderer in a list
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 >
[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, "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:[EMAIL PROTECTED] On > Behalf Of icepaco33 > Sent: Sunday, November 11, 2007 5:52 AM > To: flexcoders@yahoogroups.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 >