Oh there is a slight bug in the last example. The problem occurs for a List or a DataGrid. I was playing with both and in the example, I add strings to the dataProvider instead of objects. Flex really doesnt mind except for the fact that it makes the word "length" the column header. But even if you make the dataGrid a list, it doesnt work. Nothing works. But the documentation does say it *should* work.

http://livedocs.macromedia.com/labs/1/flex20beta3/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000502.html

Hank


On 6/24/06, hank williams <[EMAIL PROTECTED]> wrote:
Just to make things simple, I created the simples possible example of the problem.

If you take the below text, drop it into an app, You should see four "hello" items in the dataGrid. If you move your mouse over the items, you should see that only the last item in the list of 4 "hello"s highlights, no matter where the mouse is. (at least hopefully you will see it... if not that would be*really* wierd)

Regards
Hank


<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" initialize="initList()">
        
        
     <mx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;

            [Bindable]
            private var selectedChannels:ArrayCollection = new ArrayCollection();
           
            private function initList():void{
                selectedChannels.addItem("hello");
                selectedChannels.addItem("hello");
                selectedChannels.addItem ("hello");
                selectedChannels.addItem("hello");               
            }
        ]]>
    </mx:Script>

    <mx:DataGrid  id = "lChannelList"
                  x="10" y = "10"
                 dataProvider="{selectedChannels}"
                 width = "200"
                 height="150"/>
</mx:Canvas>

------------- END OF CODE ----------------------




On 6/24/06, Tim Hoff < [EMAIL PROTECTED]> wrote:
One other thought, when you say the blue selection highlight, are
you refering to the DataGrid's selectionColor that extends the
entire row?

-TH

--- In [email protected], "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
>
> Hi Johnathan,
>
> I took everything that wasn't necessary out of ResourceVO and it
seems
> to work as expected.  No focus border problems that I'm seeing.
>
> -TH
>
> package com.crap.vo {
>      import org.nevis.cairngorm.vo.ValueObject;
>      import mx.resources.Locale ;  // changed resource to resources
>
>      [Bindable]
>      public class ResourceVO implements ValueObject{
>          public var key:String = "";
>          public var value:String = "";
>          public var locale:Locale = new Locale("eng_us");
>      }
>    }
> }
>
> --- In [email protected], "hank williams" <hank777@>
wrote:
> >
> > The exact thing that Jonathan describes below in the referenced
email
> is
> > happening to me. I am attempting to programatically create a
bindable
> > arrayCollection and use that arrayCollection as a dataProvider
for a
> > dataGrid. When I do this, only the last item in the list is
selectable
> with
> > the mouse.
> >
> > I am getting the exact same results as jonathan. But according
to the
> > documentation, this is totally legal. In this thread, the theory
was
> that
> > the IUID was not there or that the object needed to be dynamic,
but
> that
> > cant relate to an ArrayCollection. This really feels like a bug
> because I
> > should be able to create and modify a bindable arrayCollection
without
> > worrying about any wierd scenario. This should be flex 101.
> >
> > So I am curious if anyone else can dynamically (not from a data
> service)
> > create a dataProvider for a dataGrid using an arrayCollection and
> select any
> > item in the list with the mouse.
> >
> > Betcha cant.
> >
> > Hank
> >
> > On 4/12/06, box110a jonathanbmail-flash@ wrote:
> > >
> > > I didn't see this in the known issues. but I'll attempt to
explain
> whats
> > > going on:
> > >
> > > Here is my Code (i'll explain the bug at the end):
> > > *DGTest.mxml
> > > *<?xml version="1.0" encoding="utf-8"?>
> > > <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
xmlns="*"
> > > layout="absolute" creationComplete="init();"
> > > pageTitle="DataGrid Test">
> > > <mx:Script>
> > > <![CDATA[
> > > import mx.utils.ArrayUtil;
> > > import com.crap.vo.ResourceVO;
> > > import mx.collections.ArrayCollection;
> > >
> > > [Bindable]
> > > public var dataObj:ArrayCollection;
> > > [Bindable]
> > > public var objTemp:ResourceVO = new ResourceVO();
> > >
> > > private function init():void{
> > > dataObj = new ArrayCollection();
> > >
> > > var obj1:ResourceVO = new ResourceVO();
> > > obj1.value = "foo-0";
> > > obj1.key = "bar-0";
> > > dataObj.addItem(obj1);
> > >
> > > var obj2:ResourceVO = new ResourceVO();
> > > obj2.value = "foo-1";
> > > obj2.key = "bar-1";
> > > dataObj.addItem(obj2);
> > >
> > > var obj3:ResourceVO = new ResourceVO();
> > > obj3.value = "foo-2";
> > > obj3.key = "bar-2";
> > > dataObj.addItem (obj3);
> > >
> > > dg.dataProvider = dataObj;
> > > }
> > >
> > > private function selectRow():void{
> > > objTemp = ResourceVO(dg.selectedItem);
> > >
> > > }
> > >
> > > ]]>
> > > </mx:Script>
> > > <mx:HBox width="90%" height="90%" horizontalCenter="0"
> > > verticalCenter="0">
> > > <mx:Panel layout="absolute" height="50%" width="50%">
> > > <mx:VBox width="443" height="90%" horizontalCenter="1"
> > > verticalCenter="-1">
> > > <mx:DataGrid id="dg" width="100%" height="100%"
> > > change="selectRow();"
> > > editable="true"
> > > >
> > > <mx:columns>
> > > <mx:DataGridColumn headerText="Key"
> > > dataField="key"/>
> > > <mx:DataGridColumn headerText="Value"
> > > dataField="value"/>
> > > </mx:columns>
> > > </mx:DataGrid>
> > > </mx:VBox>
> > > </mx:Panel>
> > > <mx:Panel width="50%" height="50%" layout="absolute">
> > > <mx:Form x="10" y="10" height="156" width="445">
> > > <mx:FormItem label="Key:">
> > > <mx:TextInput id="txtKey" data="" objTemp.key}"/>
> > > </mx:FormItem>
> > > <mx:FormItem label="Value:">
> > > <mx:TextInput id="txtValue" data=""
> > > </mx:FormItem>
> > > </mx:Form>
> > > </mx:Panel>
> > > </mx:HBox>
> > > </mx:Application>
> > >
> > > * ResourceVO.as
> > > *package com.crap.vo {
> > > import com.crap.mvc.vo.ValueObject;
> > > import mx.resource.Locale;
> > > import mx.controls.listClasses.BaseListData;
> > > import mx.controls.listClasses.IDropInListItemRenderer;
> > >
> > > import mx.data.IManaged;
> > > import mx.data.utils.Managed;
> > > import mx.core.mx_internal;
> > >
> > > [Bindable]
> > > public class ResourceVO implements ValueObject{
> > > public var key:String = "";
> > > public var value:String = "";
> > > public var locale:Locale = new Locale("eng_us");
> > >
> > >
> > > }
> > > }
> > >
> > >
> > >
> > > *The Issue:*
> > > When I view this application, it works as expected: it shows
the
> datagrid
> > > with the three items and when I click on it, the fields to the
right
> are
> > > populated. However, the blue selection highlight doesn't move
off of
> the
> > > last item in the list! I have also sceen this issue in a
ComboBox.
> > >
> > > Any ideas as to why this is happening?
> > >
> > > -JB
> > >
> > >
> > > --
> > > 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
> > >
> > >
> > > - Visit your group
> "flexcoders< http://groups.yahoo.com/group/flexcoders >"
> > > on the web.
> > >
> > > - To unsubscribe from this group, send an email to:
> > >
> [EMAIL PROTECTED]@yahoogroups\
> .com?subject=Unsubscribe>
> > >
> > > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > > Service < http://docs.yahoo.com/info/terms/>.
> > >
> > >
> > > ------------------------------
> > >
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~-->
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->

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

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/





__._,_.___

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