Neil Hodgson wrote:
>As well as OnDwellStart, Mitchell added OnKey.
>Are there other good candidates? Adding parameters to existing
>functions could be considered if there was a very good case.

One thing I'd like to see is an OnChange event. I think I saw something
similar mentioned in the interface, but afaik it is not implemented for Lua.

A use case would be a script for HTML editing that updates the closing tag
whevener the starting tag changes. I wrote this in Lua, and try to detect 
changes
with the OnChar event. It works quite well, but it isn't perfect. For example,
you might mistype something, say you want to change a <p> into a <div>, and you
type 'divb' while overwriting the 'p'. My script will update the closing tag to
be </divb>. You then press backspace to delete the 'b', but my script can't 
detect
it and can't update the closing tag. (The workaround is to do backspace twice
and type the 'v' again).

As this is probably very complicated (there are really many changes you
can make to a document, which means you have to think very carefully about how
to give enough information when calling OnChange() without making it too
bloated or hard to use) and I'm not capable of doing this myself, I guess
you might want to go on with the changes. Just wanted to mention it since you
were asking about changes to the extension interface.

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

Reply via email to