Alexander Zenkov:

Dear Neil Hodgson. I'm completely agree with you about RECURSIVE_CALL, but it
simple to transfere them into RECURSIVELESS function. For example it's possible
to write like that:

  Using recursion in menu manipulation isn't a big concern. The
_MAX_EXTENSION_RECURSIVE_CALL symbol I mentioned is used in SendEditor
and MenuCommand where it limits the amount of times the method may be
reentered. Say OnSendEditor was implemented to perform
editor:AddText("x"), then one call will result in another
(SendEditor(SCI_ADDTEXT)) call and that will cause another and so on
resulting in infinite recursion. Thus, there is a check to limit the
number of calls but it still leaves the application in an unexpected
state.

  Because of this I consider OnSendEditor dangerous. It is also
expensive as it means every call to Scintilla results in executing Lua
engine code. While there are some potential uses for OnSendEditor, it
just doesn't look like it is worth it to me.

  Neil
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to