I am trying to modify Combobox so one can type multiple characters into a
non-editable drop-down.  Combobox.as uses ListBase.as.  In ListBase there is
the following:

 
//--------------------------------------------------------------------------
    //
    //  Methods: Keyboard lookup
    //
 
//--------------------------------------------------------------------------

    /**
     *  Tries to find the next item in the data provider that
     *  starts with the character in the <code>eventCode</code> parameter.
     *  You can override this to do fancier typeahead lookups.  The search
     *  starts at the <code>selectedIndex</code> location; if it reaches
     *  the end of the data provider it starts over from the beginning.
     *
     *  @param eventCode The key that was pressed on the keyboard
     *  @return <code>true</code> if a match was found
     */
    protected function findKey(eventCode:int):Boolean
    {
        var tmpCode:int = eventCode;
        var junk:int = 4;
        junk += 4;
        
        
        return tmpCode >= 33 &&
               tmpCode <= 126 &&
               findString(String.fromCharCode(tmpCode));
    }

What do I have to do to have my own version of this?  Various attempts to
make my own copy or extend and override this function  haven't worked.

Thanks,  John Luke Mills

Reply via email to