Re: Hover button and tracking area questions

2013-01-24 Thread Quincey Morris
On Jan 23, 2013, at 23:49 , Kyle Sluder k...@ksluder.com wrote: There's no need to release and reinstall your tracking areas every time you get -updateTrackingAreas I agree with this part. Regardless, you've failed to implement the pattern properly. You're never removing the tracking areas

Re: Hover button and tracking area questions

2013-01-24 Thread Kyle Sluder
On Thu, Jan 24, 2013, at 12:03 AM, Quincey Morris wrote: It should be pretty obvious why this is causing you to crash when messaging zombie objects. But not this, though it was my first thought, too. However, it would be a bug in the frameworks if 'addTrackingArea:' didn't retain the

Re: Hover button and tracking area questions

2013-01-24 Thread Kyle Sluder
On Jan 24, 2013, at 12:30 AM, Kyle Sluder k...@ksluder.com wrote: But considering that the API is intended to be used to create and install tracking areas on objects that are potentially different from their owner, it seems sensible that -addTrackingArea: might not retain the tracking area.

Re: Hover button and tracking area questions

2013-01-24 Thread Nick Rogers
Hi, The code that I pasted was going thru change. In the original copy, I was removing tracking area before adding the new. So now my thinking goes that I shouldn't have added tracking areas after the initial one, at least I am now doing that and hoping it not to crash. The exception was:

Re: Hover button and tracking area questions

2013-01-24 Thread Markus Spoettl
On 1/24/13 12:06 PM, Nick Rogers wrote: The code that I pasted was going thru change. In the original copy, I was removing tracking area before adding the new. So now my thinking goes that I shouldn't have added tracking areas after the initial one, at least I am now doing that and hoping it

Re: Hover button and tracking area questions

2013-01-24 Thread Nick Rogers
Hi, Thanks for the reply. The code for HoverButton class is almost same as I posted in the first email with the exception that in the following method I was removing trackingArea before releasing it. - (void)updateTrackingAreas { if (trackingArea) { [self

Re: Hover button and tracking area questions

2013-01-24 Thread Markus Spoettl
On 1/24/13 3:50 PM, Nick Rogers wrote: The code for HoverButton class is almost same as I posted in the first email with the exception that in the following method I was removing trackingArea before releasing it. - (void)updateTrackingAreas { if (trackingArea) { [self

Re: Hover button and tracking area questions

2013-01-24 Thread Kyle Sluder
On Thu, Jan 24, 2013, at 07:05 AM, Markus Spoettl wrote: Maybe the superclass (NSButton) isn't smart enough to understand the someone else may change the tracking areas and does something nasty with it (like assuming all tracking areas currently added are owned too). What if you remove

Hover button and tracking area questions

2013-01-23 Thread Nick Rogers
Hi, I have just a tab view on my main window and I switch tabs based on user input. First tab has three hover buttons and on clicking one of them, it takes to another tab which two hover buttons. After clicking one of the two hover buttons, I switch tab and show a table view and then show and

Re: Hover button and tracking area questions

2013-01-23 Thread Kyle Sluder
On Wed, Jan 23, 2013, at 11:14 PM, Nick Rogers wrote: - (void)updateTrackingAreas { if (trackingArea) { [trackingArea release]; trackingArea = nil; } I was just working with tracking areas today, and I've come to the conclusion that this pattern is wrong. There's no