Skip site navigation (1) Skip section navigation (2)

Re: Mac Language and _()

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: "Adam H(dot) Pendleton" <fmonkey(at)fmonkey(dot)net>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Mac Language and _()
Date: 2004-09-21 21:03:32
Message-ID: 41509724.1010309@pse-consulting.de (view raw or flat)
Thread:
Lists: 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

In response to

pgadmin-hackers by date

Next:From: cvsDate: 2004-09-21 22:04:07
Subject: CVS Commit by andreas: todo update
Previous:From: Andreas PflugDate: 2004-09-21 20:47:34
Subject: Re: just a question ..

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group