Tooltips for Script Debugger in FileMaker

When using other development tools, we frequently have a feature to inspect values for variables or fields. Just move the mouse over the variable or field and see what's inside. This is very convenient for debugging a script to quickly see values, especially if all the local variables and object properties don't fit a single variable viewer window.

We got an idea for FileMaker. The macOS NSView class allows an application developer to register a function to provide a tooltip on demand. Instead of filling tooltips earlier, you can later decide on the value and generate it on the fly.

To implement tooltips, we register for providing tooltips. When you move mouse over the text lines, the plugin is called and asked for the tooltip text. We then look on the mouse position and what text is below the mouse position. This text is scanned for a word to left and right. We look for double double colon "::" and for one or two signs. If we have a text starting with or text::text, we evaluate this and see if FileMaker can provide us a value. If we have a value, we show the content in the tooltip. This includes the data type, so you can distinguish a text containing a number from a pure number.

Please notice that we evaluate in current context, so we get current value, not a value from past. And we don't support field or variable names with spaces inside. There may be other characters we incorrectly recognize as being part or not part of an identifier. Let us know if you find a bug.

All our changes to FileMaker Pro move the experience more from low code to pro code category. We provide improvements for the power users to better work in FileMaker. Since we provide the features from outside, we are limited in various ways. For example FileMaker internally knows better about what variables or fields are used and could provide this more efficient. Of course we would enjoy if Claris implements a few of the features into the product. But for the time being, we are happy to help and encourage everyone to try our features. And for the case there will be problems with future versions, we provide a checkbox in preferences to disable the changes.

This feature will be available with next pre-release version of our plugin and is for macOS only. Seems to work fine from FileMaker 15 to the latest 19.x release. Please do not hesitate to contact us with questions.

5 Likes

Christian this is fantastic! You must have a special place in your subconscious mind dedicated to FileMaker after all these years! How you exploit every little thing to achieve goals is remarkable. And the speed! Wasn’t it just 2 days ago that @FileKraft expressed such wish!

1 Like

Well, I read the wish, I remembered the tooltip API from Apple and thought I may just try my luck. So far works just fine.
If you like, I can give you a link for the current build.

1 Like

Sorry if I did not post this in the right place to start with, just some additional considerations:

okay, look now:

3 Likes

I see you already replied in the other thread. Thanks for answering.

Christian, you're awesome.
What happens if variables have a very big content, do you truncate it ?

1 Like

Oh, good idea. Maybe I should cut it to 1000 characters.

1 Like

Yes you probably should, but also if you could fidn a way, maybe a keystroke or soething else to copy the whole variable content in the clipboard it would be very usefull, especially with big variables or trying to do the same thing takes a lot of time due to the terrible data viewer performance with big vars

Now available:
MBS FileMaker Plugin, version 11.1pr4

You guys tried the tooltips?
Works as described or any issues found?

thanks for the update Christian! - will try new tooltip feature but frankly to much mousing involved - I desire just on the line where the script step execution cursor is always and permanently displaying the values involved in the current step if any relevant.

Nethertheless with tooltip amazing improvement since much easier to see what's going on then glancing over to data viewer ..