mouseMoved

Hello,

On xCode 7, Swift2 for OS X10.11, I cannot figure to make it work :

Here is the code :

[code] override func viewDidMoveToWindow() {
window?.acceptsMouseMovedEvents = true

    let options: NSTrackingAreaOptions = [.MouseEnteredAndExited , .MouseMoved , .InVisibleRect]
    let trackingArea = NSTrackingArea(rect: NSRect(), options: options, owner: self, userInfo: nil)
    
    addTrackingArea(trackingArea)
}[/code]

and I get : “Dice[11264:523100] trackingArea options 0x203 do not specify when the tracking area is active”

Is someone has a solution ?

Thank you

I used this to set the FirstResponder alias “Active View”

override func mouseEntered(theEvent: NSEvent) {
Swift.print(“IN”)
theEvent.window?.makeFirstResponder(self)
}

override func mouseExited(theEvent: NSEvent) {
    Swift.print("OUT")  
}