// -------------------------------------------------------------------------------
        //	handleTextDidChange:
        //
        //	The text in NSSearchField has changed, try to attempt type completion.
        // -------------------------------------------------------------------------------
        public void handleTextDidChange(NSNotification obj)
        {
            // As per the documentation:
            //  Use the key "NSFieldEditor" to obtain the field editor from the userInfo
            //	dictionary of the notification object
            NSTextView textView = (NSTextView)obj.UserInfo.ObjectForKey((NSString)"NSFieldEditor");

            // prevent calling "complete" too often
            if (!completePosting && !commandHandling)
            {
                completePosting = true;
                textView.Complete(null);
                completePosting = false;
            }

            if (commandHandling)
            {
                commandHandling = false;
            }
        }