[wingide-users] templating problems

Greg Bowman gbowman at osbsolutions.com
Fri Jun 27 22:09:54 MDT 2008


Hi,
WingIDE 3.1.1-1 (rev 18164), (VI Personality)
strictly gtk programming.

I'm currently setting up a bunch of templates as I used to use another
ide for programming. My problem is that while inserting a template with
an in-line variable name, the indentation goes awry.
Examples work the best:
Template: sniptest
|m|
%(test||mydefault)s = gtk.WINDOW(gtk.WINDOW_TOPLEVEL)
%(test||mydefault)s.set_default_size(500,400)
%(box||mainvbox)s = gtk.VBox()
|!|
%(test||mydefault)s.add(%(box||mainvbox)s)
%(test||mydefault)s.show_all()

so, when I insert this inside another function, say indentation level 1,
and modify the 'test' variable inline to 'win', it moves the
indentation level back to 0:
Code:
sniptest->

def dotest():
    
win = gtk.WINDOW(gtk.WINDOW_TOPLEVEL)
win.set_default_size(500,400)
    mainvbox = gtk.VBox()
    
win.add(mainvbox)
win.show_all()    

I notice as it is changing it, the line I am modifying has a selection
right from the beginning of the line, to the cursors location. I assume
this is causing it to move any other instances to the same location
(the beginning of the line). 

Is there something I am doing wrong, or is this a bug?

Thanks,
Greg.


More information about the wingide-users mailing list