[GRASS-dev] Re: [GRASS GIS] #1187: TclTk digitizer does not recognize right-click

GRASS GIS trac at osgeo.org
Mon Nov 29 16:39:03 EST 2010


#1187: TclTk digitizer does not recognize right-click
---------------------------------------------+------------------------------
 Reporter:  cmbarton                         |       Owner:  grass-dev@…              
     Type:  defect                           |      Status:  new                      
 Priority:  critical                         |   Milestone:  6.4.1                    
Component:  Tcl/Tk                           |     Version:  6.4.0                    
 Keywords:  digitizer, v.digit, right-click  |    Platform:  MacOSX                   
      Cpu:  OSX/Intel                        |  
---------------------------------------------+------------------------------

Comment(by cmbarton):

 The following code works:


 {{{
    # Requested by issue #1187
     if {[tk windowingsystem] eq "aqua"} {

 #               # option + left-click for Mac equals middle-click
                 bind .screen.canvas <Option-Button-1> { c_update_tool %x
 %y 2 }
                 # right-click is acting like a middle-click...
                 bind .screen.canvas <ButtonPress> {
             puts "button: %b"
                         if { %b == 3 } {
                                 c_update_tool %x %y 2
                         } elseif { %b == 2 } {
                                 c_update_tool %x %y 3
                         } else {
                                 c_update_tool %x %y %b
                         }
                 }
         } else {
                 bind .screen.canvas <ButtonPress> { c_update_tool %x %y %b
 }
         }
 }}}


 I did a puts %b and the mouse is registering correctly in TclTk. The
 problem lies in c_update_tool. That is where the buttons are getting
 switched.

 I still get the bind_scroll error, but I don't think it is related. It
 seems to be a different bug. Also polygons don't seem to be closing
 correctly even though drawing ends.

 Finally, it has long been a problem that when I go to register a database
 entry after completing a vector object (point, line, area), it comes up as
 "Cannot update table: DMBI-DBF driver error: SQL parser error: syntax
 error, unexpected WHERE, expecting NAME process in 'where' in statement
 update deleteme set where cat = 1 Error in db_execute_immediate()

 [my test vector file is called "deleteme"]

 Michael

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1187#comment:11>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list