Re: Exception when entering too big value in text field (with number formatter)
Re: Exception when entering too big value in text field (with number formatter)
- Subject: Re: Exception when entering too big value in text field (with number formatter)
- From: Antonio Nunes <email@hidden>
- Date: Sun, 23 Oct 2011 10:42:09 +0200
I looked a bit deeper and the problem seems to be, not so much with having a formatter attached to the field, but more essentially with returning no from the control:isValidObject: delegate method, when the text field's value is bound to an object controller. This causes the system to want to put up an alert and that appears to cause issues if the text field lives in a popover.
I created a minimal project exhibiting the issue, and will submit it to the bug reporter.
-António
On 22 Oct 2011, at 07:27, Antonio Nunes wrote:
> On 21 Oct 2011, at 17:23, Nick Zitzmann wrote:
>
>>> 2011-10-21 11:49:49.520 AwesomeApp[35994:707] -[NSPopoverFrame titlebarRect]: unrecognized selector sent to instance 0x1050e7a30
>>
>> …often happens when an object was deallocated, and then some other object was allocated in its place, and then the original object was addressed after it was deallocated & something else took its place. Try running your code using Instruments' zombies template and then reproducing the problem. If it stops due to a zombie access, and the trace shows the problem happened completely within the AppKit, then it is a framework bug. Otherwise, your code most likely over-released something.
>
> Thanks Nick,
>
> I fired up Zombies and it did not catch anything. I also had a close look at my code and, not only am I not deallocating anything, the whole view controller code doesn't even allocate any objects.
>
> Then I had a search on "titlebarRect" and found a cocoa-dev message from August where the author wrote:
>
>> I'm playing with popover too and noticed a problem when using formatters. If there's a validation error, my application crashes when the framework try to present a sheet displaying the error.
>>
>> -[NSPopoverFrame titlebarRect]: unrecognized selector sent to instance 0x102075780
>>
>> Of course, popovers don't have titlebars…
>
> Time to fire up the bug reporter I guess…
>
> -António
>
> -----------------------------------------------------------
> And you would accept the seasons of your
> heart, even as you have always accepted
> the seasons that pass over your field.
>
> --Kahlil Gibran
> -----------------------------------------------------------
>
>
>
> _______________________________________________
>
> 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
-----------------------------------------------------------
Don't believe everything you think
-----------------------------------------------------------
_______________________________________________
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