Re: A question about text
Re: A question about text
- Subject: Re: A question about text
- From: "M. Uli Kusterer" <email@hidden>
- Date: Mon, 5 Apr 2004 21:02:41 +0200
At 12:47 Uhr -0400 05.04.2004, Tom wrote:
Now say for instance I want the letter A to carry the value of 5, B
to have the value of 2, etc (like so all the way up the alphabet)
but how can I have a program which scans each and every character
that is typed in the text field, then converting it. But of coarse,
it will and shall print out it's numeric value. I can't seem to
figure out how I can setup a program which does the scanning part of
the individual characters. I'm far too new to Objective-C and COCOA.
Any old repeat loop will do. characterAtIndex: and an NSMutableString
for output. You could use an NSDictionary loaded from a file
(initWithContentsOfFile:) to actually do the translation if it isn't
suitable to do this mathematically.
If you want to get fancier, there's of course also NSScanner.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.