Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Cocoa... custom class executes own method....? Help
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Meds" data-source="post: 789123" data-attributes="member: 67584"><p>Maybe this will help:</p><p></p><p>[CODE]</p><p>Checker.h /* My app controller */</p><p>@interface Checker : NSObject {</p><p> </p><p> /* bunch of outlets */</p><p></p><p>}</p><p>- (void)startCheckBoxes:(id)sender; </p><p></p><p>/* thats the method */</p><p></p><p>Checker.m:</p><p>- (IBAction)button4:(id)sender {</p><p> </p><p> if ((has1BeenPressed == YES) && (has2BeenPressed == YES) && (has3BeenPressed == YES)) {</p><p> </p><p> [bigTextField setStringValue:@"Good! Complete!"];</p><p> has4BeenPressed = YES;</p><p> [thirdWindow makeKeyAndOrderFront:NSApp];</p><p> [self startCheckBoxes];</p><p> } else {</p><p></p><p> /* details */</p><p> }</p><p>}</p><p></p><p>-(void)startCheckBoxes:(id)sender {</p><p>/* details /*</p><p>}</p><p></p><p>/* theres the context in which I'm trying to call the app controller to start the startCheckBoxes method, which you saw in the checker.h file */</p><p>@end</p><p>[/CODE]</p><p></p><p>Looks like I'm doing the same thing as you. The program compiles and runs, but the console yeilds "unrecognized selector sent to instance," which doesn't make sense because I defined the method for the class in the .h file.</p></blockquote><p></p>
[QUOTE="Meds, post: 789123, member: 67584"] Maybe this will help: [CODE] Checker.h /* My app controller */ @interface Checker : NSObject { /* bunch of outlets */ } - (void)startCheckBoxes:(id)sender; /* thats the method */ Checker.m: - (IBAction)button4:(id)sender { if ((has1BeenPressed == YES) && (has2BeenPressed == YES) && (has3BeenPressed == YES)) { [bigTextField setStringValue:@"Good! Complete!"]; has4BeenPressed = YES; [thirdWindow makeKeyAndOrderFront:NSApp]; [self startCheckBoxes]; } else { /* details */ } } -(void)startCheckBoxes:(id)sender { /* details /* } /* theres the context in which I'm trying to call the app controller to start the startCheckBoxes method, which you saw in the checker.h file */ @end [/CODE] Looks like I'm doing the same thing as you. The program compiles and runs, but the console yeilds "unrecognized selector sent to instance," which doesn't make sense because I defined the method for the class in the .h file. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Cocoa... custom class executes own method....? Help
Top