Re: Mac Language and _() - Mailing list pgadmin-hackers

From Andreas Pflug
Subject Re: Mac Language and _()
Date
Msg-id 41509724.1010309@pse-consulting.de
Whole thread Raw
In response to Mac Language and _()  (Adam H.Pendleton <fmonkey@fmonkey.net>)
List pgadmin-hackers
Adam H. Pendleton wrote:
>
> Okay, removing the language files did the trick,

Good for the start, so this is a separated issue. This is hopefully
reproducable using a wx sample.

> though I still get the
> assert.  Now the program runs but there are some minor problems.  For
> starters, the "Cancel" button on dialogs doesn't work,

That's because the event is registered on wxID_CANCEL, which is not the
same as XRCID("wxID_CANCEL") although it should be.

Please set a breakpoint at contrib/src/xrc/xmlres.cpp line 1218 or so.
This is XRCID_Lookup, which retrieves an id from a string. It's called
from c++ runtime initialization code, to set all that
EVT_xxx(XRCID("...") ) stuff. Apparently, there's some other source
calling this, because there's no occurrence of XRCID("wxID_CANCEL") in
pgadmin's sources.
This initializer code is called before some other code is executed,
which assigns those well-known id values to the id strings (this is done
in xmlres.cpp AddStdXRCID_Records). If this code is not called prior to
requesting an XRCID for a well-known id string, a new id is generated
(which we don't like for wxID***) and the assert mentioned will rise.

With that breakpoint set, you'll get >300 calls, which is too much to
trace. You can remove all EVT_*** in any ui/*.cpp between
BEGIN_EVENT_TABLE and END_EVENT_TABLE; after that, there should be no
more call to to XRCID_Lookup before AddStdXRCID_Records(). Apparently on
Mac there *is* an illegal call, you'll catch it hopefully like this.

  and the dialog
> sizes are messed up.  I have attached two screenshots to show what I mean.

Obviously wxNotebook is f***ed up on mac. Could you please test this on
a wx sample?

Regards,
Andreas

pgadmin-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: just a question ..
Next
From: cvs@cvs.pgadmin.org
Date:
Subject: CVS Commit by andreas: todo update