Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Upper case string in formatter



Hello...

If you want to update the entered text as it is typed in by the user, then you do want to use isPartialStringValid::: to change the string to uppercase.

For example, something like:

/* typed in mail, etc... */

- (BOOL)isPartialStringValid:(NSString *)partialString newEditingString:(NSString **)newString errorDescription:(NSString **)error
{
NSString *upString = [partialString uppercaseString];


	if ([upString isEqualToString:partialString]) {return TRUE;}
	else
	{
		*newString = upString;
		return FALSE;
	}
}


Hope that helps,

	Louis


Dear list!

I need my formatter to convert all characters to upper case. I have tried
to change the string in 'isPartialStringValid' but it does not work. Can
someone please tell me the right place in the formatter to place this code.

Best regards Peter


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Upper case string in formatter (From: "Peter Karlsson" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.