Variables not Showing in Text Display Object

In an effort to understand scripting that I did 25 years ago, I set up a TDO to display variables when they were given content by the procedures. (The variables were established as global in the .Initialize procedure.)

They do not show up.

Follow the statement that gives the variable a value with

showvariables variablename

where variablename is the actual name of the variable.

Would each variable need its own statement?

You can write a single showvariables statement to show the value of several variables at once.

showvariables thisvar, thatvar, anothervar

I think you are using a wrong syntax. If you include your variable name in chevrons, Panorama interprets it as a field name. This is why you get an error messages about “exportcell(…”.

It’s not working yet.
*gwindow= info(“WindowName”) *
gwho=Name
showvariables gwindow, gwho
local Dopamine,boxtop
boxtop = info(“Mouse”)
showvariables Dopamine, boxtop

  • /NoShow

If you’re interested in the commented-out NoShow, that’s my way of stepping through portions of the procedure, with the moveable stopping-point.

When you have several variables all in the same text display object, set for literal text like you have there, then all of the variables need to have values, and they all have to be be global, windowglobal, or fileglobal, or you will get an error.

That’s not true. Chevrons work with variables exactly the way they work with fields. Chevrons simply mean that all the characters between them are part of the field or variable name.

1 Like

So, I’ve ditched the 2d ShowVariables statement. The remaining 2 are specified “global” in the .Initialize procedure, and their values are given in the 1st 2 lines of this procedure.

I think you (@WeaBill) may not have understood the significance of this statement by Dave. You cannot display local variables in a form, full stop. Local variables only exist for the duration of the procedure, then they disappear into thin air.

Even though you removed the show variables statement, you have still included two local variables in the Text Display object. Since dopamine and boxtop don’t exist as far as form object go, they produce an error. If there is any error in any part of the formula, all you will get is an error message. You must completely remove these variables from the formula.

1 Like

So done, and now it works. Another example of a thorough, deep scrubbing for monkey-wrenches in the system.