Opened 15 years ago
Closed 6 years ago
#734 closed defect (worksforme)
wxGui sqlbuilder: a few bugs
Reported by: | hamish | Owned by: | martinl |
---|---|---|---|
Priority: | major | Milestone: | 6.4.6 |
Component: | wxGUI | Version: | 6.4.0 RCs |
Keywords: | sqlbuilder | Cc: | grass-dev@… |
CPU: | x86-64 | Platform: | All |
Description
Hi, a remaining few bugs moved here from #723 re. the wx SQLbuilder GUI. It's getting close to being functional. (!)
- 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 always inserts to the fifth char position?? You can fix it manually.
- Clicking [Apply] doesn't send the string back to the Attribute Table Manager GUI.
- How to add support for multi-layer tables? (see layer from L584 in dbm.py ?)
- in 6.4svn you get an error when you click on [Verify]:
Testing [SELECT * FROM fields WHERE label = '"NO DATA"'] ... Traceback (most recent call last): File "/.../etc/wxpython/gui_modules/sqlbuilder.py", line 363, in OnVerify sql = querystring) TypeError : 'int' object is not iterable
- in all versions you get an error on [Close]:
Traceback (most recent call last): File "/.../etc/wxpython/gui_modules/sqlbuilder.py", line 284, in AddColumnName idx = self.list_columns.GetSelections()[0] IndexError : tuple index out of range Traceback (most recent call last): File "/.../etc/wxpython/gui_modules/sqlbuilder.py", line 289, in AddValue idx = self.list_values.GetSelections()[0] IndexError : tuple index out of range
?, Hamish
Change History (11)
comment:1 by , 15 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
follow-up: 3 comment:2 by , 15 years ago
Much better...!
fine tuning / feedback:
- Columns and Values text boxes are now a bit too small, only showing 1.5 column names + up/down slider. It would be nice if it were big enough to at least show more of them.
- it says "Add on double click" but actually it adds column name on single click. Or if you have a column name selected from the list and on the keyboard do up-down-up-down arrows it repeatedly adds those column names in the Query text box. Rename as "Add on double click as"? Before a little experimentation I find it hard to know what those radio buttons did. Possible to have a tooltip there?
- shouldn't the base text end with "WHERE " ? (ok it shows up once I select a column name as "(*)values" but why not have it there to begin with?)
- [Get sample],[Get all values] fail if the map is not in the current mapset (e.g. fields@PERMANENT). I had this running recently when it called the db.select directly; the trick is to pass db.* the full path to the database table the 4th column from 'v.db.connect -p', or use v.db.select. In the terminal shell window:
DBMI-DBF driver error: Table 'fields' doesn't exist. Error in db_open_select_cursor() ERROR: Fetching data from table <fields> failed
- open SQL builder for fields@PERMANENT, click on Columns: _cat_, click on [Close]. you get this error in the main Layer Manager output tab:
Traceback (most recent call last): File "[$GISBASE]/etc/wxpython/gui_modules/sqlbuilder.py", line 321, in OnAddColumn if not self.btn_uniquesample.IsEnabled(): File "/usr/lib/python2.5/site- packages/wx-2.8-gtk2-unicode/wx/_core.py", line 14314, in __getattr__ raise PyDeadObjectError(self.attrStr % self._name) wx._core . PyDeadObjectError : The C++ part of the Button object has been deleted, attribute access no longer allowed.
- uncheck "Close dialog on apply" by default? (match module GUI behaviour) It's just a bit surprising when it vanishes. Or change "Apply" to "Accept"?
- Verify: show result in pop up window instead of status bar text? It's a bit less subtle, and the user did ask for reassurance. Or maybe better change the color of the text in the status bar: -- not verified: dark orange or dark yellow -- verified: changes to dark green -- invalid: changes to dark red.
also as soon as you type/add more into the Query box it should reset to "not verified".
thanks, Hamish
comment:3 by , 15 years ago
Replying to hamish:
- Columns and Values text boxes are now a bit too small,
only showing 1.5 column names + up/down slider. It would be nice if it were big enough to at least show more of them.
note that on an eeePC the default screen resolution is 1024x600, and the current window height for the SQL builder GUI (I get) is 525, so after you subtract 20px or so for the window manager taskbar(s) there isn't much room left for expansion. (The wx startup GUI is better than it used to be, but still the [enter grass] buttons are slightly crushed there)
so it would be nice if gui widgets could be packed a little bit tighter and the starting window heights no taller than (say) 575px. (maybe smaller buttons for the = > < >= <=; move "Close dialog on apply" checkbox on to the same row as [Verify][Apply]; or rethink if full DB connection params are really needed at the top, or could swing down with a >,v or +,- expansion button?)
thanks, Hamish
comment:4 by , 12 years ago
Milestone: | 6.4.0 → 6.4.4 |
---|
follow-ups: 6 8 comment:5 by , 11 years ago
Platform: | Linux → All |
---|
Some feedback on the SQL Query builder in GRASS relbr7, winGRASS 7.0.0beta1:
- the width should be fixed at some point to avoid that the user squeezes it too much and the buttons "fly around". However, the starting width is smaller than the content (Linux is ok)
- on Windows, selecting columns keeps then selected, unselect not possible. (Linux is ok)
- Windows falls into "busy" state, i.e. the wxGUI blocks
follow-up: 7 comment:6 by , 11 years ago
comment:7 by , 11 years ago
comment:8 by , 11 years ago
comment:9 by , 9 years ago
gui/wxpython/dbmgr/sqlbuilder.py are identical in relbr70 and trunk, closing? Anything left?
comment:10 by , 9 years ago
Milestone: | 6.4.4 → 6.4.6 |
---|
comment:11 by , 6 years ago
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
Please try r38923.