I've got:
MyWindowController.h
MyWindowController.m
HistoryController.h
HistoryController.m
In MyWindowController.h, there is:
IBOutlet NSPanel* viewInvoice;
And later on:
- (IBAction)viewInvoice:(NSNumber *)invoiceNumber;
I would like to make use of this panel throughout my program. In my HistoryController.m, there is:
- (IBAction)viewSelectedInvoice:(id)sender{
id viewInvoiceObject = [[MyWindowController alloc] init];
[viewInvoiceObject viewInvoice:[NSNumber numberWithInt:1]];
[viewInvoiceObject release];
}
Now I can successfully access that method (some NSLog calls verify this), but I'm not at all able to actually make the NSPanel appear. Here's some of the code from there:
- (IBAction)viewInvoice:(NSNumber *)invoiceNumber {
[viewSelectedInvoicePanel makeKeyAndOrderFront:viewSelectedInvoicePanel];
}
I'm able to make the panel pop up if I link the button in my History view to the FirstResponder action "viewInvoice", however it seems like I won't be able to send through a parameter (namely the invoice number).