Using dreamweaver.codeHints.addFunction() in CS4
Hello,
I have developed an extension (PHP Code Hints) which finds custom PHP variables and functions and adds them to Dreamweaver Code Hints using dw.codeHints.addMenu() and dw.codeHints.addFunction(). It was developed on CS3. Now, both functions have additional parameters on CS4.
PHP Code Hints still works fine on CS4 without any modifications as far as variables (use of addMenu) are concerned. But using addFunction does not yield the desired results: custom functions do not appear anymore in code hints. Yet they seem to be recorded somehow since when you type the parenthesis after the function name in source code, the name of the function and its arguments are shown as a tooltip:

Here's my code which works on CS3:
function AjouterIndicateursFonctions(arrFonctions) {
var i = 0;
if (arrFonctions != null) {
// Reset function codehints
dreamweaver.codeHints.resetMenu("CodeHints_Function_Arguments", arrFonctions, "PHP_MySQL");
// Inserts functions into codehints
for (i = 0; i < arrFonctions.length; i++) {
// Rebuilds function list
dw.codeHints.addFunction(
"CodeHints_Function_Arguments", // Menu group
arrFonctions, // Functions to add
"PHP_MySQL", // Document types
false) // Case sensitiveness
}
}
}
CS4 documentation on dw.codeHints.addFunction() gives the new arguments, but it is not very understandable without an example (the given one has not been updated from... MX?), and types are not always described. So I am stuck on this problem and cannot find an answer. I was advised by David Powers to ask the forum for help, especially from Randy Edmunds.
So can you help on how to use the addFunction() on CS4?
Thank you in advance.
Best regards,
Xavier Pitel
