From bec47ec8140ec0b041fb801c5543df3884563e89 Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Mon, 29 Dec 2008 17:32:03 -0800 Subject: [PATCH] Added -objectEnumerator to CPSet. [#185 state:resolved]. Reviewed by me. --- Foundation/CPSet.j | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Foundation/CPSet.j b/Foundation/CPSet.j index 2ba0b995d..9e739c743 100644 --- a/Foundation/CPSet.j +++ b/Foundation/CPSet.j @@ -6,13 +6,13 @@ * Extended by Ross Boucher * Extended by Nabil Elisa * - * TODO: Needs to implement CPCoding, CPCopying, CPEnumerator. + * TODO: Needs to implement CPCoding, CPCopying. */ @import "CPObject.j" @import "CPArray.j" @import "CPNumber.j" -//import "CPEnumerator.j" +@import "CPEnumerator.j" @implementation CPSet : CPObject @@ -163,6 +163,7 @@ - (CPArray)allObjects { var array = []; + for (var property in _contents) { if (_contents.hasOwnProperty(property)) @@ -289,7 +290,10 @@ return nil; } -//- (CPEnumerator)objectEnumerator; +- (CPEnumerator)objectEnumerator +{ + return [[self allObjects] objectEnumerator]; +} // Mutable Set Methods