diff options
author | Swati Sharma <itawswati@gmail.com> | 2012-08-19 11:31:15 +0000 |
---|---|---|
committer | Swati Sharma <itawswati@gmail.com> | 2012-08-19 11:31:15 +0000 |
commit | 70595644aff327964fe1c9484af47f81148a9067 (patch) | |
tree | 64d029cd88c9680462f898a23a56341ceffec0ed | |
parent | 22c35d7d8350f9f3cd6bb2742d74288f9fae8cd5 (diff) | |
download | swig-70595644aff327964fe1c9484af47f81148a9067.tar.gz |
Fix for the broken example.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-objc@13662 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r-- | Examples/objc/class/runme.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Examples/objc/class/runme.m b/Examples/objc/class/runme.m index e51a2e8bb..0906b507e 100644 --- a/Examples/objc/class/runme.m +++ b/Examples/objc/class/runme.m @@ -38,10 +38,13 @@ int main(int argc, char* argv[]) { [shapes addObject: c]; [shapes addObject: s]; + int i; + Shape *obj = nil; // Notice how the area() and perimeter() functions really // invoke the appropriate virtual method on each object. - for (Shape* obj in shapes) + for(i=0; i<[shapes count]; i++) { + obj = [shapes objectAtIndex: i]; NSLog(@"Shape: %@", obj); NSLog(@"area = %f", [obj area]); NSLog(@"perimeter = %f", [obj perimeter]); |