I just discovered a cool technique for temporarily disabling a Text Editor object. This technique uses a new feature in Panorama X 10.1. Suppose you have a fileglobal variable named DoNotEdit, and this variable can either be empty (editing is allowed) or contain “YES”, in which case editing is not allowed. Simply put this code in the Procedure panel of the Text Editor object.
return startEditing: if DoNotEdit="YES" superobjectclose beep endif return
Now if the DoNotEdit variable is empty (or contains anything other than
"YES"), you can click on the Text Editor object and edit the text inside. But if the DoNotEdit variable contains
"YES", clicking on the object, or trying to type text into it, simply causes the computer to beep. Of course you don’t have to use a variable named DoNotEdit, you can use any formula that produces a true/false result.
To learn about the new feature that allows this, see the Multiple Trigger Options section of the Text Editor Object help page.