Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JavaScript Module Output Structure



On Leopard, just create an ouput port of type structure and set result.ouputStructure to your array:

function (__structure ouputStructure) main ()
{
	var result = new Object();
	result.ouputStructure = new Array(10);
	return result;
}

The above code returns a array of 10 null values.

K.


On Nov 1, 2007, at 11:24 AM, Troy Koelling wrote:


On Oct 31, 2007, at 1:00 PM, Alex Drinkwater wrote:

Hiya,

I have a JavaScript module that currently outputs (or attempts to output) a JS Array containing a number of individual ASCII characters on one of it's out ports.

Is this on Tiger or Leopard?

Can anyone give me any tips on how I might output this Array as a Structure, so I can then use the Structure Index Member patch to retrieve individual characters? I'm familiar with Arrays, but have never used Structures before.

Structures are a generic term covering what would be called Arrays and Dictionaries in objective C. If you have an array and output it as a Structure, you can get values by index, and if you have a dictionary (hash, set, etc) you can access the values by key. There should be both Structure Index Member and Structure Key Member patches.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (email@hidden )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: JavaScript Module Output Structure (From: Troy Koelling <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.