Re: pgAdmin3 svn 4409 on Debian - segfault

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Tomasz Rybak <bogomips(at)post(dot)pl>
Cc: pgAdmin Hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: pgAdmin3 svn 4409 on Debian - segfault
Date: 2005-08-22 15:57:38
Message-ID: 4309F5F2.9010600@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Tomasz Rybak wrote:

>Dnia 21-08-2005, nie o godzinie 23:27 +0000, Andreas Pflug napisał(a):
>
>
>>Tomasz Rybak wrote:
>>
>>
>>>Dnia 21-08-2005, nie o godzinie 17:26 +0000, Andreas Pflug napisał(a):
>>>
>>>
>>>
>>> actionFactory::actionFactory(menuFactoryList *list) : menuFactory(list)
>>> {
>>>+ if (list){
>>> id = list->GetCount()+MNU_ACTION -1;
>>>+ } else {
>>>+ id = 0;
>>>+ }
>>>
>>>
>>Yes, this fix is correct; the initial tooltipFactory is called with no
>>menuFactoryList present, thanks for reporting.
>>
>>
>
>I'm wondering...
>If there is list, we make id equal to MNU_ACTION + last_element_of_list.
>Shouldn't there be
> id = MNU_ACTION;
>instead of
> id = 0;
>pgAdmin3 with my fix (id = 0) works, but I'm thinking, if
>id is identity of stuff we add to menu, and we make it zero,
>we could make some values reused (two menu items have the same id).
>
>In src/include/menu.h there is:
> MNU_ACTION=MNU_NEW+1000 // leave space for objects
>which would suggest, that we should add after that.
>
>So - should id be initialised to zero, or MNU_ACTION?
>
>
Anything (maybe 42 would perform best). If initialized without
menuItemList, no menu action is used.

Regards,
Andreas

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Tomasz Rybak 2005-08-22 20:28:59 Debian packaging
Previous Message Tomasz Rybak 2005-08-22 15:35:04 Re: pgAdmin3 svn 4409 on Debian - segfault