> > On Fri, Apr 3, 2009 at 5:16 PM, Jeffry Houser <[email protected]> wrote: > > I spend a *LOT* of time looking through the language reference for classes > that I use. Especially when trying to solve an issue.
Looks like I'm going to have to spend more time. Going through the docs. I already spend a lot of time doing that and also investigating the framework code itself. On Fri, Apr 3, 2009 at 5:12 PM, Tracy Spratt <[email protected]> wrote: > Be aware that there are only two cases where you can successfully set a > ComboBox using selectedItem. > > > > One is that the dataProvider items must be simple text or numerical values. > > > Basically if the objects equality matches then. I know that (it seemed very obvious to me). > If the dataProvider items are objects (or xml), then the item you assign > must be a **reference to an item in the dataProvider**. You can not, for > example set it to a new object with the same property values. If you > re-assign the dataProvider, then any vars holding an object will no longer > be rererences to the dataProvider. > > > Thats the use case though where I'm most often using it though. I'd imagine that should cover 90% of the use cases though after all your only setting a fixed item in a list. I mean cloning is difficult enough in flex so I'd imagine a clone of an object wouldn't usually be used for selected item. > Tracy Spratt, > > Lariat Services, development services available > ------------------------------ > > *From:* [email protected] [mailto:[email protected]] *On > Behalf Of *Wesley Acheson > *Sent:* Friday, April 03, 2009 10:48 AM > *To:* [email protected] > *Subject:* Re: [flexcoders] ComboBox SelectedItem why not inspectable. > > > > <rant> > Yes thats the conclusion that I had reached this morning when working with > it. I was just wondering if there was a reason to hide it from codeHinting. > I mean they must have put that in there for a reason? > > I can't fathom it. Not on this work iteration but on one serveral weeks > back I lost a lot of time because I believed the only way I could deal with > the comboBox was selected item. So I rewrote a lot of my classes to also > return an index. > > Now I'm mostly working with AS code rather than MXML code and I think my > grip on how things work internally is better so its not so much of an issue. > I know I should look up the language refrence for all the classes I use but > to be honest who really has time for that? > </rant> > > Thanks, Jeffry > > Regards, > Wes > > On Fri, Apr 3, 2009 at 2:32 PM, Jeffry Houser <[email protected]> wrote: > > > Looking at the ComboBox code, it looks like the "inspectable" metadata is > set to none. I assume that hides it from code hinting. > > However, despite that you should be able to use it w/ no problems in MXML > just as you would w/ ActionScript. > > > Wesley Acheson wrote: > > Hi, > > Why isn't the ComboBox.selectedItem available in MXML? It would be better > then selectedIndex in many cases. > > Regards, > > Wesley Acheson > > > > -- > > Jeffry Houser, Technical Entrepreneur > > Adobe Community Expert: http://tinyurl.com/684b5h > > http://www.twitter.com/reboog711 | Phone: 203-379-0773 > > -- > > Easy to use Interface Components for Flex Developers > > http://www.flextras.com?c=104 > > -- > > http://www.theflexshow.com > > http://www.jeffryhouser.com > > -- > > Part of the DotComIt Brain Trust > > > > > > > >

