I created a Obj C++ Cocoa class in Project Builder (not a subclass in IB). Now I'm trying to link it together in code. My class is called TPKG2Class.
Heres the .h file for TPKG2Class:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
<font color = brown>//</font>
<font color = brown>// TPKG2Class.h</font>
<font color = brown>// duality4</font>
<font color = brown>//</font>
<font color = brown>// Created by Colin Cornaby on Tue Jan <font color = blue>22</font> <font color = blue>2002.</font></font>
<font color = brown>// Copyright (c) <font color = blue>2001</font> Conundrum Software. All rights reserved.</font>
<font color = brown>//</font>
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import <PreferencePanes/NSPreferencePane.h>
@interface TPKG2Class : NSObject {
}
- (void)TPKG2Name;
@end
</font>[/code]
Heres the .m for TPKG2Class:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
<font color = brown>//</font>
<font color = brown>// TPKG2Class.m</font>
<font color = brown>// duality4</font>
<font color = brown>//</font>
<font color = brown>// Created by Colin Cornaby on Tue Jan <font color = blue>22</font> <font color = blue>2002.</font></font>
<font color = brown>// Copyright (c) <font color = blue>2001</font> Conundrum Software. All rights reserved.</font>
<font color = brown>//</font>
#import <font color = red>"TPKG2Class.h"</font>
@implementation TPKG2Class
- (void)TPKG2Name
{
NSLog(<font color = orange>@"hi"</font>);
}
@end
</font>[/code]
I implement it in my main class with #import "interfacecontroller.h". When I try to call "[TPKG2Class TPKG2Name];" PB gives me two warnings:
interfacecontroller.m:46: warning: cannot find class (factory) method.
interfacecontroller.m:46: warning: return type for `TPKG2Name' defaults to id
Why? As far as I can tell, everything is right... :sigh:
BTW... How do I change the default software company name for the header at the top of the code? thanks.
--Colin Cornaby