Help! Problems with unique elements in dedicated... each loop using HTTPService

I'm starting out with Flex 2/ActionScript 3, and I'm having a real
problem trying to navigate through the results returned by a HTTPService (in
XML format) when there is only one line of data. Here's what I have:

------------------------------------------------------------------------------------------ ------------------------------------
<? XML version = "1.0" encoding = "utf-8"? >
"" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml '
layout = "absolute" creationComplete = "Results.send ()" >
"" < mx:HTTPService url = " http://mysqlserver/test?sql=EXECUTE+usp_Test"
ID = "Results" showBusyCursor = "true" result = "ShowData ()" / >

< mx:Script >
<! [CDATA]
private void ShowData (): void {}
for each {(var: objet row dans Results.lastResult.items.item)}
DataItemList.text += row.id + "\n";
}
}

[]] > < / mx:Script >
< mx:Text x = "10" y = "10" width = "100%" height = "100%".
ID = "DataItemList" / >

< / mx:Application >
------------------------------------------------------------------------------------------ ------------------------------------

Now, I have exactly what I expected when the http service returns more
only a single line, like this:

elements <>
< item id = "Something" / >
< item id = "Point Two" / >
< / object >

But if there is only one line, like this...
elements <>
< item id = "Something" / >
< / object >

... I get a "ReferenceError: Error #1069: id of property not found on '.
String and there is no default value. »

It seems that the/foreach loop is broken? I looked around and
seen the references explaining that one line is returned as another
data type (object) as several lines (collection ArrayCollection). Is this true?

I want a method that returns the same type of data regardless of the
the number of lines. Any help would be greatly appreciated.

Ah, I don't recommend that. On the other hand, specify resultFormat = "e4x".

"In addition, rather than use lastResult, pass 'event' to the Manager.
ShowData (event)

And in the function:
private void ShowData(oEvent:ResultEvent):void {}
var xmlResult:XML = XML (oEvent.result)
trace (xmlResult.ToXmlString ())

See if you get the correct xml with a single line in this way.

We'll go from there.
Tracy

Tags: Flex

