Re: NSFormatter usage
Re: NSFormatter usage
- Subject: Re: NSFormatter usage
- From: Chuck Hill <email@hidden>
- Date: Wed, 8 Feb 2006 10:03:15 -0800
Short Answer:
Yes, this is a good way to accomplish this. See here for an example:
http://wocode.com/cgi-bin/WebObjects/WOCode.woa/2/wa/ShareCodeItem?
itemId=235&wosid=ubftWNRsTTQrxlHSq58YLg
Chuck
On Feb 8, 2006, at 10:00 AM, Dev WO wrote:
Hi guys,
I'm trying to read as much as I can before posting, but sometimes I
just can't find what I'm looking for...
So actually I'm wondering if I could use NSFormatter on a
WOTextField to apply certain rules:
let's say I have a WOTextField for the user to enter his email. I
want to make sure it will be lowercase (just an example). Assuming
I already have in my code a method that take a string as an
argument and return it lowercased, how I would "create" the correct
NSFormatter?
I'm asking this because the other way I can think of is to create
an instance variable to store the email entered, then pass this
object to my toLowerCase method and finally call the setEmail method.
Which is of course not that funny;)
So I was wondering if I could call my toLowerCase method using a
NSFormatter.
toLowerCase is of course just to illustrate my meaning;)
In fact, what I'd like to do is to "format" the text input before
making any validation on it. I think I could use many stuff to
achieve that, and most probably things more advanced/powerful like
stuff from Wonder, but I don't feel like I'm ready for it;) still
too beginner:)
If someone could give me his opinion, regarding both the
NSFormatter part or the "way of thinking";)
Thanks a lot
Xavier
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden