The expression:
refresh theNote
… informs Tinderbox that changes have been made to a note and the user interface may require updating.
Thus if, a script alters the note's render in the view pane or its $Text or Displayed Attributes, a 'refresh' call ensures the UI reflects the changes just made via AppleScript.