• 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: NSTextField delegate that will monitor user input
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField delegate that will monitor user input


  • Subject: Re: NSTextField delegate that will monitor user input
  • From: "Laurent Daudelin" <email@hidden>
  • Date: Thu, 04 Dec 2003 17:58:50 -0500

On 04/12/03 17:13, "Huyler, Christopher M" <email@hidden>
wrote:

> Here's what I'm trying to do:
> 1) Check each character the user enters into a NSTextField to make sure
> it is a number or period (for an ip address). If it is, allow it to be
> entered, if it isn't, don't allow it to be entered.
> 2) When the user is finished, check the syntax and save it.
>
> The problem I am having is that an NSTextField uses the Window's Field
> Editor. I tried to set the Field Editor's delegate to the current
> object (which is the NSTextField's delegate) but after I execute the
> line [fieldEditor setDelegate:self], textShouldEndEditing never gets
> called. How can I combine these two delegates to get the results I'm
> looking for?
>

Why not using a text formatter with a specific IP address mask of some sort?

-Laurent.
--
========================================================================
Laurent Daudelin Developer, Multifamily, ESO, Fannie Mae
mailto:email@hidden Washington, DC, USA
************************ Usual disclaimers apply ***********************
_______________________________________________
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.

References: 
 >NSTextField delegate that will monitor user input (From: "Huyler, Christopher M" <email@hidden>)

  • Prev by Date: Re: NSTextField delegate that will monitor user input
  • Next by Date: Subclassing NSCell
  • Previous by thread: Re: NSTextField delegate that will monitor user input
  • Next by thread: NSTextField: how to make the text cursor blink?
  • Index(es):
    • Date
    • Thread