Skip navigation.
 
mlRe: Close a menu programmatically
FROM : Peter Maurer
DATE : Tue Jan 29 18:37:33 2008

> Or is there a Cocoa way?


There's [NSMenu cancelTracking] since Mac OS X 10.5.

The corresponding Carbon function is CancelMenuTracking(), but that 
doesn't always work (i.e., it ceased working for me in Mac OS X 10.4, 
at least when used in a cocoa application); so I did actually have to 
resort to faking an escape keystroke from time to time.

Peter.

Related mailsAuthorDate
mlClose a menu programmatically Pierre Bernard Jan 29, 18:17
mlRe: Close a menu programmatically Peter Maurer Jan 29, 18:37