FROM : Aki Inoue
DATE : Thu Mar 06 03:51:21 2008
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, peiyuan wrote:
> 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 user press a number key, the textfield will not show the number
> at all (without leaving the focus of the textfield).
>
> Pei-Yuan
>
>
>
>>> 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.
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
DATE : Thu Mar 06 03:51:21 2008
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, peiyuan wrote:
> 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 user press a number key, the textfield will not show the number
> at all (without leaving the focus of the textfield).
>
> Pei-Yuan
>
>
>
>>> 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.
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| peiyuan | Mar 5, 11:23 | |
| I. Savant | Mar 5, 12:46 | |
| peiyuan | Mar 6, 02:34 | |
| Aki Inoue | Mar 6, 03:51 | |
| peiyuan | Mar 6, 04:57 |






Cocoa mail archive

