Opened 14 years ago
Closed 14 years ago
#1223 closed defect (fixed)
g.mapsets access from menu broken
Reported by: | cmbarton | Owned by: | martinl |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.0 |
Component: | wxGUI | Version: | svn-trunk |
Keywords: | Cc: | grass-dev@… | |
CPU: | OSX/Intel | Platform: | MacOSX |
Description
Trying to access g.mapsets from the menu raises the following error:
Traceback (most recent call last):
File "/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/etc
/gui/wxpython/wxgui.py", line 304, in OnMapsets
dlg = preferences.MapsetAccess(parent = self, id = wx.ID_ANY)
File "/Users/cmbarton/grass_dev/grass70_dev/dist.i386
-apple- darwin10.5.0/etc/gui/wxpython/gui_modules/preferences.py", line 2183, in init
wx.Dialog.init(self, parent, id, title, pos, size, style) NameError : global name 'pos' is not defined
Change History (9)
follow-up: 2 comment:1 by , 14 years ago
Component: | wxGUI → Installation |
---|
follow-up: 4 comment:2 by , 14 years ago
Cc: | added |
---|---|
Component: | Installation → wxGUI |
Replying to cmbarton:
Turns out that g.mapsets cannot be launched from the command line or terminal either. No way to
g.mapsets doesn't start from the cli because all parameters are optional. Probably we could change this behaviour in GRASS7. You can force launching GUI dialog by
g.mapsets --ui
set mapset access in GRASS 7 currently. Changing component from wxGUI to ... hmmm there is no component for general, configuration, or settings. I'm picking "installation" because this is slightly less erroneous than the other choices.
fixed in r44412.
Martin
comment:3 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 5 comment:4 by , 14 years ago
Replying to martinl:
g.mapsets doesn't start from the cli because all parameters are optional. Probably we could change this behaviour in GRASS7.
Note that GRASS 7 intentionally doesn't launch a GUI when all required parameters are provided. In 6.x, modules which want to be able to run without parameters must skip the call to G_parser() if no parameters are given. The problem here is that G_parser() performs some necessary tasks even when no options are provided, so it should always be called.
The real problem is that "required" options have to be marked as optional if there are any special cases which eliminate the requirement, e.g. the "-l" flag in the case of g.mapsets. Ideally, we should add a mechanism to allow such flags to suppress the checking of required options, so that the ->required field can be set based upon normal usage rather than a worst-case scenario.
follow-up: 6 comment:5 by , 14 years ago
Replying to glynn:
The real problem is that "required" options have to be marked as optional if there are any special cases which eliminate the requirement, e.g. the "-l" flag in the case of g.mapsets.
My mistake; g.mapsets really doesn't have any required options. If it does nothing when no options are given, it should probably at least generate an error along the lines of "at least one of ... must be given".
comment:6 by , 14 years ago
Replying to glynn:
The real problem is that "required" options have to be marked as optional if there are any special cases which eliminate the requirement, e.g. the "-l" flag in the case of g.mapsets.
My mistake; g.mapsets really doesn't have any required options. If it does nothing when no options are given, it should probably at least generate an error along the lines of "at least one of ... must be given".
in the case that GRASS_GUI
is not 'text' better to launch GUI dialog.
follow-up: 8 comment:7 by , 14 years ago
So the menu entry in the GUI should be "g.mapsets --ui" rather than g.mapsets?
comment:8 by , 14 years ago
Replying to cmbarton:
So the menu entry in the GUI should be "g.mapsets --ui" rather than g.mapsets?
No, from wxGUI it will run without -ui
. I was speaking about CLI.
comment:9 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Turns out that g.mapsets cannot be launched from the command line or terminal either. No way to set mapset access in GRASS 7 currently. Changing component from wxGUI to ... hmmm there is no component for general, configuration, or settings. I'm picking "installation" because this is slightly less erroneous than the other choices.
Michael