RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
Maybe this can help too : ' A Simple Object Inspector for Flex ' http://coenraets.com/viewarticle.jsp?articleId=83 Philippe Maegerman From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Phil MarstonSent: vendredi 1 juillet 2005 18:53To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject At 12:07 01/07/2005 -0400, you wrote:>Additional note for Daman's option 2.)>>After turning on remote-objects-debug in flex-config.xml, you'd either:>>a) Use the NetConnection Debugger.swf from the extras folder that ships>with Flex to watch AMF traffic as you did in Flash MX.That's my baby! I can at least recognise the output! ;-)>b) Turn on the gateway "Debug" level logging in>/WEB-INF/flex/gateway-config.xml and then do as Daman suggests and watch>the server console. This is the suggested way as it can show strongly>typed objects that are registered with Object.registerClass().not sure I understand but will look out for info on it.>Also note that an option 3.) would be to use an ActionScript object>dumping utility class to iterate over the returned object and print out>the object graph to the trace() flashlog.txt file or to a text component>in you movie.yes I have seen that sort of thing before, you don't know where I look for one do you?Cheers,Phil--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com -- 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" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --**STATEMENT OF CONFIDENTIALITY** This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited. We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus.--
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
If you don't know what is in an object, use a for-in loop to trace() the names and values of its properties: var p:String; for (p in o) { trace(p + ": " + o[p]); } - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Phil Marston Sent: Friday, July 01, 2005 9:05 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject Hi Tracy, What you've described is exactly where I've been looking. To be honest I'm not sure what the dataProvider looks like or what it is beyond being an 'object' - in the Flash MX IDE I could look at what was getting passed back and forth in the remoting debugger, but I'm not sure how to do that in Flex What I do know is that accessing remoteObject.call.result.items as the dataProvider appears to populate the label fields of the ComboBox (Looks like a populated comboBox as intended), but there does not appear to be a selectedItem.label nor a selectedItem.data available on selection (though selectedItem itself is an [object Object] - how do I get to see what that object and it's properties are? How can I post you a bit of the dataProvider? Cheers, Phil At 11:50 01/07/2005 -0400, you wrote: >The [Object] object thing means you are trying to look at a complex >object, which selectedItem returns. SelectedItem is not a value, as you >might expect, but rather a reference to the row/node/object in the >dataProvider that populated that particular list item. What you probably >want is a property of that object. > >What does your dataProvider look like? If you have used the default >array of objects, with "label" and "data" properties, and then your >selectedItem.data should work. Are you using a result handler and can >you debug the result of the remote object? > >Since selectedItem is an Object, you might need to cast it to the type >that your dataProvider really provides. > >Now, Combobox has a property value, about which the docs say: >value >value: Object > >The data property if it exists or the label property of the >selectedItem. > >Note again that it is an object, and your should cast it to a string or >number or whatever. > >Post a bit of your dataProvider content if you are still having trouble. > >Tracy > >-Original Message- >From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On >Behalf Of pmarstonuoa >Sent: Friday, July 01, 2005 10:26 AM >To: flexcoders@yahoogroups.com >Subject: [flexcoders] Newbie can't find selectedItem in comboBox when >dataProvider is remoteObject > >Hi All, > >Flex newbie here ;-) > >As a way of checking out Flex I'm trying to port an ImageBank app >that was built using Flash MX, AMFPHP (Remoting) and mySQL > >I've quickly got an interface up and running and I've managed to >populate a comboBox using the same remoting call that the original >comboBox uses. > >In the original, selecting an item from the kingdom comboBox would >trigger another remoting call passing the selected item as an >argument. > >The second call would result in the phylum comboBox being populated. > >I can't get it to work in Flex. > >I can populate the phylum comboBox if I pass an explicit argument, >but I just can't seem to find a way to access the 'selectedItem' from >the kingdom comboBox checking what I'm referencing I either get an >[object][object] or undefined! :-( > >I've tried various things like selectedItem.data, getSelectedItem() >etc etc > >Has anyone else done this and got an insight? I've read various bits >of documentation and searched this lists archive, but I seem to be >missing something? > >Here's a summary version of my code - any insight would be very much >appreciated. > >Cheers, > >Phil > >http://www.macromedia.com/2003/mxml"; > initialize="imagebank_ro.getCategories1.send();"> > endpoint="http://localhost/remoting/gateway.php"; > id="imagebank_ro" > source="ImageBank" > protocol="http" > showBusyCursor="true"> > > > > >{kingdoms_cb.selectedItem.label} > > > > > >... > change="imagebank_ro.getCategories2.send();" > dataProvider="{imagebank_ro.getCategories1.result.items}" /> > dataProvider="{imagebank_ro.getCategories2.result.items}" /> >... > > > > -- 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 <*> 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/
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
At 12:07 01/07/2005 -0400, you wrote: >Additional note for Daman's option 2.) > >After turning on remote-objects-debug in flex-config.xml, you'd either: > >a) Use the NetConnection Debugger.swf from the extras folder that ships >with Flex to watch AMF traffic as you did in Flash MX. That's my baby! I can at least recognise the output! ;-) >b) Turn on the gateway "Debug" level logging in >/WEB-INF/flex/gateway-config.xml and then do as Daman suggests and watch >the server console. This is the suggested way as it can show strongly >typed objects that are registered with Object.registerClass(). not sure I understand but will look out for info on it. >Also note that an option 3.) would be to use an ActionScript object >dumping utility class to iterate over the returned object and print out >the object graph to the trace() flashlog.txt file or to a text component >in you movie. yes I have seen that sort of thing before, you don't know where I look for one do you? Cheers, Phil -- 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/
Re: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
Woo hoo! :-) The Net.Connection debugger did it and no one would've guessed what the dataProvider looked like! where I had {kingdoms_cb.selectedItem.label} in my remotingObject's method . . . . . . I needed {categories1.items[kingdoms_cb.selectedIndex].KINGDOM} thanks for all the help folks as usual the whole exercise has helped get a better picture of it all anyway :-) At 14:25 01/07/2005 +, you wrote: >Hi All, > >Flex newbie here ;-) > >As a way of checking out Flex I'm trying to port an ImageBank app >that was built using Flash MX, AMFPHP (Remoting) and mySQL > >I've quickly got an interface up and running and I've managed to >populate a comboBox using the same remoting call that the original >comboBox uses. > >In the original, selecting an item from the kingdom comboBox would >trigger another remoting call passing the selected item as an >argument. > >The second call would result in the phylum comboBox being populated. > >I can't get it to work in Flex. > >I can populate the phylum comboBox if I pass an explicit argument, >but I just can't seem to find a way to access the 'selectedItem' from >the kingdom comboBox checking what I'm referencing I either get an >[object][object] or undefined! :-( > >I've tried various things like selectedItem.data, getSelectedItem() >etc etc > >Has anyone else done this and got an insight? I've read various bits >of documentation and searched this lists archive, but I seem to be >missing something? > >Here's a summary version of my code - any insight would be very much >appreciated. > >Cheers, > >Phil > >http://www.macromedia.com/2003/mxml"; > initialize="imagebank_ro.getCategories1.send();"> > endpoint="http://localhost/remoting/gateway.php"; > id="imagebank_ro" > source="ImageBank" > protocol="http" > showBusyCursor="true"> > > > > >{kingdoms_cb.selectedItem.label} > > > > > >... > change="imagebank_ro.getCategories2.send();" > dataProvider="{imagebank_ro.getCategories1.result.items}" /> > dataProvider="{imagebank_ro.getCategories2.result.items}" /> >... > -- 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/
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
Hi Tracy, What you've described is exactly where I've been looking. To be honest I'm not sure what the dataProvider looks like or what it is beyond being an 'object' - in the Flash MX IDE I could look at what was getting passed back and forth in the remoting debugger, but I'm not sure how to do that in Flex What I do know is that accessing remoteObject.call.result.items as the dataProvider appears to populate the label fields of the ComboBox (Looks like a populated comboBox as intended), but there does not appear to be a selectedItem.label nor a selectedItem.data available on selection (though selectedItem itself is an [object Object] - how do I get to see what that object and it's properties are? How can I post you a bit of the dataProvider? Cheers, Phil At 11:50 01/07/2005 -0400, you wrote: >The [Object] object thing means you are trying to look at a complex >object, which selectedItem returns. SelectedItem is not a value, as you >might expect, but rather a reference to the row/node/object in the >dataProvider that populated that particular list item. What you probably >want is a property of that object. > >What does your dataProvider look like? If you have used the default >array of objects, with "label" and "data" properties, and then your >selectedItem.data should work. Are you using a result handler and can >you debug the result of the remote object? > >Since selectedItem is an Object, you might need to cast it to the type >that your dataProvider really provides. > >Now, Combobox has a property value, about which the docs say: >value >value: Object > >The data property if it exists or the label property of the >selectedItem. > >Note again that it is an object, and your should cast it to a string or >number or whatever. > >Post a bit of your dataProvider content if you are still having trouble. > >Tracy > >-Original Message- >From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On >Behalf Of pmarstonuoa >Sent: Friday, July 01, 2005 10:26 AM >To: flexcoders@yahoogroups.com >Subject: [flexcoders] Newbie can't find selectedItem in comboBox when >dataProvider is remoteObject > >Hi All, > >Flex newbie here ;-) > >As a way of checking out Flex I'm trying to port an ImageBank app >that was built using Flash MX, AMFPHP (Remoting) and mySQL > >I've quickly got an interface up and running and I've managed to >populate a comboBox using the same remoting call that the original >comboBox uses. > >In the original, selecting an item from the kingdom comboBox would >trigger another remoting call passing the selected item as an >argument. > >The second call would result in the phylum comboBox being populated. > >I can't get it to work in Flex. > >I can populate the phylum comboBox if I pass an explicit argument, >but I just can't seem to find a way to access the 'selectedItem' from >the kingdom comboBox checking what I'm referencing I either get an >[object][object] or undefined! :-( > >I've tried various things like selectedItem.data, getSelectedItem() >etc etc > >Has anyone else done this and got an insight? I've read various bits >of documentation and searched this lists archive, but I seem to be >missing something? > >Here's a summary version of my code - any insight would be very much >appreciated. > >Cheers, > >Phil > >http://www.macromedia.com/2003/mxml"; > initialize="imagebank_ro.getCategories1.send();"> > endpoint="http://localhost/remoting/gateway.php"; > id="imagebank_ro" > source="ImageBank" > protocol="http" > showBusyCursor="true"> > > > > >{kingdoms_cb.selectedItem.label} > > > > > >... > change="imagebank_ro.getCategories2.send();" > dataProvider="{imagebank_ro.getCategories1.result.items}" /> > dataProvider="{imagebank_ro.getCategories2.result.items}" /> >... > > > > -- 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/
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
Additional note for Daman's option 2.) After turning on remote-objects-debug in flex-config.xml, you'd either: a) Use the NetConnection Debugger.swf from the extras folder that ships with Flex to watch AMF traffic as you did in Flash MX. b) Turn on the gateway "Debug" level logging in /WEB-INF/flex/gateway-config.xml and then do as Daman suggests and watch the server console. This is the suggested way as it can show strongly typed objects that are registered with Object.registerClass(). Also note that an option 3.) would be to use an ActionScript object dumping utility class to iterate over the returned object and print out the object graph to the trace() flashlog.txt file or to a text component in you movie. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dogra, Daman Sent: Friday, July 01, 2005 11:52 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject There are couple of ways I check the payloads going back and forth 1) Flex Builder IDE has the Network monitor (Last tab in the "Results" window) which does the trick. 2) You could set true in the flex-config.xml and see debug statements, including payloads, on the server console (wherever you are running the flex server). Best -Daman -- 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/
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
HI Philippe, Yes that works - when I use any of the documented examples it's fine, but I'm not absolutely clear what the structure of the dataProvider is, because it's the result object from a remoting call. All I know is that in a normal Flash MX movie I can use the object as a dataProvider for the comboBox component and I can access the selected item as selectedItem.label, but in Flex while I can use the result object as a dataProvider for the mx:ComboBox I can't access selectedItem.label It seems like Flex handles data slightly differently and I can't quite get my head round it. :-( At 16:49 01/07/2005 +0200, you wrote: I got it working fine the old school way http://www.macromedia.com/2003/mxml"> Philippe Maegerman From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of pmarstonuoa Sent: vendredi 1 juillet 2005 16:26 To: flexcoders@yahoogroups.com Subject: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject Hi All, Flex newbie here ;-) As a way of checking out Flex I'm trying to port an ImageBank app that was built using Flash MX, AMFPHP (Remoting) and mySQL I've quickly got an interface up and running and I've managed to populate a comboBox using the same remoting call that the original comboBox uses. In the original, selecting an item from the kingdom comboBox would trigger another remoting call passing the selected item as an argument. The second call would result in the phylum comboBox being populated. I can't get it to work in Flex. I can populate the phylum comboBox if I pass an explicit argument, but I just can't seem to find a way to access the 'selectedItem' from the kingdom comboBox checking what I'm referencing I either get an [object][object] or undefined! :-( I've tried various things like selectedItem.data, getSelectedItem() etc etc Has anyone else done this and got an insight? I've read various bits of documentation and searched this lists archive, but I seem to be missing something? Here's a summary version of my code - any insight would be very much appreciated. Cheers, Phil http://www.macromedia.com/2003/mxml" initialize="imagebank_ro.getCategories1.send();"> endpoint="http://localhost/remoting/gateway.php" id="imagebank_ro" source="ImageBank" protocol="http" showBusyCursor="true"> {kingdoms_cb.selectedItem.label} ... change="imagebank_ro.getCategories2.send();" dataProvider="{imagebank_ro.getCategories1.result.items}" /> dataProvider="{imagebank_ro.getCategories2.result.items}" /> ... -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com -- 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 Computer software testing Macromedia flex Development Software developer YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- **STATEMENT OF CONFIDENTIALITY** This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited. We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus. -- __ Phil Marston Learning Technologist Learning Technology Unit Edward Wright G33, University of Aberdeen, Aberdeen, AB24 3QY, UK [EMAIL PROTECTED] Tel: +44(0)1224 273329 / +44(0)7798 723660 http://www.abdn.ac.uk/diss/ltu/ __ University of Aberdeen Open Day - Tuesday 23rd August 2005 For more information visit our website http://www.abdn.ac.uk/openday or freephone 0800 027 1495 __ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
There are couple of ways I check the payloads going back and forth 1) Flex Builder IDE has the Network monitor (Last tab in the "Results" window) which does the trick. 2) You could set true in the flex-config.xml and see debug statements, including payloads, on the server console (wherever you are running the flex server). Best -Daman -Original Message- From: Phil Marston [mailto:[EMAIL PROTECTED] Sent: Friday, July 01, 2005 11:17 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject Cheers Daman, Can't seem to get that to work either. :-( I'm wondering . . .. in the Flash IDE there was a remoting debugger that would let me see what was getting passed back and forth - is there anything like that in the Flex IDE? Perhaps I need to put the remoting result into a Flex model object and use that as the dataProvider (Grasping at straws!) :-/ At 10:36 01/07/2005 -0400, you wrote: >Try "kingdoms_cb.selectedItem.value.toString()" > >-Daman > >-Original Message- >From: pmarstonuoa [mailto:[EMAIL PROTECTED] >Sent: Friday, July 01, 2005 10:26 AM >To: flexcoders@yahoogroups.com >Subject: [flexcoders] Newbie can't find selectedItem in comboBox when >dataProvider is remoteObject > > >Hi All, > >Flex newbie here ;-) > >As a way of checking out Flex I'm trying to port an ImageBank app >that was built using Flash MX, AMFPHP (Remoting) and mySQL > >I've quickly got an interface up and running and I've managed to >populate a comboBox using the same remoting call that the original >comboBox uses. > >In the original, selecting an item from the kingdom comboBox would >trigger another remoting call passing the selected item as an >argument. > >The second call would result in the phylum comboBox being populated. > >I can't get it to work in Flex. > >I can populate the phylum comboBox if I pass an explicit argument, >but I just can't seem to find a way to access the 'selectedItem' from >the kingdom comboBox checking what I'm referencing I either get an >[object][object] or undefined! :-( > >I've tried various things like selectedItem.data, getSelectedItem() >etc etc > >Has anyone else done this and got an insight? I've read various bits >of documentation and searched this lists archive, but I seem to be >missing something? > >Here's a summary version of my code - any insight would be very much >appreciated. > >Cheers, > >Phil > >http://www.macromedia.com/2003/mxml"; > initialize="imagebank_ro.getCategories1.send();"> > endpoint="http://localhost/remoting/gateway.php"; > id="imagebank_ro" > source="ImageBank" > protocol="http" > showBusyCursor="true"> > > > > >{kingdoms_cb.selectedItem.label} > > > > > >... > change="imagebank_ro.getCategories2.send();" > dataProvider="{imagebank_ro.getCategories1.result.items}" /> > dataProvider="{imagebank_ro.getCategories2.result.items}" /> >... > > > > > >-- >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 > > > > __ Phil Marston Learning Technologist Learning Technology Unit Edward Wright G33, University of Aberdeen, Aberdeen, AB24 3QY, UK [EMAIL PROTECTED] Tel: +44(0)1224 273329 / +44(0)7798 723660 http://www.abdn.ac.uk/diss/ltu/ __ University of Aberdeen Open Day - Tuesday 23rd August 2005 For more information visit our website http://www.abdn.ac.uk/openday or freephone 0800 027 1495 __ -- 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 <*> 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/
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
If you are using Flex Builder, then you can do detailed debugging. If you are using binding to handle your data, this is harder. That is the main reason I avoid using binding with data services and handle the return in a handler function. In that handler, I can use the debugger to inspect the contents of the result object, or use trace for simpler stuff. I highly recommend getting the logging to the flashlog.txt file working. There are also a couple components out there that let you examine runtime activity, search the archives for the specifics, also there is a macromedia app called FastStart that has an object inspector in it. I have not used it. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Phil Marston Sent: Friday, July 01, 2005 11:17 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject Cheers Daman, Can't seem to get that to work either. :-( I'm wondering . . .. in the Flash IDE there was a remoting debugger that would let me see what was getting passed back and forth - is there anything like that in the Flex IDE? Perhaps I need to put the remoting result into a Flex model object and use that as the dataProvider (Grasping at straws!) :-/ At 10:36 01/07/2005 -0400, you wrote: >Try "kingdoms_cb.selectedItem.value.toString()" > >-Daman > >-Original Message- >From: pmarstonuoa [mailto:[EMAIL PROTECTED] >Sent: Friday, July 01, 2005 10:26 AM >To: flexcoders@yahoogroups.com >Subject: [flexcoders] Newbie can't find selectedItem in comboBox when >dataProvider is remoteObject > > >Hi All, > >Flex newbie here ;-) > >As a way of checking out Flex I'm trying to port an ImageBank app >that was built using Flash MX, AMFPHP (Remoting) and mySQL > >I've quickly got an interface up and running and I've managed to >populate a comboBox using the same remoting call that the original >comboBox uses. > >In the original, selecting an item from the kingdom comboBox would >trigger another remoting call passing the selected item as an >argument. > >The second call would result in the phylum comboBox being populated. > >I can't get it to work in Flex. > >I can populate the phylum comboBox if I pass an explicit argument, >but I just can't seem to find a way to access the 'selectedItem' from >the kingdom comboBox checking what I'm referencing I either get an >[object][object] or undefined! :-( > >I've tried various things like selectedItem.data, getSelectedItem() >etc etc > >Has anyone else done this and got an insight? I've read various bits >of documentation and searched this lists archive, but I seem to be >missing something? > >Here's a summary version of my code - any insight would be very much >appreciated. > >Cheers, > >Phil > >http://www.macromedia.com/2003/mxml"; > initialize="imagebank_ro.getCategories1.send();"> > endpoint="http://localhost/remoting/gateway.php"; > id="imagebank_ro" > source="ImageBank" > protocol="http" > showBusyCursor="true"> > > > > >{kingdoms_cb.selectedItem.label} > > > > > >... > change="imagebank_ro.getCategories2.send();" > dataProvider="{imagebank_ro.getCategories1.result.items}" /> > dataProvider="{imagebank_ro.getCategories2.result.items}" /> >... > > > > > >-- >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 > > > > __ Phil Marston Learning Technologist Learning Technology Unit Edward Wright G33, University of Aberdeen, Aberdeen, AB24 3QY, UK [EMAIL PROTECTED] Tel: +44(0)1224 273329 / +44(0)7798 723660 http://www.abdn.ac.uk/diss/ltu/ __ University of Aberdeen Open Day - Tuesday 23rd August 2005 For more information visit our website http://www.abdn.ac.uk/openday or freephone 0800 027 1495 __ -- 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 <*> 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/
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
The [Object] object thing means you are trying to look at a complex object, which selectedItem returns. SelectedItem is not a value, as you might expect, but rather a reference to the row/node/object in the dataProvider that populated that particular list item. What you probably want is a property of that object. What does your dataProvider look like? If you have used the default array of objects, with "label" and "data" properties, and then your selectedItem.data should work. Are you using a result handler and can you debug the result of the remote object? Since selectedItem is an Object, you might need to cast it to the type that your dataProvider really provides. Now, Combobox has a property value, about which the docs say: value value: Object The data property if it exists or the label property of the selectedItem. Note again that it is an object, and your should cast it to a string or number or whatever. Post a bit of your dataProvider content if you are still having trouble. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pmarstonuoa Sent: Friday, July 01, 2005 10:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject Hi All, Flex newbie here ;-) As a way of checking out Flex I'm trying to port an ImageBank app that was built using Flash MX, AMFPHP (Remoting) and mySQL I've quickly got an interface up and running and I've managed to populate a comboBox using the same remoting call that the original comboBox uses. In the original, selecting an item from the kingdom comboBox would trigger another remoting call passing the selected item as an argument. The second call would result in the phylum comboBox being populated. I can't get it to work in Flex. I can populate the phylum comboBox if I pass an explicit argument, but I just can't seem to find a way to access the 'selectedItem' from the kingdom comboBox checking what I'm referencing I either get an [object][object] or undefined! :-( I've tried various things like selectedItem.data, getSelectedItem() etc etc Has anyone else done this and got an insight? I've read various bits of documentation and searched this lists archive, but I seem to be missing something? Here's a summary version of my code - any insight would be very much appreciated. Cheers, Phil http://www.macromedia.com/2003/mxml"; initialize="imagebank_ro.getCategories1.send();"> http://localhost/remoting/gateway.php"; id="imagebank_ro" source="ImageBank" protocol="http" showBusyCursor="true"> {kingdoms_cb.selectedItem.label} ... ... -- 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 <*> 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/
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
Cheers Daman, Can't seem to get that to work either. :-( I'm wondering . . .. in the Flash IDE there was a remoting debugger that would let me see what was getting passed back and forth - is there anything like that in the Flex IDE? Perhaps I need to put the remoting result into a Flex model object and use that as the dataProvider (Grasping at straws!) :-/ At 10:36 01/07/2005 -0400, you wrote: >Try "kingdoms_cb.selectedItem.value.toString()" > >-Daman > >-Original Message- >From: pmarstonuoa [mailto:[EMAIL PROTECTED] >Sent: Friday, July 01, 2005 10:26 AM >To: flexcoders@yahoogroups.com >Subject: [flexcoders] Newbie can't find selectedItem in comboBox when >dataProvider is remoteObject > > >Hi All, > >Flex newbie here ;-) > >As a way of checking out Flex I'm trying to port an ImageBank app >that was built using Flash MX, AMFPHP (Remoting) and mySQL > >I've quickly got an interface up and running and I've managed to >populate a comboBox using the same remoting call that the original >comboBox uses. > >In the original, selecting an item from the kingdom comboBox would >trigger another remoting call passing the selected item as an >argument. > >The second call would result in the phylum comboBox being populated. > >I can't get it to work in Flex. > >I can populate the phylum comboBox if I pass an explicit argument, >but I just can't seem to find a way to access the 'selectedItem' from >the kingdom comboBox checking what I'm referencing I either get an >[object][object] or undefined! :-( > >I've tried various things like selectedItem.data, getSelectedItem() >etc etc > >Has anyone else done this and got an insight? I've read various bits >of documentation and searched this lists archive, but I seem to be >missing something? > >Here's a summary version of my code - any insight would be very much >appreciated. > >Cheers, > >Phil > >http://www.macromedia.com/2003/mxml"; > initialize="imagebank_ro.getCategories1.send();"> > endpoint="http://localhost/remoting/gateway.php"; > id="imagebank_ro" > source="ImageBank" > protocol="http" > showBusyCursor="true"> > > > > >{kingdoms_cb.selectedItem.label} > > > > > >... > change="imagebank_ro.getCategories2.send();" > dataProvider="{imagebank_ro.getCategories1.result.items}" /> > dataProvider="{imagebank_ro.getCategories2.result.items}" /> >... > > > > > >-- >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 > > > > __ Phil Marston Learning Technologist Learning Technology Unit Edward Wright G33, University of Aberdeen, Aberdeen, AB24 3QY, UK [EMAIL PROTECTED] Tel: +44(0)1224 273329 / +44(0)7798 723660 http://www.abdn.ac.uk/diss/ltu/ __ University of Aberdeen Open Day - Tuesday 23rd August 2005 For more information visit our website http://www.abdn.ac.uk/openday or freephone 0800 027 1495 __ -- 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/
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
I got it working fine the old school way http://www.macromedia.com/2003/mxml"> Philippe Maegerman From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pmarstonuoaSent: vendredi 1 juillet 2005 16:26To: flexcoders@yahoogroups.comSubject: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject Hi All,Flex newbie here ;-)As a way of checking out Flex I'm trying to port an ImageBank app that was built using Flash MX, AMFPHP (Remoting) and mySQLI've quickly got an interface up and running and I've managed to populate a comboBox using the same remoting call that the original comboBox uses.In the original, selecting an item from the kingdom comboBox would trigger another remoting call passing the selected item as an argument.The second call would result in the phylum comboBox being populated.I can't get it to work in Flex.I can populate the phylum comboBox if I pass an explicit argument, but I just can't seem to find a way to access the 'selectedItem' from the kingdom comboBox checking what I'm referencing I either get an [object][object] or undefined! :-(I've tried various things like selectedItem.data, getSelectedItem() etc etc Has anyone else done this and got an insight? I've read various bits of documentation and searched this lists archive, but I seem to be missing something?Here's a summary version of my code - any insight would be very much appreciated.Cheers,Phil http://www.macromedia.com/2003/mxml"initialize="imagebank_ro.getCategories1.send();">endpoint="http://localhost/remoting/gateway.php" id="imagebank_ro"source="ImageBank" protocol="http" showBusyCursor="true"> {kingdoms_cb.selectedItem.label} ...change="imagebank_ro.getCategories2.send();"dataProvider="{imagebank_ro.getCategories1.result.items}" />dataProvider="{imagebank_ro.getCategories2.result.items}" />...--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com -- 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 Computer software testing Macromedia flex Development Software developer YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --**STATEMENT OF CONFIDENTIALITY** This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited. We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus.--
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
Try "kingdoms_cb.selectedItem.value.toString()" -Daman -Original Message- From: pmarstonuoa [mailto:[EMAIL PROTECTED] Sent: Friday, July 01, 2005 10:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject Hi All, Flex newbie here ;-) As a way of checking out Flex I'm trying to port an ImageBank app that was built using Flash MX, AMFPHP (Remoting) and mySQL I've quickly got an interface up and running and I've managed to populate a comboBox using the same remoting call that the original comboBox uses. In the original, selecting an item from the kingdom comboBox would trigger another remoting call passing the selected item as an argument. The second call would result in the phylum comboBox being populated. I can't get it to work in Flex. I can populate the phylum comboBox if I pass an explicit argument, but I just can't seem to find a way to access the 'selectedItem' from the kingdom comboBox checking what I'm referencing I either get an [object][object] or undefined! :-( I've tried various things like selectedItem.data, getSelectedItem() etc etc Has anyone else done this and got an insight? I've read various bits of documentation and searched this lists archive, but I seem to be missing something? Here's a summary version of my code - any insight would be very much appreciated. Cheers, Phil http://www.macromedia.com/2003/mxml"; initialize="imagebank_ro.getCategories1.send();"> http://localhost/remoting/gateway.php"; id="imagebank_ro" source="ImageBank" protocol="http" showBusyCursor="true"> {kingdoms_cb.selectedItem.label} ... ... -- 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 <*> 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/
RE: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
Try "kingdoms_cb.selectedItem.value.toString()" -Daman -Original Message- From: pmarstonuoa [mailto:[EMAIL PROTECTED] Sent: Friday, July 01, 2005 10:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject Hi All, Flex newbie here ;-) As a way of checking out Flex I'm trying to port an ImageBank app that was built using Flash MX, AMFPHP (Remoting) and mySQL I've quickly got an interface up and running and I've managed to populate a comboBox using the same remoting call that the original comboBox uses. In the original, selecting an item from the kingdom comboBox would trigger another remoting call passing the selected item as an argument. The second call would result in the phylum comboBox being populated. I can't get it to work in Flex. I can populate the phylum comboBox if I pass an explicit argument, but I just can't seem to find a way to access the 'selectedItem' from the kingdom comboBox checking what I'm referencing I either get an [object][object] or undefined! :-( I've tried various things like selectedItem.data, getSelectedItem() etc etc Has anyone else done this and got an insight? I've read various bits of documentation and searched this lists archive, but I seem to be missing something? Here's a summary version of my code - any insight would be very much appreciated. Cheers, Phil http://www.macromedia.com/2003/mxml"; initialize="imagebank_ro.getCategories1.send();"> http://localhost/remoting/gateway.php"; id="imagebank_ro" source="ImageBank" protocol="http" showBusyCursor="true"> {kingdoms_cb.selectedItem.label} ... ... -- 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 <*> 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] Newbie can't find selectedItem in comboBox when dataProvider is remoteObject
Hi All, Flex newbie here ;-) As a way of checking out Flex I'm trying to port an ImageBank app that was built using Flash MX, AMFPHP (Remoting) and mySQL I've quickly got an interface up and running and I've managed to populate a comboBox using the same remoting call that the original comboBox uses. In the original, selecting an item from the kingdom comboBox would trigger another remoting call passing the selected item as an argument. The second call would result in the phylum comboBox being populated. I can't get it to work in Flex. I can populate the phylum comboBox if I pass an explicit argument, but I just can't seem to find a way to access the 'selectedItem' from the kingdom comboBox checking what I'm referencing I either get an [object][object] or undefined! :-( I've tried various things like selectedItem.data, getSelectedItem() etc etc Has anyone else done this and got an insight? I've read various bits of documentation and searched this lists archive, but I seem to be missing something? Here's a summary version of my code - any insight would be very much appreciated. Cheers, Phil http://www.macromedia.com/2003/mxml"; initialize="imagebank_ro.getCategories1.send();"> http://localhost/remoting/gateway.php"; id="imagebank_ro" source="ImageBank" protocol="http" showBusyCursor="true"> {kingdoms_cb.selectedItem.label} ... ... -- 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/