Re: pgAdmin III commit: Include a variant of sysSettings::Write() that take - Mailing list pgadmin-hackers

From Dave Page
Subject Re: pgAdmin III commit: Include a variant of sysSettings::Write() that take
Date
Msg-id AANLkTik9Esn0Po_gnsdn0XXfRU9kpXqF=iuUGA3Q3TJr@mail.gmail.com
Whole thread Raw
In response to Re: pgAdmin III commit: Include a variant of sysSettings::Write() that take  (Peter Geoghegan <peter.geoghegan86@gmail.com>)
Responses Re: pgAdmin III commit: Include a variant of sysSettings::Write() that take
List pgadmin-hackers
On Wed, Feb 16, 2011 at 4:20 PM, Peter Geoghegan
<peter.geoghegan86@gmail.com> wrote:
> On 16 February 2011 15:47, Dave Page <dpage@pgadmin.org> wrote:
>> Include a variant of sysSettings::Write() that takes a wxChar* value
>> to write, as they are currently being cast to bools and stored as
>> true/false.
>
> I anticipated this, and my latest patch doesn't have this problem -
> it's the same situation as ctlListView, where we changed
> AppendItem(const wxString&, bool) to AppendYesNoItem(const wxString&,
> bool). I changed bool Write(const wxString&, bool) to bool
> WriteBool(const wxString&, bool) in sysSettings's case.

The main issue I have with that is that we now have a bunch of
overloaded Write() members, and WriteBool(). If we're going to deviate
away from the API in wxConfig (which at least is private), then we
should do so consistently.

FYI, in wxPython and wxPerl they implement the following:

Write(key, value)     Writes a string
WriteInt(key, value)     Writes an integer
WriteFloat(key, value)     Writes a floating point number
WriteBool(key, value)     Writes a boo


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

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

pgadmin-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: phase 2 of wxWidgets 2.9 build
Next
From: Peter Geoghegan
Date:
Subject: Re: pgAdmin III commit: Include a variant of sysSettings::Write() that take