HI all - I want to be able to extend the NSOpenGLView class to have a ptr to some ptr to an NSObject class (nothing too complicated I think?). Here's the tetra.h file
//Tetra.h // // tetra.h // myogl // // Created by shockwave on 4/2/08. // Copyright 2008 __MyCompanyName__. All rights reserved. // #import <Cocoa/Cocoa.h> enum { X=0, Y, Z }; @interface tetra : NSObject { @private //the 3-D coords of the tetrahedron; they will be initialized within a unit cube float vertices[4][3]; //colors of each face float vert_colors[4][3]; //indirection indexes to draw the tetrahedron char triangles[4][3]; //rotation angles (x, y, z) float rot[3]; } - (tetra)init; - (float *)GetVertexPositions: (int)side :(int)idx; - (void)IncRotation: (int)axis :(float)angle; - (float *)Rot; @end //MyNSOpenGLview.h #import <Cocoa/Cocoa.h> #import "tetra.h" @interface CMoglView : NSOpenGLView { tetra *myTetra; } @end When I try to compile this code I get these weird errors and warnings: cd /Users/mycomputer/myogl /Developer/usr/bin/gcc-4.0 -x objective-c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G5 -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/mycomputer/src/builds/objs/myogl.build/Release/myogl.build/myogl.hmap -F/Users/mycomputer/src/builds/Release -I/Users/mycomputer/src/builds/Release/include -I/Users/mycomputer/src/builds/objs/myogl.build/Release/myogl.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.5.sdk -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/myogl_Prefix-dhaifsjpxttfyafwyvevbztxhrgj/myogl_Prefix.pch -c /Users/mycomputer/myogl/../src/MeinOGLView.m -o /Users/mycomputer/src/builds/objs/myogl.build/Release/myogl.build/Objects-normal/ppc/MeinOGLView.o In file included from /Users/mycomputer/myogl/../src/MeinOGLView.h:2, from /Users/mycomputer/myogl/../src/MeinOGLView.m:1: */Users/mycomputer/myogl/tetra.h:31: error: can not use an object as parameter to a method* from /Users/mycomputer/myogl/../src/MeinOGLView.m:1: In file included from /Users/mycomputer/myogl/../src/MeinOGLView.h:2, * /Users/mycomputer/myogl/tetra.h:31: error: can not use an object as parameter to a method* cd /Users/mycomputer/myogl /Developer/usr/bin/gcc-4.0 -x objective-c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G5 -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/mycomputer/src/builds/objs/myogl.build/Release/myogl.build/myogl.hmap -F/Users/mycomputer/src/builds/Release -I/Users/mycomputer/src/builds/Release/include -I/Users/mycomputer/src/builds/objs/myogl.build/Release/myogl.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.5.sdk -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/myogl_Prefix-dhaifsjpxttfyafwyvevbztxhrgj/myogl_Prefix.pch -c /Users/mycomputer/myogl/tetra.m -o /Users/mycomputer/src/builds/objs/myogl.build/Release/myogl.build/Objects-normal/ppc/tetra.o In file included from /Users/mycomputer/myogl/tetra.m:9: */Users/mycomputer/myogl/tetra.h:31: error: can not use an object as parameter to a method* /Users/mycomputer/myogl/tetra.m: In function '-[tetra init]': */Users/mycomputer/myogl/tetra.m:15: warning: conflicting types for '-(id)init' /Users/mycomputer/myogl/tetra.h:31: warning: previous declaration of '-(tetra)init' * In file included from /Users/mycomputer/myogl/tetra.m:9: * /Users/mycomputer/myogl/tetra.h:31: error: can not use an object as parameter to a method /Users/mycomputer/myogl/tetra.m:15: warning: conflicting types for '-(id)init' /Users/mycomputer/myogl/tetra.h:31: warning: previous declaration of '-(tetra)init' *Build failed (2 errors, 2 warnings) The errors don't make any sense to me as to why they're happening. The warnings neither, because the message names in the src are identical in the code. So, any ideas why this isn't compiling, when it should?? Thanks, charles. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]