Wednesday, May 18, 2011

Another way to enter a property declaration

You probably add new properties to a class, module, window or webpage by typing the name, pressing the tab key, typing the property type, etc. But did you know that you can do all of that in the name field? Just type the entire declaration ("Status as Boolean" for example) into the field where you type the property name and the IDE will parse out the declaration and put everything in the right fields for you.

So you can type:

And then get this after you press tab:


Unknown said...

If you are going to comment to a wide field of people, not just the people who intuitively know what you are writing, how about presenting a ^%$$%# example?

Geoff Perlman said...

@ BigCarl - I've added some screenshots to make it more clear.

Bob Boice said...

A cool little convenience tool/tip. Thanks!

anic297 said...

This is the kind of tips I love. More, please!
Thank you!

Beatrix Willius said...

Very nice!

Kiko Lobo said...


Thanks guys!

Martin Kvapil said...
This comment has been removed by the author.
Martin Kvapil said...

It would be better if it used autocomplete in the declaration window, lowering the risk for typos. But still good :)

moniuch said...

Nice but i would go a step further in enhancement:

for pre-thought objects: to import declarations from a text file or multi-line clipboard

for on-the-fly projects: to inspect typed-in code and - if the relevant, typed-in property does not exist - add an item to the auto-complete list: "Add property xyz As..."


PhoC++ Framework said...

a better solution is set
a combobox control with
usual values (bool,short,integer,string,...)