The Tree of Widsdom

智慧の樹

The Silver Age of display handling

Using eval() to reference a utility note

Instead of manually rewriting the $DisplayExpression in the Display Expression box or in the even tinier Get Info textfield, a better method would be to enter it as the $Text of a utility note. The advantage of using a note is ease of editing and free use of whitespace—if you write your code in a note, you can display multiple lines, take advantage of indenting, and edit the code like an ordinary TextEdit document:

Elegant.
Elegant.

To access this code, use the eval() action code to evaluate the code, which is actually a string inside the $Text attribute of a dedicated utility note:

Lots of space in here. You’ll see why this is helpful below.
Lots of space in here. You’ll see why this is helpful below.