• 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: A question about text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: A question about text
      • From: Tom <email@hidden>
References: 
 >A question about text (From: Tom <email@hidden>)

  • Prev by Date: NSQuickDrawView opacity troubles (solved)
  • Next by Date: Re: Icon and Text in NSTableView
  • Previous by thread: A question about text
  • Next by thread: Re: A question about text
  • Index(es):
    • Date
    • Thread