From: | "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net> |
---|---|
To: | Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com> |
Cc: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Dave Page <dpage(at)pgadmin(dot)org>, Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
Subject: | Re: PoC: Little improvements to EditGrid - Enum ComboBox |
Date: | 2012-06-18 11:35:41 |
Message-ID: | CAHHcreo9-AQP9D6QQcd8ODDc+iGignrS5mnUU==A0Hr3qP-xPw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
2012/6/18 Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
> Hi Dickson,
Hello Ashesh!
> On Sun, Jun 17, 2012 at 6:48 PM, Dickson S. Guedes <listas(at)guedesoft(dot)net>
> wrote:
>>
>> 2012/6/17 Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
>> >
>> > On Sun, Jun 17, 2012 at 6:39 AM, Dickson S. Guedes
>> > <listas(at)guedesoft(dot)net> wrote:
>> >>
>> >> 2012/6/6 Dickson S. Guedes <listas(at)guedesoft(dot)net>:
>> >> > I'm starting some proof-of-concept working on frmEditGrid trying
>> >> > make
>> >> > some "improvements" like:
>> >> >
>> >> > 1) show a combo box in columns of type enum;
>> >>
>> >> There isn't changes to this code comparing to previous initial patch,
>> >> but I'm getting segfault when the combo box is open and you press
>> >> 'Delete' to delete some letter. I'm sure that I'm missing something,
>> >> but couldn't figure it out.
>> >
>> > I guess - you may need to implement KILL FOCUS event on combo-box.
>>
>> Hi Ashesh,
>>
>> Thanks for your comment. I debugged with gdb and see what is happening:
>>
>> #0 0x00007ffff7850658 in wxStyledTextCtrl::SendMsg (this=0x1e06d90,
>> msg=2008, wp=0, lp=0) at ../../../../contrib/src/stc/stc.cpp:199
>> #1 0x00007ffff785093b in wxStyledTextCtrl::GetCurrentPos
>> (this=0x1e06d90) at ../../../../contrib/src/stc/stc.cpp:267
>> #2 0x0000000000641baa in frmEditGrid::OnDelete (this=0x1cdbce0,
>> event=...) at ./frm/frmEditGrid.cpp:1161
>> #3 0x00007ffff5dc0aa6 in wxAppConsole::HandleEvent (this=0x1019e20,
>> handler=0x1cdbce0, func=(void (wxEvtHandler::*)(wxEvtHandler * const,
>> wxEvent &)) 0x641a4e <frmEditGrid::OnDelete(wxCommandEvent&)>,
>> event=...) at ../src/common/appbase.cpp:322
>>
>> As we can see in #2, pressing the 'Delete' key is triggering
>> frmEditGrid::OnDelete that are trying to do:
>>
>> if (text && text->GetCurrentPos() <= text->GetTextLength()) ...
>>
>> I need to check if the column is Enum and return before this code.
>
> I was not able to reproduce the issue on my ubuntu VM.
> (That's probably because I am using MAC as host and it does not have the
> DELETE key.)
Thanks for try it. I could reproduce the same issue on Ubuntu, Debian
and Fedora, but I don't have a Mac or Windows to try it.
> But - to identify, if the column is enum or not, you can use this patch.
> This patch includes a modification to identify the column is enum or not.
Thanks! I'll poke into it.
Regards,
--
Dickson S. Guedes
mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br
From | Date | Subject | |
---|---|---|---|
Next Message | pgAdmin Trac | 2012-06-18 23:10:48 | Re: [pgAdmin III] #360: Enum only showing as array type in new function dialog |
Previous Message | Dave Page | 2012-06-18 08:35:38 | Re: Should we keep using trac? |