• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Communication between a NSTabView and an NSTextField...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Communication between a NSTabView and an NSTextField...


  • Subject: RE: Communication between a NSTabView and an NSTextField...
  • From: "Huyler, Christopher M" <email@hidden>
  • Date: Thu, 11 Dec 2003 16:42:14 -0500
  • Thread-topic: Communication between a NSTabView and an NSTextField...

This appears to work...is it the best way?

- (BOOL)tabView: (NSTabView *)tabView
shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem
{
return [[tabView window] makeFirstResponder:nil];
}

-----Original Message-----
From: Huyler, Christopher M
Sent: Thursday, December 11, 2003 3:55 PM
To: 'email@hidden'
Subject: Communication between a NSTabView and an NSTextField...

I have a NSTextField inside a NSTabViewItem with a delegate that
responds to textShouldEndEditing. If That succeeds the NSTextField
performs an action (which saves the information the user entered). If
the user enters invalid information then textShouldEndEditing presents a
sheet telling the user to fix it and returns NO.

However, if the user clicks on a different tab after entering invalid
information, the sheet pops up but the tab still changes. How can I use
tabview:shouldSelectTabViewItem delegate to catch this event and prevent
the tab from changing if the user has entered invalid data? It appears
that tabview:shouldSelectTabViewItem is called before
textShouldEndEditing. Is there a way to reverse this?

Essentially, I want to block all other events until textShouldEndEditing
returns YES.

--
Christopher Huyler
Computer Associates Intl.
mailto:email@hidden
_______________________________________________
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.

  • Follow-Ups:
    • Re: Communication between a NSTabView and an NSTextField...
      • From: James Spencer <email@hidden>
  • Prev by Date: Re: setuid to root App cannot compile NSAppleScript
  • Next by Date: Re: Communication between a NSTabView and an NSTextField...
  • Previous by thread: Re: Communication between a NSTabView and an NSTextField...
  • Next by thread: Re: Communication between a NSTabView and an NSTextField...
  • Index(es):
    • Date
    • Thread