Ensuring host-name matching
Ensuring host-name matching
- Subject: Ensuring host-name matching
- From: Daryle Walker <email@hidden>
- Date: Tue, 14 Jun 2005 20:04:26 -0400
Sorry if this is the wrong list.
I was thinking of writing a program, in Cocoa, that has an entry
field for a host name. (This would be my first Cocoa program.) I've
heard of Formatters that can ensure that a text entry matches some
format. Would it be efficient to use functions from NSHost to create
a formatter to ensure that an entry matches an Internet name (single
name or dotted chain) or number (IPv4 dotted quartet or IPv6 hex
chain)? I think formatters are called at every change, so if I type
a long host name really fast, the formatter can't bog down the
system. (If there is something already like a "NSHostFormatter," let
me know.)
Only the state of the entry field when I click "OK" will be
resolved. Will all the intermediate strings while I type in the host
name clog up any internal caches NSHost may have? (Remember that
those intermediate strings should be checked for format but not
resolved.)
P.S. Port numbers are always 16-bit unsigned numbers (0-65535),
right? Even for IPv6? Cocoa already has a Formatter that can be
adapted for this, right?
--
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden