Handy IDE Tips

| | Comments (1)

There's a new feature in 2006r3 which allows you to default to tabbed browsing, or non-tabbed browsing, depending on your needs (you can find it in the Preferences dialog, on the General tab). If you have tabbed browsing enabled (which it is by default), then double-clicking on an item will bring it up in a new tab. If it's disabled, then the double click behavior will open up a new window.

However, there are times when you want to open something up in the opposite fashion. For instance, let's say you really want to open up the window editor for Window1 in its own window, but you want to continue to enable tabbed editing.

Hold down the Ctrl key (or Cmd on the Mac) and double-click the item. This will do the alternate behavior. So if you have tabbed browsing enabled, this will open the item up in a new window. Or, if you disabled tabbed editing, this will open the item up in a new tab.

The way the IDE currently works when it comes to editing items is like this:

1) We figure out what item is being edited
2) We look to see whether that item is already being edited somewhere. If it is, then we go to that editor and we're done.
3) We look at what your preference is, and whether the alternate action key is held down.
4) We open up the item however is appropriate depending on preference and modifier key.

You may wonder why #2 is in there. I can assure you, it's a very needed step. Imagine having tabbed editing turned off (so double-clicking always opens up a new window). Now follow these steps: First, double click on Window1. Then, double click on the window. Now, switch back to the window editor, and double click again. If #2 wasn't in place, each double click would result in a new window being opened, which would very quickly get unwieldy. So instead, we reuse editors so that you don't get a barrage of redundant editors.

So what happens if you want a redundant editor? Well, that's possible to! Another new behavior in r3 is that the File->New Window command will open up a second instance of the current editor (as well as the Project tab). So let's say you want two code editors open for Class1. You open the first editor up for Class1, then hit Ctrl+Shift+N (the keyboard shortcut for New Window) and it opens up a new window with the code editor for Class1 displayed.

So why the Project tab? Simple -- the IDE prompts you to save when the last window associated with the project is closed. So you could easily get into a state where you no longer have a window with a project tab open (via tearing off tabs, for instance). You need some way to get your projcet tab back if you want to add new project items, etc, so the New Window functionality continues to provide you with the Project tab.

1 Comments

"state where you no longer have a window with a project tab open"

Hah. I was going to report that as a bug earlier -- didn't know that new window fix it. I just went at the project file with a hex editor and removed the UI state info =P.

Leave a comment

Disclaimer

I'm currently an employee of REAL Software. My blog is mine. The opinions represented in this blog are mine as well and may not represent my employer's opinions. All original material is copyrighted and property of the author.

REALbasic® is a registered trademark of REAL Software, Inc. REAL SQL Server™ and Lingua™ are pending trademarks of REAL Software, Inc. All rights reserved.