On Wed, Sep 28, 2011 at 20:12, ksadil <ksa...@gmail.com> wrote:

> I figured out the answer to my question, which is: the client can iterate
> through the object and extract the data I want:
>
>
> // asynchronous call
> var handler = function(result, exc) {
>    if (exc == null) {
>                 for (var i = 0; i < result.length; i++){
>                        var szDataRow=result[i];
>                        alert("Result of async call (debug): " +
> szDataRow['requests']);
>                 }
>
>    } else {
>        alert("Exception during async call: " + exc);
>    }
> };
>
> Thanks for the pickup on the database version, and the contents of the
> database were just "thrown together" to test against.
>
> The code above correctly "decodes" the contents of result.
>
> If you have any concerns about my approach, I do appreciate feedback. I am
> on the steep, early part of the learning curve.
>

Your approach is fine. My preferred way of doing something with each result,
much of the time, uses the forEach method of an array. I would probably do
that loop like this:

result.forEach(
  function(szDataRow)
  {
    alert("Result of async call (debug): " + szDataRow.requests);
  });

What you have is fine, though, and it sounds like you're well on your way.

Cheers,

Derrell
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to