Similar Questions

  • I can't have the option in menu to 13 items to work.  Any ideas?  I have already downloaded all the Templates menu and updated the software.  I never had this problem with 7 elements.

    I can't have the option in menu to 13 items to work.  Any ideas?  I have already downloaded all the Templates menu and updated the software.  I never had this problem with 7 elements.  With the help of 13 elements, I can successfully burn my movie on a disc (DVD) without menu.  The burning process is interrupted after that I added a menu.

    Rick

    First of all, please remove the stopper at the end of the content of the timeline. It is not necessary it and burn the causes of the problems.

    The main Menu marker should be OK, no similar problems as the stopper a.

    RTA

  • Problems with clicking and scrolling when you are using the mouse in IE

    Separated from this thread.

    Original title:

    Problems with clicking and scrolling when you are using the mouse

    I have the same problem.  My touchscreen responds but my touchpad and mouse are unable to save a click in IE.  I need to reboot to rectify.  It seems to be more common when the laptop comes out of fashion 'sleep'.   I tried all the steps above, everything is up-to-date.

    Hello Fred,.

    Thanks for the reply.

    I appreciate your efforts to resolve the issue.

    I would suggest trying the following methods and check if it helps.

    Method 1:
    Run the hardware and devices Troubleshooter and check. Please follow these steps:

    a. press Windows + W keys, type Troubleshooting in the search box and press on Enter.
    b. click on 'show all' and then click 'hardware and devices'.
    c. click 'Next' and then follow the on-screen instructions.

    If this does not help, then use method 2.

    Method 2:
    Start your computer in safe mode and check the number.
    Refer to this article:
    Start settings for Windows (including safe mode)
    http://Windows.Microsoft.com/en-us/Windows-8/Windows-startup-settings-including-safe-mode

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • Hola, tengo mi Suscripcion a problem with Creative Cloud, al momento los programas use sale me el message of Quebec tengo version prueba puedo hacer para el problema delivery

    Hola, tengo mi Suscripcion a problem with Creative Cloud, al momento los programas use sale me el message of Quebec tengo version prueba puedo hacer para el problema delivery

    Your subscription to cloud shows correctly on your account page?

    If you have more than one email, you will be sure that you use the right Adobe ID?

    https://www.adobe.com/account.html for subscriptions on your page from Adobe

    If Yes

    Some general information for a subscription of cloud

    Cloud programs don't use serial... numbers you, connect you to your cloud account paying to download & install & activate... you may need to sign out of the cloud and restart your computer and log into the cloud for things to work

    Sign out of your account of cloud... Restart your computer... Connect to your paid account of cloud

    -Connect using http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html

    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html

    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html

    -ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp

    -http://helpx.adobe.com/creative-cloud/kb/license-this-software.html

    If no

    This is an open forum, Adobe support... you need Adobe personnel to help

    Adobe contact information - http://helpx.adobe.com/contact.html

    -Select your product and what you need help with

    -Click on the blue box "still need help? Contact us. "

  • Adobe will open not downloaded aliant bell bills no problem with internet explorer, but I do not use it

    Adobe will open not downloaded aliant bell bills no problem with internet explorer, but I do not use it

    The current versions of Firefox have allowed a built-in PDF Viewer that has all of the features that other PDF as Adobe Reader readers have or can not work properly otherwise.

    You can change the action for Portable Document Format (PDF) to Preview in Firefox to use Adobe Reader software or set always ask in "Firefox > Options/Preferences > Applications.

    You can set the pref pdfjs.disabled true on the topic: config page to disable the build-in the PDF Viewer.

    You can also check the value of the plugin.disable_full_page_plugin_for_types pref and remove the part application/pdf, if any.

    See also:

  • printing problem with photoshop elements 13.1

    I recently got an impression of my Photoshop elements 13 problem with my photosmart HP 7520. When I hit print the file I get this message

    The information about the registered printer are not compatible with this version of photoshop elements, or the saved printer is no longer available you will need to check your printer settings before printing

    The printer works in other applacations.

    I tried the update to 13.1 no help

    I uninstalled and reinstalled my printer Photosmart HP 7520.

    I tried to rename the printer.

    I tried to do a different default printer.

    I tried printing from Microsoft option in PDF and I get a message "because the default printer could not be opened" I also get this when you try to print to the photosmart

    all other printing options grey out the "print" key.

    You are very quiet.

  • Save before exit Skillbuilders (version 3.0.1 for APEX 4.0): problem with some element of list in the form Manager

    Hello

    I have a problem with the plugin save before exit that I downloaded from Skillbuilders. As I use Oracle APEX version 4.0.2 and Oracle 10 g r2 database; so I downloaded one that says "Save before release (version 3.0.1 for APEX 4.0)" skillbuilders and follow-up of their documentation to import the plugin and use it.

    My problem is that even if I do not make any changes to data in the form and go to another tab. the alert message always appears, and by the way, I have an element of list manager on my form and it gets highlighted. So, even if I make the changes or do not change; still, the alert message is displayed and highlights the element of list manager. I think maybe the problem is to have a crèche in the form list item. I have reproduced the same problem in my personal workspace. Here are the details.

    http://Apex.Oracle.com/pls/Apex/f?p=55129

    Details of the workspace

    Name of the workspace: raghu_workspace

    username: orton607

    password: orton123

    App # 55129

    Page: 2 - has the element of list manager.

    Page 3 - works fine without the element of list manager

    Please help with possible suggestions.

    Thank you

    Orton

    Orton,

    I have connected to the workspace you and added a replacement JS file that corrects this error.

    If please, give it a whirl and let me know if you find other problems with it.

    It is to the 3.0.2 version of the plugin and I do not know if this even fix will work for your local Apex version earlier.

    When you are ready to go to the APEX 4.0.2 Please contact me directly for assistance. In the meantime, I'll work on the creation of a patch for this kind of new downloads of the plugin will contain this change.

    Greg

    [email protected]

  • Problems with 7 elements

    Hello

    I have Windows Vista Home Premium on my laptop and I use Windows 8.  I use my 7 Elements since 2009.  I had problems with it - today I have tried to put some textures (layers) on one of my images and couldn't.

    Here are a few of the I'm having problems:

    1 - the name of the tools are not displayed to the top.

    2. when I use Ctrl-C to copy the texture and I use Ctrl V to apply the texture, it does not appear in my new layer.

    3 when I select a layer copy, the "mobile dash" do not appear.

    4 - layer Options are not displayed to the top.

    5 - the blue spinning pointer appeared and appears on and off.

    I think I might have to uninstall and reinstall.  So, if I do not uninstall my items, I will be able to re - install without any problem, re: codes of registration, purchase of codes or anything else?  Is there anyone that I could chat with on this subject?

    Thanks for your help and your support.

    Kind regards

    Amada

    What I do is keep my fingers on the keys Shift + Ctrl + Alt before double click on the shortcut of pse 7 and then double click on the shortcut and press the keys.

    It is sometimes difficult to get the right moment.

  • Problem with my iPhone 6s, while charging or using internet, he rejects a higher amount of heat! Pls help me...

    PProblem with my iPhone 6s, while charging or using internet, it rejects higher amoun of heat! Pls help me...

    Certain amount of heat is normal using a particularly intense use as a streaming video

    Can I restart a Force

    Restart your iPhone, iPad or iPod touch - Apple Support

    If the problem persists

    An appointment of 'Genius' to an Apple Store, or select another authorized service provider.

  • Help: problem with playback device

    Hello

    My dell latitude e7240

    and my headset logitech g150

    does not connect it says: problem with playback device

    It calls for 1 second then ends

    and when my friends try to call the said

    contact can only receive instant messages

    Help, please

    and fast

    Thank you very much

    I did a diagnostic test and other results are here

    https://www.dropbox.com/s/ipvyg52xhfwjrly/Dxdiag.txt?DL=0

    and Skype is the last

    Thank you

    answer soon

    Morgan

    Topic/title edited for clarity.

    Still no trace of your helmet and Avnex Virtual Audio Device is always installed.

    The specified Audio Capture Source only is Avnex Virtual Audio Device

    audio Capture Sources :

    Microphone (Avnex Virtual Audio Device), 0 x 00200000, 0, 0, qcap.dll, 6.06.9600.16384

    Open the Windows Device Manager. Are there looking for this virtual audio capture device, then uninstall it.

  • Problems with Photoshop elements 11 gel

    I recently upgraded to items 9 to 11 items. Now, when I work in the organizer or editor of the program freezes frequently and then displays the message "program does not. If I wait long enough – a few minutes - it starts running again. I never had this problem with Elements 9

    DDenny01,

    You are still sufering from this problem?

    Brian

  • [help] Problem with datagrid and DB

    Hello

    I have a problem with my flex2 app.
    EDIT: happens in all not only in firefox browser

    I use one
    < mx:HTTPService id = "userRequest4" url = "DB.php" useProxy = "false" method = "POST" > "
    < mx:request xmlns = "" >
    < / mx:request >
    < / mx:HTTPService >

    to send a request to a php script what data back to the database, and these data are load in a datagrid in this form:

    < mx:DataGrid id = "dg" width = "100%" height = "100%" dataProvider = "{userRequest4.lastResult.pathis.Product}" editable = "true" itemEditEnd = "getCellInfo (event); ">
    < mx:columns >
    < mx:DataGridColumn dataField = "ID" headerText = "ID" editable = "false" / >
    < mx:DataGridColumn dataField = "number" headerText = "Name" / >
    < mx:DataGridColumn dataField = "price" headerText = "Price" / >
    < mx:DataGridColumn dataField = "S" headerText = "S" / >
    < mx:DataGridColumn dataField = "M" headerText = "M" / >
    < mx:DataGridColumn dataField = "L" headerText = "L" / >
    < mx:DataGridColumn dataField = "XL" headerText = "XL" / >
    < mx:DataGridColumn dataField = "XXL" headerText = "XXL" / >
    < mx:DataGridColumn dataField = "other" headerText = "Other" / >
    < / mx:columns >
    < / mx:DataGrid >

    EDH, I call the php script, when someone clik in the menu option:
    private void menuHandler(event:MenuEvent):void {}
    if(Event.Item.@label=='Manage Product') {}
    Add_Products.visible = false;
    Add_Products.width = 0;
    Add_Products.height = 0;
    Add_design. Visible = false
    Manage_Products.width = 500;
    Manage_Products.height = 500;
    Manage_Products.Visible = true;
    Add_design. Width = 0;
    Add_design. Height = 0;
    userRequest4.url = "MP.php";
    userRequest4.send ();

    }
    }

    and this function updates the DB when the cell is changed:

    private void getCellInfo(event:DataGridEvent):void {}
    var myEditor:TextInput =
    TextInput (event.currentTarget.itemEditorInstance);
    Get the new value of the Publisher.
    var newVal:String = myEditor.text;
    var objN = new Object();
    objN.ids = dg.selectedItem.ids;
    objN.dato = newVal;
    objN.fields = event.dataField;
    userRequest2.url = "UP.php";
    userRequest2.send (objN);
    }

    and have the property to change the cell, and when that happens to update the database, it worked perfectly, no problems, but when to charge datagrid (I send the request to the DB.php) show this value have cells before that have edited :/
    you know a way to fix it?
    If someone knows please help me, I have urgent need of this :D

    Kind regards
    Shadow.

    try to add dummy prameter to your url in the httpservice which will force the browser not to cache xml

    for exempla, you can add '? blabla = "+ {new Date () .milliseconds}"

  • Problem with widescreen: part of it cannot be used.

    I started my computer this morning and made an unpleasant discovery: there's a good two inches on the right side of my screen that I can't use.

    Extends all the way through the taskbar at the bottom and is not affected, my experience also spans those two inches, and I can right click on the game and still get the context menu.

    However, when I maximize a window, it only fills up the other part of the screen, so I see two inches from my office next to him, and all my icons were installed on the "usable" part and cannot be postponed. I can drag them unusable part, but they will click to the edge of it. I can't extend a window to cover the portion of the screen (he refuses as when you try to expand on the edge on the side of the screen), but I can move it (less than an inch on the side of the screen, after which he self-aggrandizing ' grip on half of the usable screen) if it is not expanded, and so that I do not resize or maximize It will stay. As far as I know, the computer behaves as if the edge of the screen has been moved to the wire.

    I have a computer laptop wide screen, and it seems that the new 'edge' is where a normal sized screen would be cut, but once again, it is only on one side (right), and the taskbar and my desktop image have not been altered in any way. There is no black bars at all, just a large piece of two-inch Office I can't do much with.

    Here's a screenshot of my screen with a maximized window: http://i5.photobucket.com/albums/y192/razicasar/Misc/Capture.jpg

    There is absolutely no problem with the operation last night, and I didn't do anything differently than usual in the last days. My screen resolution is set at 1366 x 768, which is the recommended and highest setting; change to a lower resolution had no effect on the problem (both thumbs were still unusable). When I go into the graphic properties, the resolution of the screen is the same and the aspect ratio"options" a widescreen checked, so I don't think it's my graphics card itself which poses problem (and even once, have never had this problem before and have never changed graphics cards,...). "

    I am running Windows 7 Home Premium on a Dell Inspiron 1545, 64-bit operating system... I don't know what other information may be needed, but I'll happily know whatever it is also necessary if you can tell me where to find it.

    Any help at all would be appreciated! I've been looking around, but I was not able to find something similar to my problem, probably because it's really hard to describe. Thanks in advance!

    And I solved it. He was GOAL: new version apparently trying to take over a part of the office, pushing all the icons, so it is always visible. As I have no way to correct it and I do not have enough to find one, I simply uninstalled AIM and the problem is solved. ^^

  • Problems with Vista OS SP2 after automatic updates: using OneCare; application of integrated keylogger HP CPU "HP SDP" made by IBM in Durham, North Carolina (?); corrupted Samsung print driver downloaded from the website of the company

    Entered possible hacker:

    1. techie OneCare WINS access - probably not unauthorized and do not believe it causes always provided a quality service, but they have had access in the past.

    2 HP technicians - have had access to my computer once - did a good job with computer crash (not sure cause), but tried to sell me more HP products when I have no money...

    3. after the technicians HP did good job with crash, started to have pop-ups keep HP application that appeared as an add-on that works without permissions on my computer. Google the name of the HP SDP application > recovered information said program is IBM in North Carolina. Called them. Nobody gives any information on the program until I got ahold of a person who gave me the phone to techie Dept. It took all day. Not have not yet contacted technology because they have closed before I could call.

    4. called HP to inquire about the search info from HP SDP. on his goal? HP said he works as a keylogger you sell stuff. But what was weird is after the system crashed and repaired, there was one day that he has opened three times in ten minutes! The behavior of the application has changed after my OS has been repaired. Then after that I indicated HP where I found information on this program, the program disappear from the list of "run without permissions" in internet options explore > manage add-ons > run without the permissions list

    5. one day, I'm working on a word document, and the printer stops abruptly, impression. No amount of turn, or by clicking 'Cancel' will get doc from the printer queue. MS literature said this could be a security issue. The printer says "printing of documents", but no printing at my end.

    This problem is compounded when I delete browsing history and try to refresh the internet Explorer. That activity seems to take pieces of the program Samsung printer with it, even if I had excellent results in the past with Samsung printers and their downloads, and I never had the damaged printer driver to exercise this activity in the past.

    If I didn't have a short term in the Court of appeal in a week, I would say it's a question of OS, or program problem, but it's as if something falls down as soon as another issue is fixed and the unusual behavior of the computer, more timing and the purpose of the brief to me 90% sure that this is a pirate or a virus the surplus of the Samsung driver deleted pieces being left on my machine after uninstall.

    Dear Karena R,.

    Thanks a lot for your excellent advice. The Techies MS OneCare fixed the popup of HP before I read your message. (I was remiss to check my email...). I'll follow the instructions you sent me and am running the OneCare security right now, online scanner that I already know an excellent and effective tool because it has repaired my MS operating system and programs after that I accidentally deleted parts of the operating system by removing a .dll file, I need or such a thing! I also wanted to thank you for the information about the object of the HP SDP pop-up window. I saved your instructions on how to remove this case, the pop up appears again. One thing I noticed is that, after removal, some keys on my keyboard don't work, and I've read that other HP users encounter the same problem with the keys on the keyboard. The keys that seem to be affected are the keys that automatically open and close the door of the CD burner. Not a problem, because it is another way to open and close the drawer. It's one that HP must improve. In regards to your advice on the printer driver you have been 'right on' new! I reinstalled the driver using my own CD (not the latest driver, but one that works!) I think that the problem with the update of the Samsung driver that I downloaded from the Web site doesn't have some kind of problem. It is very unusual for a driver to Samsung, because I got excellent results with printers Samsung and free updates downloaded from their Web site. The first Samsung printer I had worked so well, for so long as the small rubber roller that takes the paper and it feeds through the printer wore out until the printer is, literally in a 100,000 pages printed after that I bought for about $80.00 dollars! So, I went out and bought another one, and that's what I use now. The printer works fine now, except for some reason, the icon in my taskbar notification area, allow to check the printer the status of jobs, cancel or repeat printing as before. Once. from time to time, a job stuck in the queue for the printer and will not erase unless I unplug the printer from the central unit. Nor will it print. But since I reinstalled the driver, this has happened only once. With the downloaded update, it happened all the time. It is possible that my OS is misconfigured, but I started to run the routine tune ups and analyses using OneCare and unless I used to defragment. I learned that the defragmentation of the hard disk too can cause problems also. The last thing is, I think that sometimes, tiny files needed to run my OS and files other programs can be sent to my temporary folder by accident. MS still once, All_Knowing computer, somehow recognizes the files I need and pushes me to ignore them, but perhaps it does not work for non-Microsoft like Adobe programs. I will use the link in your message to run the fix with the printer driver just to see if it works. If it is not the case, I can always reinstall the driver with my CD that came with the printer. Thanks for the excellent and informative tips and forgive me if I do not respond sooner!

    Sincerely,

    E-mail address is removed from the privacy *.

  • Animate - problem with the duplication of scripts after loop

    Hi all

    I have a problem with button simple script to the first frame. All right when the timeline is playing for the first time. After that when timeline loops and stops again to 0 frame button script is fireing twice, when it performs a loop twice is fireing three times etc...

    Here is my script:

    This.Stop ();

    exportRoot.mc_cta.cursor = "pointer";

    This.mc_cta.on ("click", clickFunc.bind (this));

    function clickFunc() {}

    Console.log ("clicked");

    EB.userActionCounter ("clicked");

    exportRoot.gotoAndPlay (1);

    }

    Anyone any ideas? Where I'm wrong?

    Thank you!

    Kris

    As an alternative to creating multiple variables, you can also work around this problem by simply checking if the listener already exists:

    If (! this.mc_cta.hasEventListener ("click")) {}

    This.mc_cta.on ("click", clickFunc);

    }

    Moreover, you don't need bind() when you use on(). It automatically binds the event handler to the local scope.

    EaselJS v0.8.2 API Documentation: EventDispatcher

Maybe you are looking for

  • Re: Question on Satellite A200-1SX fan

    Hey everybody.I recently bought a Satellite A200-1SX and I noticed that the fan is running constantly for about 5 seconds then turns off.Does anyone have any ideas why this is happening? Is this normal? Is there a software that can help me? Thanks to

  • HPw2228h usb ports

    My 2 usb ports on the side of my monitor have never worked. I do to make them work?

  • Where is the performance of mac widget that was available before El Capitan

    There used to be a widget that displays the CPU usage, use of memory, the CPU temperature, IO, etc in real time.  Can't find it on the net more.  Anyone know where to download?

  • VISA do not read serial data in the right order

    Hi all I'm working on a project, when I need sample data at point A, it passes these (zigbee) wireless data to point B and here rs232 connection to the laptop. I'm using labview 2011 to view sampled data, but I have a little problem, data are not ent

  • Driver for my laptop

    USB\VID_0CF3 & PID_311D & REV_0001 PCI\VEN_10EC & DEV_5229 & SUBSYS_1858103C & REV_01 PCI\VEN_8086 & DEV_1E22 & SUBSYS_1858103C & REV_04