try make your VO class dynamic...

flex framework will add-in another UID.

On 3/23/06, Benoit Hediard <[EMAIL PROTECTED] > wrote:
But "uid" is a property that we already use on all our value objects.
I don't want flex to overwrite this property...
 
Is there a workaround?
 
Benoit Hediard


De : flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] De la part de Mac Martine
Envoyé : mercredi 22 mars 2006 19:32
À : flexcoders@yahoogroups.com
Objet : RE: [flexcoders] Flex2 beta2 bug - Focus does not work on lists

You need to implement IUID, because otherwise the renderers do not have unique id's.

I have an example here:

http://www.macmartine.com/blog/2006/03/binding_custom_objects_to_tile.html


From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Alisdair Mills
Sent: Wednesday, March 22, 2006 3:05 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex2 beta2 bug - Focus does not work on lists

thanks Benoit for tracking that bug down. I noticed the same thing happening with lists yesterday when moving an app over to beta 2. Was going to spend some time this afternoon looking into but you have saved me both the time and frustration :)

cheers, Al

On 22 Mar 2006, at 10:51, Benoit Hediard wrote:



There is a pretty annoying bug in the new Beta2... ;)
The mouse over and focus does not work anymore on lists, when using class
instances as items.
The focus is always on the last visible list row.

To reproduce the problem.

---------
ItemVO.as
---------
package {

public class ItemVO {
 
  public var label:String;
 
  public function ItemVO() {
   label = "";
  }

}

}

-----------------
ListFocusBug.mxml
-----------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*"
layout="vertical">
     
      <mx:Script>
        <![CDATA[
            import mx.collections.*;
           
            [Bindable]
            public var collection:ArrayCollection;
           
            public function loadWithClassInstances():void {
                  var item1:ItemVO = new ItemVO();
                  item1.label = "Item 1 (class)";
                  var item2:ItemVO = new ItemVO();
                  item2.label = "Item 2 (class)";
                  var item3:ItemVO = new ItemVO();
                  item3.label = "Item 3 (class)";
                  collection=new ArrayCollection([item1, item2, item3]);
            }
           
            public function loadWithObjects():void {
                  collection = new ArrayCollection(
                      [{label:"Item 1 (object)"},
                      {label:"Item 2 (object)"},
                      {label:"Item 3 (object)"}]);
            }
        ]]>
    </mx:Script>
   
      <mx:Button label="Load with class instances"
click="loadWithClassInstances()" />
     
      <mx:Button label="Load with objects" click="loadWithObjects()" />
     
      <mx:List id="list"
            dataProvider="{collection}"
            rowCount="5"
            width="180" />

</mx:Application>

When loaded with objects, it works.
When loaded with class instances, it does not work.

I haven't found any workaround right now...

Benoit Hediard





--
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






--
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






--
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 site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to