RE: Communication between a NSTabView and an NSTextField...now NSPrefPane
RE: Communication between a NSTabView and an NSTextField...now NSPrefPane
- Subject: RE: Communication between a NSTabView and an NSTextField...now NSPrefPane
- From: "Huyler, Christopher M" <email@hidden>
- Date: Fri, 12 Dec 2003 11:01:03 -0500
- Thread-topic: Communication between a NSTabView and an NSTextField...now NSPrefPane
Wow, maybe I'm getting better at this cocoa stuff...too bad that took me
a half-hour of researching the NSTabview, NSWindow, NSResponder, and
NSTextField classes.
Now my problem is with the NSPreferencePane. I tried a similar
approach:
- (NSPreferencePaneUnselectReply)shouldUnselect
{
if ([[NSApp MainWindow] makeFirstResponder:nil])
return NSUnselectCancel;
else
return NSUnselectNow;
}
but it always returns true. When this function is called, the sheet has
already been displayed (opposite of the NSTabView). Why can't I just
block these events while the Alert sheet is open?
Apple manages to do what I want in their Network Preferences Panel.
Type in an invalid ip address (eg "123.456")into the Name Servers field
then try clicking everywhere...until you fix the bad address, you cannot
do ANYTHING. This is the functionality that I want.
~ Chris
-----Original Message-----
From: email@hidden
[
mailto:email@hidden] On Behalf Of James Spencer
Sent: Thursday, December 11, 2003 8:33 PM
To: Cocoa Posting
Subject: Re: Communication between a NSTabView and an NSTextField...
On Dec 11, 2003, at 3:42 PM, Huyler, Christopher M wrote:
>
This appears to work...is it the best way?
>
>
- (BOOL)tabView: (NSTabView *)tabView
>
shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem
>
{
>
return [[tabView window] makeFirstResponder:nil];
>
}
>
Cocoa Recipes suggests exactly this.
Spence
James P. Spencer
Rochester, MN
email@hidden
"Badges?? We don't need no stinkin badges!"
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.