[wingide-users] New script: `instantiate`

cool-RR cool-rr at cool-rr.com
Tue Apr 26 06:51:17 MDT 2011


Hello folks,

I made a new script for Wing IDE 4.

It’s called `instantiate`.

What it does is simple. Often you want to instantiate an object from a class
like this:

    cat_nip = CatNip()

The annoying thing about typing this is that you don’t get autocompletion
for `cat_nip` because it doesn’t exist yet. But you do usually get
autocompletion for `CatNip`. Hence this script: You type `CatNip`, execute
the script, and then automatically get this line:

    cat_nip = CatNip()

With the cursor already placed inside the parentheses for you to type the
arguments.

The source is on GitHub:

https://github.com/cool-RR/cute-wing-stuff

Enjoy!


Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20110426/c092f7ec/attachment.html


More information about the wingide-users mailing list