----- Original Message ----- 
From: "Leif W" <[EMAIL PROTECTED]>
To: "Joseph Sonnier" <[EMAIL PROTECTED]>
Cc: "DynAPI-Dev" <[EMAIL PROTECTED]>
Sent: Wednesday, February 18, 2004 12:52 PM
Subject: [Dynapi-Dev] Re: Tips on debugging IOElement / SODA


> It's ambiguous, do I create an object for the assosciate indexed elements,
> and an array for the numeric?  Does that then break the original
structure?
> Do I create an object for the entire thing?  How does JavaScript handle
> mixed arrays?  I think it allows using numeric indexing even for the
> assosciative indexes, but I'm not sure.

Wow it's morning already??  Can't stop now, so close, just need some food
and drink.  I've come up with some functions to let me know for sure if an
array is entirely one type or the other, empty, or mixed.  If it's entirely
numeric, then treat it as a normal array envelope.  If it's entirely
assosciative, treat it as an object (still need to finish that bit of code,
almost done).  If it's a mixture, it's ambiguous, and we need to let it
error out.  I was thinking of returning an unknown type, or raising an
error, but I don't understand that mechanism yet.  After searching through
the docs and cross referencing with the ASP-JScript code, I finally
understand what the object wrapping in the envelope should look like and
what the PHP script should be doing and what it probably isn't doing right.
Still many layers of understanding to sift through, but I feel as though
I've made some great progress so far.

Leif

P.S. Attached is a little PHP test script to check the type of an array.

Attachment: myAry.php
Description: Binary data

Reply via email to