if (eventKind == OS.kEventMouseDown) {  hideToolTip ();
switch (eventKind) {  case OS.kEventMouseDown:  System.out.println("handleApplicationCallback: kEventMouseDown");   fTrackedControl= 0;  hideToolTip();
	private int handleApplicationCallback(int nextHandler, int eRefHandle, int userData) {			MacEvent mEvent= new MacEvent();				int eventClass= OS.GetEventClass(eRefHandle);		int eventKind= OS.GetEventKind(eRefHandle);				//System.out.println("handleApplicationCallback: " + MacUtil.toString(eventClass));		switch (eventClass) {						case OS.kEventClassMenu:			switch (eventKind) {			case OS.kEventMenuBeginTracking:				//System.out.println("kEventMenuBeginTracking");				break;			case OS.kEventMenuEndTracking:				//System.out.println("kEventMenuEndTracking");				break;			}			break;				case OS.kEventClassKeyboard:			if (OS.ConvertEventRefToEventRecord(eRefHandle, mEvent.getData())) {				switch (eventKind) {				case OS.kEventRawKeyDown:				case OS.kEventRawKeyRepeat:					int cmd= OS.MenuEvent(mEvent.getData());					if (OS.HiWord(cmd) != 0) {						System.out.println("doMenuCommand: " + cmd);						doMenuCommand(cmd);						break;					}					handleKeyEvent(SWT.KeyDown, mEvent);					break;									case OS.kEventRawKeyUp:					int code= mEvent.getKeyCode();					if (code == 48)	// AW Hack for getting the Tab to work						handleKeyEvent(SWT.KeyDown, mEvent);					else							handleKeyEvent(SWT.KeyUp, mEvent);					break;									case OS.kEventHotKeyPressed:					System.out.println("HOT KEY PRESSED");					break;				}			}			break;					case OS.kEventClassMouse:			if (eventKind == OS.kEventMouseDown) {									hideToolTip ();					OS.ConvertEventRefToEventRecord(eRefHandle, mEvent.getData());								MacPoint where= mEvent.getWhere();				int[] w= new int[1];				short part= OS.FindWindow(where.getData(), w);												int oldPort= OS.GetPort();				OS.SetPortWindowPort(w[0]);				OS.GlobalToLocal(where.getData());				OS.SetPort(oldPort);								if (part == OS.inMenuBar) {					doMenuCommand(OS.MenuSelect(mEvent.getWhere().getData()));					return OS.kNoErr;				}			}					return OS.eventNotHandledErr;								case SWT_USER_EVENT:	// SWT1 user event			//System.out.println("handleApplicationCallback: user event " + eventKind);			return OS.kNoErr;					default:			System.out.println("handleApplicationCallback: unknown event class" + MacUtil.toString(eventClass));			break;		}		return OS.eventNotHandledErr;	}