Re: Convert spelled out numbers to digits?

2013-03-27 Thread Kirk
On Mar 27, 2013, at 3:51 PM, "Eric E. Dolecki" wrote: > ! Yeah, that was my reaction also. When you do try text it can't interpret ("eleventy-seven", "dozen"), nil is returned. It would seem like one could thus do a fairly easy scheme of locating numeric words in arbitrary text, then g

Re: Convert spelled out numbers to digits?

2013-03-27 Thread Eric E. Dolecki
! Thank you :) Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki Imagineric On Wed, Mar 27, 2013 at 3:51 PM, Kirk wrote: >NSNumberFormatter * nf = [[NSNumberFormatter new] autorelease]; >[nf setN

Re: Custom insertion point

2013-03-27 Thread Kyle Sluder
You posted this same question yesterday. If anyone has any ideas, they will reply. You don't need to post it again. --Kyle Sluder On Wed, Mar 27, 2013, at 12:55 PM, Peng Gu wrote: > Hi, > > I'm changing the insertion point size by overriding > *-(void)drawInsertionPointInRect:(NSRect)aRect > col

Custom insertion point

2013-03-27 Thread Peng Gu
Hi, I'm changing the insertion point size by overriding *-(void)drawInsertionPointInRect:(NSRect)aRect color:(NSColor *)aColor turnedOn:(BOOL)flag, *But it doesn't handle the first blink (when you move the insertion point, it goes back to normal) I managed to handle the first blink by overriding

Re: Convert spelled out numbers to digits?

2013-03-27 Thread Kirk
NSNumberFormatter * nf = [[NSNumberFormatter new] autorelease]; [nf setNumberStyle: NSNumberFormatterSpellOutStyle]; NSLog(@"Survey Says...%@", [nf numberFromString:@"three"]); Yields "Survey Says...3" ** Also worked with "seventy-three" and "thirteen point five" ** This was under iOS.

Re: Working Programmatically with Bound Controller's Selection

2013-03-27 Thread William Sumner
On Mar 27, 2013, at 12:14 PM, "William T. McVay" wrote: > In my XIB, I have a pop-up button bound to an array controller that is bound > to an NSMutableArray in my NSWindowController subclass instance. I added both > the pop-up and the array controller in IB. Selection works, and I can use > b

Working Programmatically with Bound Controller's Selection

2013-03-27 Thread William T. McVay
In my XIB, I have a pop-up button bound to an array controller that is bound to an NSMutableArray in my NSWindowController subclass instance. I added both the pop-up and the array controller in IB. Selection works, and I can use bindings to display the selected object's property values, as discu

updating attributes in a UITextView

2013-03-27 Thread Koen van der Drift
In a UITextView, I am using attributes to highlight certain parts of the text, based on a user action. Since the attributedText property is not mutable, for now I am creating a new string, add the attribute, and then set that for the attributed string. It works, but I wonder if this is the corr

Re: Convert spelled out numbers to digits?

2013-03-27 Thread Gary L. Wade
I know that ICU, and to some degree the Cocoa frameworks also, can format numerical types into textual form, but I'm not sure about going the other direction. Look into NSNumberFormatterSpellOutStyle. -- Gary L. Wade http://www.garywade.com/ ___ Coco

Re: Convert spelled out numbers to digits?

2013-03-27 Thread Keary Suska
On Mar 27, 2013, at 7:49 AM, Eric E. Dolecki wrote: > I have an application where I cannot control how string data is formatted - > and I am interested in numbers. Sometimes I get a "five" instead of a "5" > or an "eleven" instead of an "11" - and so on. > > Is there an easy way to convert these

Convert spelled out numbers to digits?

2013-03-27 Thread Eric E. Dolecki
I have an application where I cannot control how string data is formatted - and I am interested in numbers. Sometimes I get a "five" instead of a "5" or an "eleven" instead of an "11" - and so on. Is there an easy way to convert these to numeral string representations? Or should I just make a mons