Mailing Lists: Apple Mailing Lists

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

Enumerator



I've learned that Enumerator is not present in Safari's implementation of JavaScript. Is there a way to fake it?

I have to implement something like this:

for (var objEnum = new Enumerator(axmlRegExp); !objEnum.atEnd(); objEnum.moveNext())
{
// ...do stuff to objEnum
}


I was thinking adding a definition for a JS Object to the DOM, and in that function/JS class declaration call the objective-c world and make an NSEnumerator there, and 'shadow' objEnum.moveNext() and use (object != [enumerator nextObject]) for objEnum.atEnd().. Just ideas. Is this even possible at all? Any possible caveats?

Michael

--
Michael Hanna
email@hidden
iChat: michaelkhanna(AIM)



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

This email sent to 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.