Plug-in functions without parameters are showing extra "help text" in type-ahead pop up

Discussion created by jaketraynham on Jun 2, 2016

Product and version: FileMaker Pro 15.0.1

OS: Mac (Visual) & Win (Non Visual, see Note 2)

Description: Plug-in functions without parameters are showing extra "help text" in type-ahead pop up



How to replicate:

1. Create a plug-in

2. Register a plug-in function with the prototype "Plugin_ValueTest\r/*testing*/"

3. Run FileMaker and open a calculation from Script Workspace

4. Start typing "value"



Expected Results:

The "Plugin_ValueTest" function would show up as a single line like the other Value* functions there.



Actual Results:

The "Plugin_ValueTest" function shows up as a multi-line result showing:







Observations and/or Suggested Fixes:

I was told previously that the "functionName" parameter of RegisterExternalFunction(Ex) was basically being ignored, and only the "functionPrototype" parameter was being passed into the internal structures for calculation functions. So, one way to fix this problem would be to start using that "functionName" parameter.   If that's not possible, then the code that is determining the end of the function name needs to be updated. I assume it's currently looking for "(" or "{" (the later of which was the result of one of my previous bug reports), and needs to be updated to look for "\n" as well.



Note 1: This doesn't appear to be a _visual_ problem on Windows, but the Windows side isn't near as big or pretty as the Mac side.



Note 2: When the Script Workspace came into existence, and the "type ahead word list" for plug-in functions started being auto generated, there were some seemingly random cases where certain words or numbers would bring up certain plug-in functions. For example, with POP3it installed, you could type "1" or "server" in the calculation and the "POP3it_Adv_IsConnected" function would show up in the type-ahead pop up. It was weird and didn't really make sense, but I ignored it. Now with FM15 showing me the full prototype for the "POP3it_Adv_IsConnected" function I understand why typing "server" makes it show up. The full function prototype for "POP3it_AdvIsConnected" is:




  /*Returns 1 if the plug-in is currently Connected to a Mail Server or 0 if not Connected.*/



The word "server" appears in that "help text" and is being parsed by the code that auto generates the "type ahead word list" because it doesn't know the end of the actual function name. (Again, a reason to use the functionName parameter from the RegisterExternalFunction(Ex) call.)