Re: tracking area problems on 10.4.11

2008-07-04 Thread John C. Randolph
On Jul 2, 2008, at 11:21 AM, Wesley Smith wrote: I did that. my window and content view both have those methods defined. I've tried setting both of them to owner to no avail :( From Q&A #1355: Technical Q&A QA1355 Why aren't my tracking rects working? Q: I'm trying to implement tracking r

RE: tracking area problems on 10.4.11

2008-07-03 Thread Abernathy, Joshua
t: Re: tracking area problems on 10.4.11 Hi Tony, Thanks for the response. I'm still not getting the trigger. Based on your advice, I changed the code to: NSRect f = [mWindow frame]; f.origin.x += 10.; f.origin.y += 10.; f.size.width -= 20.; f.size.he

Re: tracking area problems on 10.4.11

2008-07-03 Thread Wesley Smith
> The rect parameter here is in the coordinate system of the receiver, > so this makes no sense. Instead pass [[mWindow contentView] bounds]. Thanks!! Hit the nail on the head. Now it actually works. > By passing the window's frame, you're taking the window's location in > screen coordinates an

Re: tracking area problems on 10.4.11

2008-07-03 Thread Wesley Smith
I did that. my window and content view both have those methods defined. I've tried setting both of them to owner to no avail :( wes On Wed, Jul 2, 2008 at 11:18 AM, Tony Becker <[EMAIL PROTECTED]> wrote: > Change the owner: parameter from [mWindow contentView] to self, or whatever > class insta

Re: tracking area problems on 10.4.11

2008-07-03 Thread Wesley Smith
Hi Tony, Thanks for the response. I'm still not getting the trigger. Based on your advice, I changed the code to: NSRect f = [mWindow frame]; f.origin.x += 10.; f.origin.y += 10.; f.size.width -= 20.; f.size.height -= 20.; [[mWindow contentView] addTrackin

Re: tracking area problems on 10.4.11

2008-07-02 Thread Michael Ash
On Tue, Jul 1, 2008 at 5:29 PM, Wesley Smith <[EMAIL PROTECTED]> wrote: > Hi, > I'm trying to get the following events to trigger: > > - (void)mouseEntered:(NSEvent *)theEvent > - (void)mouseExited:(NSEvent *)theEvent > > I'm using this call to get it to work: > > [[mWindow contentView] addTracking

Re: tracking area problems on 10.4.11

2008-07-02 Thread Tony Becker
Change the owner: parameter from [mWindow contentView] to self, or whatever class instance has the enter/exit methods. On Jul 2, 2008, at 2:10 PM, Wesley Smith wrote: Hi Tony, Thanks for the response. I'm still not getting the trigger. Based on your advice, I changed the code to: NSRect f

Re: tracking area problems on 10.4.11

2008-07-02 Thread Tony Becker
As a general rule, the tracking rects are smaller then the whole window, and technically need the mouse to enter/exit, which I don't see happening, if they are the same size. Try something like: [[mWindow contentView] addTrackingRect:NSInsetRect([mWindow frame], [mWindow frame].size.width/

tracking area problems on 10.4.11

2008-07-02 Thread Wesley Smith
Hi, I'm trying to get the following events to trigger: - (void)mouseEntered:(NSEvent *)theEvent - (void)mouseExited:(NSEvent *)theEvent I'm using this call to get it to work: [[mWindow contentView] addTrackingRect:[mWindow frame] owner:[mWi