Theocacao
Leopard
Design Element
Comment on "Objective-C, Ruby and Python for Cocoa"
by Jim Getzen — Feb 20
@Scott: Not as incovenient as not having headers to look at. :)
You are, of course, free to create your own header-type index files as you develop a Ruby/Python project. ;)

Do you mean double-includes? #import prevents that.
I think I used the wrong terminology. I was referring to the situation where you can't do:

// In Class A's header
#import <ClassB.h>
// followed by some method declaration which uses a ClassB object

// In Class B's header
#import <ClassA.h>
// followed by some method declaration which uses a ClassA object

I realize the solution is to use:
// in ClassA's header
@class ClassB;

// in ClassB's header
@class ClassA;

It's not a difficult solution but, for me, it was another small Obj-C stumbling block -- it proved hard to Google a solution to that one... :)
Back to "Objective-C, Ruby and Python for Cocoa"
Design Element

Copyright © Scott Stevenson 2004-2015