PDA

View Full Version : Displaying new Window??




trey5498
Jun 20, 2008, 11:23 AM
I admit that I am a noob when it comes to Mac programming, however I have the generals down, just not the exact syntax. I have one window that will call another window via an application controller and a next button action. It is linked up correctly and the Action works. This is the code below:



AppController.h

@interface AppController : NSOject {
NSWindow *prnOverview;
NSWindow *prnSelector;
}
- (IBAction)NextButton:(id)sender;
@end


AppController.m

@interface AppController

- (IBAction)NextButton:(id)sender
{
NSLog(@"The User Clicked");
[prnSelector performClose:self];
[prnOverview makeKeyAndOrderFront:nil];
}
@end


The " NSLog(@"The User Clicked"); " Shows that the Action is activated and working, because it shows in the log currectly. I can not seem to get the syntax to work correctly to close the current window and show the next. What did I do wrong??


And will this work for checking and adding the checkbox value to an array?


i=0;
if([checkboxname isEqualToString:@"Printer1"] == YES) {

printerarray[i] = Printer1;
i++;

} else if{
the other 17 checkboxes
}



trey5498
Jun 20, 2008, 01:29 PM
anyone???

trey5498
Jun 20, 2008, 02:29 PM
Never mind figured it out.