|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Im still getting no where with this one. Help._______________________________________________
This is a document based application, so the NSWindowController stuff is a
little more complicated.
1. I can't get a preferences panel to display. I created a preferences
panel in IB, and made its file owner "Preferences". I have a Preferences.m
and Preferences.h file in my Xcode project. I created an outlet for a
NSWindowController (preferencesPanelController), and an outlet for a
NSPanel (preferencesPanel) and connected them via IB in the Preferences
NIB, and the preferences menu option in my MainMenu NIB.
(follow-up: I have checked, double checked my connections. I looked at the
developer example TextEdit that has a preferences panel, and the
"accessory" window example in my Learning Objective-C with Cocoa book).
So, when I try to open the preferences via the menu option, I see that my
method is called; "showPanel called" is printed, but the panel never
appears. I don't get an error, I have tried inside and out of the if()
statement checking if the preferencesPanelController has been
instantiated, and the NSLog shows a healthy NSWindowController object.
My Preferences.nib file lives in the same directory in the project as the
MainMenu.nib file, and I never get an error that the NIB failed to load.
Here is the showPanel code that I have connected to the "Preferences ..."
if (![NSBundle loadNibNamed:@"Preferences" owner:self])
NSLog(@"Failed to load Preferences.nib");
preferencesPanelController = [[NSWindowController alloc]
Could this be opening offscreen?? There is simply no errors generated, and
this code on the first call prints this
2004-07-16 12:26:27.888 MOViewer preferencesPanelController
and on subsequent calls I get just this
All is normal, EXCEPT THAT THE WINDOW NEVER IS DISPLAYED! Ahhh. I have
spent a lot of time trying to figure this one out. I may just start a test
project to see if I can write code to make any window appear. The examples
work fine, but I can't find the difference between their code and mine
(either in Xcode or IB).
What am I missing?!
cocoa-dev mailing list | email@hidden
Do not post admin requests to the list. They will be ignored.
|>Preferences Panel: No Progress (From: Albion Baucom <email@hidden>)|
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.