Re: problem loading a window in a new NIB using NSWindowController.
Re: problem loading a window in a new NIB using NSWindowController.
- Subject: Re: problem loading a window in a new NIB using NSWindowController.
- From: Dave Hersey <email@hidden>
- Date: Sat, 6 Oct 2007 01:11:06 -0400
dg -
Is the window outlet valid when you call [myWindowController window]?
Is the app actually crashing? Do you see exceptions firing in the
Debug Console by any chance?
I kind of suspect that the problem is with your table and datasource,
but that's a bit of a wild guess. Have you tried deleting the table
to see if the window appears if it's not being set up?
- d
On Oct 5, 2007, at 9:12 PM, deepak gopal wrote:
I am sorry this was in the draft and I didn't realize that I hadn't
sent it. :(
I found out that it was a problem with the nib I had created.
My app is loading the window now.
--------------------------------------
My application stops as soon as my control reaches
[myWindowController window].
myWindowController when printed gives " <MyWindowController:
0x3c0f10>", so I guess this is good.
This is my method.
- (IBAction)downloadSymbols:(id)sender {
NSWindowController *myWindowController = [[[MyWindowController
alloc]
initWithWindowNibName:@"SymbolsView"] autorelease];
NSLog (@"myWindowController %@", myWindowController );
[[myWindowController window] makeKeyAndOrderFront:self];
}
In SymbolsView.nib, I have a Window (which contains a NSTableView)
and a object of class "LoadFunction" which would act as the
dataSource for the TableView in the window.
I have made MyWindowController class which is a subclass of
NSWindowController as the File's Owner.
The outlet "window" of File's Owner is connected to the Window and
the File's Owner is made the "delegate" of the Window.
In the MainMenu.nib I have a window with a button "Grant" which is
connected to the Action Class above {- (IBAction)downloadSymbols:
(id)sender }.
So when I click on the button "Grant" I expect the Window to popup.
This doesn't happen.
DG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden