[MacRuby-devel] NSTrackingArea

Thomas R. Koll info at ananasblau.com
Wed Apr 27 08:39:06 PDT 2011


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 #<NSTrackingArea:0x200bfa3c0> (NoMethodError)


class TowerView < NSView
  def awakeFromNib
    tracking_area = NSTrackingArea.alloc.initWithRect self.bounds
    self.addTrackingArea tracking_area
    tracking_area.initWithRect self.bounds
  end
end

Any hint for me, or is it missing in one of those bridge files?



--
Thomas R. "TomK32" Koll
http://ananasblau.com






More information about the MacRuby-devel mailing list