Re: NSTextField keyboard event

2008-03-05 Thread peiyuan
hursday, March 06, 2008 10:51 AM To: "peiyuan" <[EMAIL PROTECTED]> Cc: "I. Savant" <[EMAIL PROTECTED]>; "Cocoa" Subject: Re: NSTextField keyboard event Look at http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSFormatte

Re: NSTextField keyboard event

2008-03-05 Thread Aki Inoue
Look at http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSFormatter_Class/Reference/Reference.html#/ /apple_ref/occ/instm/NSFormatter/ isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription : Aki On 2008/03/05, at 17:34, pe

Re: NSTextField keyboard event

2008-03-05 Thread peiyuan
Not exactly. Can NSFormatter monitor user's key input? I don't find any docs about monitoring user input in NSFormatter. I supposed that what the NSFormatter does is after you finish editing, it would change the content. This is not the way I want. I want a real time feedback, that is, even us

Re: NSTextField keyboard event

2008-03-05 Thread I. Savant
I have a window which contains several NSTextField. In these NSTextField, I want that when a user presses a key which is not a number ( 0-9), the active NSTextField will not accept the key input (that is, it does nothing). This looks like a job for NSFormatter ... -- I.S. _

NSTextField keyboard event

2008-03-05 Thread peiyuan
Hi all, Situation: I have a window which contains several NSTextField. In these NSTextField, I want that when a user presses a key which is not a number ( 0-9), the active NSTextField will not accept the key input (that is, it does nothing). What I find on the list: I find several posts similar