Curious, and new feature idea: "Watching" a type has unexpected result

In the Watch tab of the Inspector window, instead of entering the name of a variable, I accidentally entered the name of a user-defined type.

I didn’t realize the error until I began stepping through the template and glanced at the Watch tab. To my surprise, I saw, in the Value column, the text (Unexpected end of file.).

While Watching a type name was a mistake on my part. I found the result surprising.

But this suggests to me a new feature. When x:

  • Does not name either a defined variable, or a defined type, display 'x' is undefined (instead of the current variable 'x' is undefined).
  • Names an existing data type, display just type and for user-defined types, perhaps the name of the underlying built-in type. If feasible, additional information more could also be displayed.
  • Names an existing variable, display the value just as is currently done.

I haven’t thought much about how useful this might actually be. It’s just an idea for your consideration.

I believe this is just a case of a poor error message. The (Unexpected end of file.) message comes from the parser that is trying to build a valid parse tree but it runs out of tokens before it can identify a valid parse of the watch. We have changed the error message to say ‘Unexpected syntax’ and we may change this again if we can find a better error message. This update should have the new error message:

http://download.sweetscape.com/010EditorWin64Installer15.0.1c.exe

Graeme
SweetScape Software