[GRASSGUI] Re: [GRASS-dev] wxgrass prototype

Daniel Calvelo dca.gis at gmail.com
Thu Mar 22 06:16:27 EDT 2007


Oooops. My fault:

--- Gism/menuform.py    2007-03-22 05:12:22.000000000 -0500
+++ Gism/mff.py 2007-03-22 05:14:55.000000000 -0500
@@ -380,7 +380,7 @@
             self.btn_ok = wx.Button(self.panel, ID_RUN, "OK")
             btnsizer.Add(self.btn_ok, 0, wx.ALL| wx.ALIGN_CENTER, 10)
             self.btn_ok.SetDefault()
-            self.btn_apply.Bind(wx.EVT_BUTTON, self.onApply)
+            self.btn_apply.Bind(wx.EVT_BUTTON, self.OnApply)
             self.btn_ok.Bind(wx.EVT_BUTTON, self.OnOK)
         else: # We're standalone
             self.btn_run = wx.Button(self.panel, ID_RUN, "Run")

D.





On 3/22/07, Moritz Lennert <mlennert at club.worldonline.be> wrote:
> On 22/03/07 10:56, Daniel Calvelo wrote:
> > Moritz, that's SAX not finding its DTD file. Try this patch:
> >
> > --- menuform.py 2007-03-22 04:51:49.000000000 -0500
> > +++ mff.py      2007-03-22 04:55:08.000000000 -0500
> > @@ -578,7 +578,7 @@
> >             cmd = cmd + r' --interface-description'
> >             cmdout = os.popen(cmd, "r").read()
> >             p = re.compile( '(grass-interface.dtd)')
> > -            cmdout2 = p.sub( gmpath+r'/grass-interface.dtd', cmdout)
> > +            cmdout2 = p.sub( gmpath+r'grass-interface.dtd', cmdout)
> >             handler = processTask()
> >             xml.sax.parseString(cmdout2, handler)
>
>
> No the problem was the fact that gmpath was hardcoded to /etc/wx/gism
> not /etc/wx/Gism on line 20 in gismutils.py.
>
> But now I get the following when trying to add a layer:
>
> Traceback (most recent call last):
>    File "/usr/lib/grass/etc/wx/gism.py", line 363, in addVector
>      self.SetTree('vector')
>    File "/usr/lib/grass/etc/wx/gism.py", line 378, in SetTree
>      self.maptree.AddLayer(disp_idx, layertype)
>    File "/usr/lib/grass/etc/wx/Gism/gismutils.py", line 150, in AddLayer
>      menuform.GUI().parseCommand('d.vect', gmpath,
> completed=(self.getOptData,layer), parentframe=self)
>    File "/usr/lib/grass/etc/wx/Gism/menuform.py", line 537, in parseCommand
>      mf = mainFrame(self.parent ,-1, self.w, self.h, self.get_dcmd, layer)
>    File "/usr/lib/grass/etc/wx/Gism/menuform.py", line 342, in __init__
>      self.btn_apply.Bind(wx.EVT_BUTTON, self.onApply)
> AttributeError: 'mainFrame' object has no attribute 'onApply'
>
> Moritz
>


-- 
-- Daniel Calvelo Aros




More information about the grass-dev mailing list