[GRASS-dev] [GRASS GIS] #2054: d.barscale module gui doesn't start from the command line

#2054: d.barscale module gui doesn't start from the command line
------------------------+---------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.4
Component: wxGUI | Version: svn-develbranch6
Keywords: d.barscale | Platform: Linux
      Cpu: x86-64 |
------------------------+---------------------------------------------------
Hi,

in relbr64 and devbr6 d.barscale doesn't launch from the command line,
with or without --ui. tested on debian/squeeze and ubuntu 12.04.

{{{
GRASS64> d.barscale
D3/5: G_recreate_command()
D1/5: grass.script.core.start_command(): g.gisenv -n
D1/5: grass.script.core.start_command(): g.gisenv -n
Traceback (most recent call last):
   File "/usr/lib/grass64/etc/wxpython/gui_core/forms.py", line 2023, in
<module>
     app = GrassGUIApp(task)
   File "/usr/lib/grass64/etc/wxpython/gui_core/forms.py", line 1996, in
__init__
     wx.App.__init__(self, False)
   File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7981, in __init__
     self._BootstrapApp()
   File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7555, in _BootstrapApp
     return _core_.PyApp__BootstrapApp(*args, **kwargs)
   File "/usr/lib/grass64/etc/wxpython/gui_core/forms.py", line 2004, in
OnInit
     self.mf = TaskFrame(parent = None, ID = wx.ID_ANY, task_description =
self.grass_task)
   File "/usr/lib/grass64/etc/wxpython/gui_core/forms.py", line 417, in
__init__
     frame = self)
   File "/usr/lib/grass64/etc/wxpython/gui_core/forms.py", line 1385, in
__init__
     win = self.FindWindowById(p['wxId'][0])
   File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 9458, in FindWindowById
     return _core_.Window_FindWindowById(*args, **kwargs)
TypeError: in method 'Window_FindWindowById', expected argument 2 of type
'long'
}}}

running "g.gui tcltk -nu" lets the tcl/tk gui start. (gui icon is included
in the tcl/tk module gui, a nice touch!)

?

thanks,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2054&gt;
GRASS GIS <http://grass.osgeo.org>

#2054: d.barscale module gui doesn't start from the command line
------------------------+---------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.4
Component: wxGUI | Version: svn-develbranch6
Keywords: d.barscale | Platform: Linux
      Cpu: x86-64 |
------------------------+---------------------------------------------------

Comment(by neteler):

It should (in theory) behave like d.text (display/d.text.new/) which also
comes
without required parameters and does not crash.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2054#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2054: d.barscale module gui doesn't start from the command line
------------------------+---------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.4
Component: wxGUI | Version: svn-develbranch6
Keywords: d.barscale | Platform: Linux
      Cpu: x86-64 |
------------------------+---------------------------------------------------

Comment(by annakrat):

It should be fixed in r57401, applied also to other branches (although not
needed in 7).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2054#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2054: d.barscale module gui doesn't start from the command line
-----------------------+----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: critical | Milestone: 6.4.4
Component: wxGUI | Version: svn-develbranch6
Resolution: fixed | Keywords: d.barscale
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Changes (by hamish):

  * priority: major => critical
  * status: new => closed
  * resolution: => fixed

Comment:

tested in relbr64 and devbr6, all seems well now, thanks.

d.barscale works from the wxGUI, but if you press the [Set options] button
there to get something custom you get the breakage. I suggest packagers
apply Anna's patch to the 6.4.3 packages as part of their build process.

'd.erase --ui' was the only other display module I found with the trouble.
What was the connection with the color picker? Can we expect any others?

thanks,
Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2054#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2054: d.barscale module gui doesn't start from the command line
-----------------------+----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: critical | Milestone: 6.4.4
Component: wxGUI | Version: svn-develbranch6
Resolution: fixed | Keywords: d.barscale
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------

Comment(by annakrat):

Replying to [comment:3 hamish]:
> 'd.erase --ui' was the only other display module I found with the
trouble. What was the connection with the color picker? Can we expect any
others?

It has nothing to do with display commands. There was some trick to set
focus on the first option which needed widget id which happened to be None
for some reason. Forms are full of these small tricks and it's almost
impossible to test it completely because each module is a special
combination.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2054#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>