Обсуждение: Building with wx2.9 on Mac

Поиск
Список
Период
Сортировка

Building with wx2.9 on Mac

От
Dave Page
Дата:
Hi Peter,

It seems that the wxWidgets guys have fixed the issue with 2.9 on Mac,
so I was able to try out a build today. Attached is the patch for your
review. Aside from an issue with the font selector dialog (which seems
to work OK now, thus the workaround which is broken on 2.9 anyway
isn't required), the main issue I see is this:

./dlg/dlgDatabase.cpp: In member function ‘bool
dlgDatabase::executeDDLSql(const wxString&)’:
./dlg/dlgDatabase.cpp:425: error: request for member ‘GetClientData’
is ambiguous
/usr/local/include/wx-2.9/wx/ctrlsub.h:297: error: candidates are:
void* wxItemContainer::GetClientData(unsigned int) const
/usr/local/include/wx-2.9/wx/event.h:3204: error:
void* wxEvtHandler::GetClientData() const

It's easily fixed (albeit somewhat ugly) as can be seen in the patch -
but I'm somewhat baffled about why the compiler thinks the two
functions listed are both candidates, given that one takes an argument
and the other doesn't. Any ideas?

Other problems seen so far:

- The toolbars have button labels displayed through them for some
reason (see the attached screenshot).

- Highlighting text in the STC has a weird effect on lower parts of
the sae window (see the attached screenshot).

- The wxDIALOG_MODAL flag seems to be gone.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Вложения

Re: Building with wx2.9 on Mac

От
Peter Geoghegan
Дата:
On 23 February 2011 23:51, Dave Page <dpage@pgadmin.org> wrote:
> It seems that the wxWidgets guys have fixed the issue with 2.9 on Mac,
> so I was able to try out a build today. Attached is the patch for your
> review. Aside from an issue with the font selector dialog (which seems
> to work OK now, thus the workaround which is broken on 2.9 anyway
> isn't required), the main issue I see is this:

Good. How many of the remaining 2.9 bugs that I reported were you able
to reproduce on the Cocoa build? Did you see:

* Any distortion of AUI elements, other than the distortion visible in
toolbar.png .

* Table editor segfaulting when text and serial datums are edited, but
not when integer and numeric datums are edited.

* Splash screen not displaying.

My suspicion is that you won't see most or all of these bugs, because
they specifically relate to wxGTK-2.9.


> ./dlg/dlgDatabase.cpp: In member function ‘bool
> dlgDatabase::executeDDLSql(const wxString&)’:
> ./dlg/dlgDatabase.cpp:425: error: request for member ‘GetClientData’
> is ambiguous
> /usr/local/include/wx-2.9/wx/ctrlsub.h:297: error: candidates are:
> void* wxItemContainer::GetClientData(unsigned int) const
> /usr/local/include/wx-2.9/wx/event.h:3204: error:
> void* wxEvtHandler::GetClientData() const
>
> It's easily fixed (albeit somewhat ugly) as can be seen in the patch -
> but I'm somewhat baffled about why the compiler thinks the two
> functions listed are both candidates, given that one takes an argument
> and the other doesn't. Any ideas?

Yeah, that's fairly ugly. The issue you're experiencing doesn't make
much sense to me. I've done an SVN update, and am at a commit 20
minutes before you sent your e-mail. Since I can still build this fine
against wxGTK-2.9, it stands to reason it's a bug in wxWidgets,
perhaps down to platform #ifdefs. I would not commit the patch, but
report the bug.

I note that this occurs with wxComboBoxs. I don't have time to look at
the platform specific implementation in detail right now, but I
suspect the dastardly diamond problem (Do other people call it
dastardly or is that just me? I can't remember) has occurred, what
with the extensive use of multiple inheritance. Take a look here:

http://en.wikipedia.org/wiki/Virtual_inheritance

> - The toolbars have button labels displayed through them for some
> reason (see the attached screenshot).

This may sound silly, but are you sure that just isn't how tooltips
are supposed to be displayed with Cocoa? The icons are faded/inactive
at the same time as their tooltips. It looks deliberate. If so, maybe
you should use an #ifdef to customise the appearance of the toolbar
tooltips on Cocoa.

> - Highlighting text in the STC has a weird effect on lower parts of
> the sae window (see the attached screenshot).

Looks like another upstream WX bug.

> - The wxDIALOG_MODAL flag seems to be gone.

This:

http://trac.wxwidgets.org/ticket/6601

indicates that that flag is obsolete, and it's 7 years old. Does the
absence of the flag have any noticeable behavioural effect? I doubt
that it does.

--
Regards,
Peter Geoghegan

Re: Building with wx2.9 on Mac

От
Peter Geoghegan
Дата:
You have pgAdmin compiling (though still not linking) with clang on
your laptop, right? I suggest you use that to get a non-crappy error
message.

--
Regards,
Peter Geoghegan

Re: Building with wx2.9 on Mac

От
Peter Geoghegan
Дата:
The fact that GCC produces an error that's just as bad as I thought it
would be when I called bat.eat() as in the sample code in the
wikipedia article makes me more confident that I'm right:

-*- mode: compilation; default-directory: "/home/peter/cpp_tests/" -*-
Compilation started at Thu Feb 24 03:07:35

c++ diamond.cpp
diamond.cpp: In function ‘int main()’:
diamond.cpp:26:7: error: request for member ‘eat’ is ambiguous
diamond.cpp:4:16: error: candidates are: virtual void Animal::eat()
diamond.cpp:4:16: error:                 virtual void Animal::eat()

Compilation exited abnormally with code 1 at Thu Feb 24 03:07:36

--
Regards,
Peter Geoghegan

Re: Building with wx2.9 on Mac

От
Dave Page
Дата:
On Thu, Feb 24, 2011 at 2:52 AM, Peter Geoghegan
<peter.geoghegan86@gmail.com> wrote:
> On 23 February 2011 23:51, Dave Page <dpage@pgadmin.org> wrote:
>> It seems that the wxWidgets guys have fixed the issue with 2.9 on Mac,
>> so I was able to try out a build today. Attached is the patch for your
>> review. Aside from an issue with the font selector dialog (which seems
>> to work OK now, thus the workaround which is broken on 2.9 anyway
>> isn't required), the main issue I see is this:
>
> Good. How many of the remaining 2.9 bugs that I reported were you able
> to reproduce on the Cocoa build? Did you see:
>
> * Any distortion of AUI elements, other than the distortion visible in
> toolbar.png .

No.

> * Table editor segfaulting when text and serial datums are edited, but
> not when integer and numeric datums are edited.

I just realised what's probably causing that - we use our own version
of wxGridCellTextEditor, which uses the STC instead of a rich text box
to avoid some bugs. Because we haven't implemented our own version of
EndEdit() yet, it's probably assuming the edit control is the original
type in the default code.

> * Splash screen not displaying.

That's working fine.

> My suspicion is that you won't see most or all of these bugs, because
> they specifically relate to wxGTK-2.9.
>
>
>> ./dlg/dlgDatabase.cpp: In member function ‘bool
>> dlgDatabase::executeDDLSql(const wxString&)’:
>> ./dlg/dlgDatabase.cpp:425: error: request for member ‘GetClientData’
>> is ambiguous
>> /usr/local/include/wx-2.9/wx/ctrlsub.h:297: error: candidates are:
>> void* wxItemContainer::GetClientData(unsigned int) const
>> /usr/local/include/wx-2.9/wx/event.h:3204: error:
>> void* wxEvtHandler::GetClientData() const
>>
>> It's easily fixed (albeit somewhat ugly) as can be seen in the patch -
>> but I'm somewhat baffled about why the compiler thinks the two
>> functions listed are both candidates, given that one takes an argument
>> and the other doesn't. Any ideas?
>
> Yeah, that's fairly ugly. The issue you're experiencing doesn't make
> much sense to me. I've done an SVN update, and am at a commit 20
> minutes before you sent your e-mail. Since I can still build this fine
> against wxGTK-2.9, it stands to reason it's a bug in wxWidgets,
> perhaps down to platform #ifdefs. I would not commit the patch, but
> report the bug.
>
> I note that this occurs with wxComboBoxs. I don't have time to look at
> the platform specific implementation in detail right now, but I
> suspect the dastardly diamond problem (Do other people call it
> dastardly or is that just me? I can't remember) has occurred, what
> with the extensive use of multiple inheritance. Take a look here:
>
> http://en.wikipedia.org/wiki/Virtual_inheritance

Will do. I'm actually OOO for the next few days, so I'll try to look
in the evenings.

>> - The toolbars have button labels displayed through them for some
>> reason (see the attached screenshot).
>
> This may sound silly, but are you sure that just isn't how tooltips
> are supposed to be displayed with Cocoa? The icons are faded/inactive
> at the same time as their tooltips. It looks deliberate. If so, maybe
> you should use an #ifdef to customise the appearance of the toolbar
> tooltips on Cocoa.

I've never seen that effect in any other apps that I can recall. Plus
the toolbars do have a text style to enable/disable labels, which is
off by default.

>> - Highlighting text in the STC has a weird effect on lower parts of
>> the sae window (see the attached screenshot).
>
> Looks like another upstream WX bug.

Yeah, that was my thought.

>> - The wxDIALOG_MODAL flag seems to be gone.
>
> This:
>
> http://trac.wxwidgets.org/ticket/6601
>
> indicates that that flag is obsolete, and it's 7 years old. Does the
> absence of the flag have any noticeable behavioural effect? I doubt
> that it does.

Ahh, ok. Didn't get as far as searching for that yet - thanks!

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Building with wx2.9 on Mac

От
Dave Page
Дата:
On Thu, Feb 24, 2011 at 2:56 AM, Peter Geoghegan
<peter.geoghegan86@gmail.com> wrote:
> You have pgAdmin compiling (though still not linking) with clang on
> your laptop, right? I suggest you use that to get a non-crappy error
> message.

Oh, good idea. I'll do that.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Building with wx2.9 on Mac

От
Dave Page
Дата:
On Thu, Feb 24, 2011 at 8:36 AM, Dave Page <dpage@pgadmin.org> wrote:
> On Thu, Feb 24, 2011 at 2:56 AM, Peter Geoghegan
> <peter.geoghegan86@gmail.com> wrote:
>> You have pgAdmin compiling (though still not linking) with clang on
>> your laptop, right? I suggest you use that to get a non-crappy error
>> message.
>
> Oh, good idea. I'll do that.

Clang compiles it just fine.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Building with wx2.9 on Mac

От
Peter Geoghegan
Дата:
On 24 February 2011 09:13, Dave Page <dpage@pgadmin.org> wrote:
> Clang compiles it just fine.

So you still see the ambiguous overload error on GCC, but you don't
see it on Clang? That strikes me as very unusual.

--
Regards,
Peter Geoghegan