[GRASS-dev] [GRASS GIS] #723: wxGui sqlbuilder: can't launch it

GRASS GIS trac at osgeo.org
Wed Aug 19 07:09:44 EDT 2009

#723: wxGui sqlbuilder: can't launch it
 Reporter:  hamish      |       Owner:  grass-dev at lists.osgeo.org
     Type:  defect      |      Status:  new                      
 Priority:  major       |   Milestone:  6.5.0                    
Component:  wxGUI       |     Version:  svn-trunk                
 Keywords:  sqlbuilder  |    Platform:  Linux                    
      Cpu:  x86-64      |  

 currently I can't get into the wxGUI attribute table SQLBrowser window.

  - start wxgui mapset: user1 loc=spearfish
  - add vector map (fields at PERM)
  - click show attribute table (right most icon on toolbar)
  - select Advanced radio button
  - click on the `[SQL Builder]` button.

 I get this error in the Command Output window:
 .../etc/wxpython/gui_modules/dbm.py", line
 1893, in OnBuilder

 __init__() got an unexpected keyword argument 'vectorName'

 If I edit gui/wxpython/gui_modules/dbm.py as so:
 Index: gui/wxpython/gui_modules/dbm.py
 --- gui/wxpython/gui_modules/dbm.py     (revision 38790)
 +++ gui/wxpython/gui_modules/dbm.py     (working copy)
 @@ -1888,9 +1888,9 @@

      def OnBuilder(self,event):
          """!SQL Builder button pressed"""
 -        self.builder = sqlbuilder.SQLFrame(parent=self, id=wx.ID_ANY,
 -                                           title=_("SQL Builder"),
 -                                           vectorName=self.vectorName)
 +        self.builder = sqlbuilder.SQLFrame(self, wx.ID_ANY,
 +                                           _("SQL Builder"),
 +                                           self.vectorName)
      def OnTextEnter(self, event):

 I can then at least get into the sqlbrowser GUI.

 I hesitate to apply that patch as it is just a shot in the dark and I'm
 not sure what the correct usage should be.

 As Martin mentions in trac #261, the SQL Builder has some serious issues.
 It still does, but I've just fixed a bunch of bugs and now it is somewhat
 less broken than it was before.

  - clicking on Column, Operator, Value (get values first) doesn't add the
 new text at the end of the statement or at the cursor position. It just
 seems to go at the fifth char or so. ??
  - Clicking `[Apply]` doesn't send the string back to the Attribute Table
 Manager GUI. Instead you get an error on `[Close]`
  - How to add support for multi-layer tables??  (see `layer` from L584 in
 dbm.py ?)


Ticket URL: <https://trac.osgeo.org/grass/ticket/723>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list