I'm trying to use the JavaScript patch to create associative arrays. I'm trying to create an array with valid keys but can't find a way to do it. The associative arrays don't seem to set out a structure propperly.

I just tried it and the following JS function takes a normal array and outputs its first two entries in a keyed dictionary. Of course, there's way too little error checking in that code.

function (__structure dictionary) main (__structure array)
{
        var result = new Object();
        __structure temp = new Object();
        
        if (!_testMode) {
                temp["first"] = array[0];
                temp["second"] = array[1];
        }
        
        result.dictionary = temp;
        return result;
}

Could you maybe give us a concrete example of how your input looks and how the output should look like?

Marco
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to