Simulate Popup Menu LostFocus on OS X

If the user is in a text field and then moves to a popup menu, I need to validate my text field in it’s LostFocus event. I add this to my popup menu subclass, but it doesn’t work.

Function MouseDown(X As Integer, Y As Integer) As Boolean // Since popup menus on OS X cannot take focus, setFocus() would // do nothing here. Force the window to take focus instead. me.TrueWindow.SetFocus End Function

This works. Is it safe?

Sub Change() me.TrueWindow.FocusNext() End Sub

Use ClearFocus instead. Just Clearfocus, no self or anything. It will remove the focus from the controls and set it to the window.