<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 30, 2015 at 9:54 AM, Luca Delucchi <span dir="ltr"><<a href="mailto:lucadeluge@gmail.com" target="_blank">lucadeluge@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi devs,<br>
<br>
working on g.gui.tplot I have problems with gselect.Select in the Vector panel.<br>
Right now there is a wx.EVT_TEXT event and it works well if the vector<br>
temporal dataset is selected by the scroll down menu but it return<br>
errors if the user try to write him self the name of the temporal<br>
dataset, because for each added character it run the connected<br>
function<br>
<br>
GRASS_INFO_MESSAGE(13258,1): ERROR: Space time vector dataset <p> not found<br>
GRASS_INFO_END(13258,1)<br>
Traceback (most recent call last):<br>
  File "/home/lucadelu/compilati/grass_trunk/dist.x86_64-unknown-linux-gnu/gui/wxpython/tplot/frame.py",<br>
line 842, in OnVectorSelected<br>
    column='name')<br>
  File "/home/lucadelu/compilati/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py",<br>
line 461, in read_command<br>
    return handle_errors(returncode, stdout, args, kwargs)<br>
  File "/home/lucadelu/compilati/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py",<br>
line 329, in handle_errors<br>
    returncode=returncode)<br>
grass.exceptions.CalledModuleError: L'esecuzione del modulo None<br>
['t.vect.list', '-s', 'column=name', 'input=p'] è terminata con errori<br>
Processo terminato con codice di return diverso da zero 1. Vedi gli<br>
errori nel (error) output.<br>
<br>
So I tried to change the event in wx.EVT_TEXT_ENTER this not working<br>
at all, no error and no call to the function.<br>
<br>
Instead if I use wx.EVT_COMBOBOX_CLOSEUP it works when I select the<br>
temporal dataset but no when the user types the name.<br>
<br>
My idea is to replace wx.EVT_TEXT with both wx.EVT_TEXT_ENTER and<br>
wx.EVT_COMBOBOX_CLOSEUP as suggested in the attached patch but I would<br>
like why wx.EVT_TEXT_ENTER is not working at all, do you have any<br>
idea?<br></blockquote><div><br></div><div>The TextCtrl must have wx.TE_PROCESS_ENTER style set, that might be the problem.</div><div><br></div><div>I was dealing with this by checking the existence of the typed map after every typed letter. This can slow it down little bit during typing, so I am not sure which solution is actually better. With the event bound to Enter, users sometimes don't understand they have to press Enter.</div><div><br></div><div>Anna</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
thanks<br>
<span class=""><font color="#888888"><br>
--<br>
ciao<br>
Luca<br>
<br>
<a href="http://gis.cri.fmach.it/delucchi/" rel="noreferrer" target="_blank">http://gis.cri.fmach.it/delucchi/</a><br>
<a href="http://www.lucadelu.org" rel="noreferrer" target="_blank">www.lucadelu.org</a><br>
</font></span><br>_______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br></blockquote></div><br></div></div>