TBrowse() > Event handling |
Sets or retrieves a code block associated with a navigation key.
:setKey( <nInkey>, [<bNewBlock>] ) --> bOldBlock
Method :setKey() maintains a dictionary of inkey codes and associated code blocks that are processed in method :applyKey(). If <bNewBlock> is omitted, the method returns the current code block associated with <nInkey>. If <bNewBlock> is a code block, the return value is the replaced code block if an association exists for <nInkey>. An existing inkey/code block association is removed from the :setKey() dictionary when NIL is explicitly passed for <bNewBlock>.
When a new code block is added to the :setKey() dictionary, it should accept two parameters since the TBrowse object and the inkey code are passed to it in method :applyKey(). Also, the return value of the code block should be one of the #define constants TBR_EXIT, TBR_CONTINUE or TBR_EXCEPTION. Refer to method :applyKey() for a discussion of these constants.
http://www.xHarbour.com