On Wed, Dec 30, 2015 at 9:54 AM, Luca Delucchi <[email protected]> wrote:
> Hi devs, > > working on g.gui.tplot I have problems with gselect.Select in the Vector > panel. > Right now there is a wx.EVT_TEXT event and it works well if the vector > temporal dataset is selected by the scroll down menu but it return > errors if the user try to write him self the name of the temporal > dataset, because for each added character it run the connected > function > > GRASS_INFO_MESSAGE(13258,1): ERROR: Space time vector dataset <p> not found > GRASS_INFO_END(13258,1) > Traceback (most recent call last): > File > "/home/lucadelu/compilati/grass_trunk/dist.x86_64-unknown-linux-gnu/gui/wxpython/tplot/frame.py", > line 842, in OnVectorSelected > column='name') > File > "/home/lucadelu/compilati/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py", > line 461, in read_command > return handle_errors(returncode, stdout, args, kwargs) > File > "/home/lucadelu/compilati/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py", > line 329, in handle_errors > returncode=returncode) > grass.exceptions.CalledModuleError: L'esecuzione del modulo None > ['t.vect.list', '-s', 'column=name', 'input=p'] è terminata con errori > Processo terminato con codice di return diverso da zero 1. Vedi gli > errori nel (error) output. > > So I tried to change the event in wx.EVT_TEXT_ENTER this not working > at all, no error and no call to the function. > > Instead if I use wx.EVT_COMBOBOX_CLOSEUP it works when I select the > temporal dataset but no when the user types the name. > > My idea is to replace wx.EVT_TEXT with both wx.EVT_TEXT_ENTER and > wx.EVT_COMBOBOX_CLOSEUP as suggested in the attached patch but I would > like why wx.EVT_TEXT_ENTER is not working at all, do you have any > idea? > The TextCtrl must have wx.TE_PROCESS_ENTER style set, that might be the problem. 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. Anna > > thanks > > -- > ciao > Luca > > http://gis.cri.fmach.it/delucchi/ > www.lucadelu.org > > _______________________________________________ > grass-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/grass-dev >
_______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
