Added custom event to Cocoa example