Re: [MacRuby-devel] NSTrackingArea

2011-04-27 Thread Sean Mateus
this worked for me! class TowerView < NSView def awakeFromNib tracking_area = NSTrackingArea.alloc.initWithRect self.bounds, options:(NSTrackingCursorUpdate | NSTrackingActiveInActiveApp), owner:self, userInfo:nil puts track

Re: [MacRuby-devel] NSTrackingArea

2011-04-27 Thread Kam Dahlin
Looking at the sample you pasted: class TowerView < NSView def awakeFromNib tracking_area = NSTrackingArea.alloc.initWithRect self.bounds self.addTrackingArea tracking_area tracking_area.initWithRect self.bounds # <- ??? end end Why the extra call to -initWithRect on the instance of

Re: [MacRuby-devel] NSTrackingArea

2011-04-27 Thread Thomas R. Koll
It's still the same and of course I have the cocoa framework loaded otherwise it wouldn't find the NSTrackingArea class. Am 27.04.2011 um 18:49 schrieb Joshua Ballanco: > Thomas, > > Are you still getting an undefined method error, or something new? Do you > have a "framework 'Cocoa'" line so

Re: [MacRuby-devel] NSTrackingArea

2011-04-27 Thread Joshua Ballanco
Thomas, Are you still getting an undefined method error, or something new? Do you have a "framework 'Cocoa'" line somewhere in your app? - Josh On Wed, Apr 27, 2011 at 12:10 PM, Thomas R. Koll wrote: > > > Nope, still no good. > > Am 27.04.2011 um 18:07 schrieb Kam Dahlin: > > > Hi, > > > > > h

Re: [MacRuby-devel] NSTrackingArea

2011-04-27 Thread Thomas R. Koll
Nope, still no good. Am 27.04.2011 um 18:07 schrieb Kam Dahlin: > Hi, > > http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSTrackingArea_class/Reference/Reference.html > > Looks like the initializer is: > > – initWithRect:options:owner:userInfo: > > Try something like:

Re: [MacRuby-devel] NSTrackingArea

2011-04-27 Thread Kam Dahlin
Hi, http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSTrackingArea_class/Reference/Reference.html Looks like the initializer is: – initWithRect:options:owner:userInfo: Try something like: tc = NSTrackingArea.alloc.initWithRect(self.bounds, options:(NSTrackingMouseEntered

[MacRuby-devel] NSTrackingArea

2011-04-27 Thread Thomas R. Koll
Hi, I trying to listen to events by mouseMoved using a NSTrackingArea as the cocoa docs suggest but I can't get it working in MacRuby. This is my simplified view i want to add the tracking zone but I'm getting: undefined method `initWithRect' for # (NoMethodError) class TowerView < NSView de