Re: Corrected: Bug: Availability bindings on NSTextField cause attached NSNumberFormatter to fail
Re: Corrected: Bug: Availability bindings on NSTextField cause attached NSNumberFormatter to fail
- Subject: Re: Corrected: Bug: Availability bindings on NSTextField cause attached NSNumberFormatter to fail
- From: "email@hidden" <email@hidden>
- Date: Fri, 10 Jan 2014 12:17:47 +0000
Hi Peter
The code as posted behaves as you explain.
However, if you bind a value to the NSTextField then things work as expected and the NSFormatter error sheet is displayed.
I am not sure exactly why this occurring - perhaps some else can throw some light on it.
Perhaps the binding mechanics / NSFormatter interaction is poor when the value binding isn’t in place.
Regards
Jonathan
On 10 Jan 2014, at 09:31, Peter <email@hidden> wrote:
> Hi Jonathan,
>
> my bad, sorry for the confusion! You are right, it is an NSTextField.
> Find the corrected text below.
>
> Am 10.01.2014 um 10:24 schrieb email@hidden:
>
>> Hi Peter
>>
>> You say NSTextView. Do you mean NSTextField?
>>
>> Can we take a look at your demo project?
>>
>> Jonathan
>>
>> On 10 Jan 2014, at 09:10, Peter <email@hidden> wrote:
>
> This cost me a couple of hours of sleep.
>
> OS 10.9.1, Xcode 5.0.2
>
> In my app I have an NSTextField with an NSNumberFormatter attached to it. The latter limits input to integers of a specified range.
>
> As soon as bind the NSTextField enabled or editable properties to a simple boolean property in my controller (no other bindings in place), the number formatter no longer honors the range constraints and lets values pass unfiltered.
>
> Without bindings, the system beeps when trying to enter a prohibited value.
> With bindings, range constraints are ignored while non-integer input is blocked, but without the system beep.
>
> Changing SDKs, setting the number formatter up in code, binding to the encapsulated NSTextViewCell etc. do not fix the issue.
>
> Has anybody seen this?
> I have searched radars but could not find anything.
>
> I have a bare bones project exhibiting this bug 100% deterministically, which I could send to interested parties (or upload to GitHub).
> I have never done that before, but I intend to file a radar, unless somebody finds a fundamental flaw in my setup.
>
> Thanks!
>
> Peter
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
Regards
Jonathan Mitchell
Mugginsoft LLP
email@hidden
-----------------------------------------------------------------------------
KosmicTask - the Integrated Scripting Environment for OS X.
http://www.mugginsoft.com/KosmicTask
-----------------------------------------------------------------------------
Follow on Twitter @KosmicTask
-----------------------------------------------------------------------------
Objective-C and OS X contract work undertaken
http://www.linkedin.com/in/mugginsoft
-----------------------------------------------------------------------------
Github http://github.com/mugginsoft
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden