Re: wxWidgets 2.9 build

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: wxWidgets 2.9 build
Date: 2011-02-01 17:09:07
Message-ID: AANLkTinLXAk7_q9iqGVdE7QVOkmRGAgsgYGQXmpcLM=M@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

First off - patch applied, thanks!

On Tue, Feb 1, 2011 at 3:24 PM, Peter Geoghegan
<peter(dot)geoghegan86(at)gmail(dot)com> wrote:
> I've performed the changes to overloads of sysSettings::Write() and
> ctlListView::AppendItem() already discussed.

I've reverted the removal of this function:

// Write a boolean value
bool sysSettings::Write(const wxString &key, bool value)
{
return Write(key, BoolToStr(value));
}

It was being used (probably for historical reasons) to store values
such as the "frmMain/Maximised". Removing it causes use to write those
values on Windows as DWORD registry keys, which then asserts when we
try to read the value at startup.

I also changed this line (363) in frmHint.cpp:

settings->Write(wxString(wxT("Hints/")) + hintArray[hintno].hintPage,
wxString(wxEmptyString));

It was using a plain wxEmptyString for the last argument, which without:

bool Write(const wxString &key, const wxChar *value)

meant that the wxEmptyString was getting case to a boolean.

Quick fixes to ensure the code works as previously - feel free to
clean it up :-)

> This works fine for client TUs. However, sysLogger.cpp doesn't compile
> on 2.9 . I don't know why we've provided implementations of various
> logger functions there. What do you think? I've attached a patch of my
> latest revisions so you can take a look yourself.

Well the reason is simply that out logging infrastructure has
additional requirements that wxWidgets doesn't provide - additional
logging levels for example.

As for the problem - I'm not currently in a position to test with 2.9,
so cannot really comment. What is the problem/error you see exactly?

> I'm not sure that your suggestion about the cstr() macro is a win, but
> if we do it I feel that it should be an inline function.

I can live without it.

Let's continue this on a new thread...

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

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

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2011-02-01 17:10:50 pgAdmin III commit: Quick fix for a registry datatype issue on Windows,
Previous Message Dave Page 2011-02-01 16:20:35 pgAdmin III commit: Phase 1 of our wxWidgets 2.9 compatibility. For mor