On 7/10/07, Tommaso Cucinotta <[EMAIL PROTECTED]> wrote:
Hi, as a newbie of the LyX code, I'm just curious about the purpose of the FuncRequest/dispatch mechanism. Specifically, it is not clear to me why from the GUI some functions produce a formatted text string that is dispatched through a FuncRequest object, for being parsed later somewhere else in the code, and finally result into a method call (e.g. LFUN_WORD_FIND, in files ControlSearch.cpp, LyxAction.cpp, LyXFunc.cpp, lyxfind.cpp). While this could be useful to allow activation of the functionality from the action buffer or a script, why don't just call the method, instead, from the GUI classes ?
insets, text, gui may handle the same LFUN in different ways under different situations. If you trace a LFUN, you can sometimes see 'get a message, if a condition is met, process and mark this lfun as dispatched, otherwise, pass this lfun untouched to someone else'. Cheers, Bo