Quoting Joerg Fischer <[EMAIL PROTECTED]>:

> Hi,
>
> the documentation for the calltips() function says:
>
>    "Returns the new calltip's ID on success, 0 on failure."
>
> Unfortunately, this holds only if the mode is "tipText", which is the
> default mode.  Otherwise, 1 is returned on success and 0 on failure,
> but 1 isn't the calltip's ID in general.
>
> A short analysis reveals that this mistake can't really be
> accidental.  The function showMatchingCalltip() is declared as void,
> although it could easily return the calltip's ID or 0 on failure.
>
> The reason is probably that the calltips code was tried to be
> integrated with the tags code in tags.c, but tags.c isn't really
> written in an easy-to-extend way.  So, the showMatchingCalltip() is
> called through findAllMatches(), which returns a status number, that
> is -1 on error, 0 for nothing found, and 1 for something found.
> However, only the value 0 is actually used.  Therefore, I see no harm
> to change the return values to -2 on error, -1 for nothing found, and
> some number >= 0 for something found.  Then this value can also be
> used to let the calltip's ID pass through in all cases.

I always wanted to know what one could do with a calltip id, other than close
a calltip. Any idea?

Tony
-- 
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop

Reply via email to