Flex Builder tip: How to dismiss the “Add Watch Expression” dialog from the keyboard

One add-watch-expressionof the most common Flex Builder debugger complaints is that when you bring up the dialog to add a new expression to the Expressions view (e.g. via right-click > Add Watch Expression), you cannot dismiss this dialog using the keyboard alone. The dialog has a multi-line edit box, and if you press Return, that just adds a carriage return to the edit box. Similarly, trying to tab out of the edit box doesn’t work — it just inserts a tab character into the edit box.

This drives keyboard-heavy users (like me) crazy. However, it turns out that there is a way to dismiss this dialog from the key:

Type Shift+Return instead of Return.

There is, in fact, a good reason why this dialog has a multi-line edit box. As explained in this Eclipse bug, some languages (including Java) allow you to enter more than just a simple expression into this box. And since the dialog comes from Eclipse’s code rather than from Flex Builder’s, we can’t just change it to have a single line.

Since this is such a common point of frustration for Flex Builder users, in the above-linked bug I have asked that they find some way to make this easier for people to deal with, e.g. by perhaps having a short message in the dialog mentioning Shift+Return. But in any case, you now know the secret handshake — enjoy!

2 Comments so far

  1. Sunil on August 28th, 2009

    Thanks, that always bothered me!

  2. Flex Boy on October 8th, 2009

    [flexcoders] NFC (Near Field Communication) API in FlashPlayer 10.1
    Vote for this !!

    http://bugs.adobe.com/jira/browse/FP-2909

Leave a reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word