You don't need any push/pop. Just keep an array the size of the queue and rotate the write index by incrementing it like this:
i = (i + 1) % myArray.length; Ambroise -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Jack Hayward Envoyé : mercredi 14 novembre 2007 10:13 À : Alessandro Sabatelli Cc : [email protected] Objet : Re: Is it possible to build a queue in composer? I can't seem to locate the JS on composer documentation - anyone have a pointer? I found a few things on the web for JS in general, but none of them talk about push and pop. J On Nov 13, 2007, at Nov 13, 2007 | 2:04 PM, Alessandro Sabatelli wrote: > You can do this in JS onTiger. Use push and pop methods on your > array to create the queue. > .xX > > On Nov 12, 2007, at 12:46 PM, Jack Hayward > <[EMAIL PROTECTED]> wrote: > >> I would like to build a queue containing the last "n" MIDID notes >> that have come in. >> >> Any ideas on how to do this? >> >> Thanks >> Jack >> >> _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Quartzcomposer-dev mailing list (Quartzcomposer- >> [EMAIL PROTECTED]) >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/quartzcomposer-dev/ >> asabatelli%40apple.com >> >> This email sent to [EMAIL PROTECTED] _______________________________________________ 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/ambroise%40cellulo .info This email sent to [EMAIL PROTECTED] _______________________________________________ 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]

