Re: pgAdmin III commit: Include a variant of sysSettings::Write() that take

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: pgAdmin III commit: Include a variant of sysSettings::Write() that take
Date: 2011-02-16 18:42:26
Message-ID: AANLkTik9Esn0Po_gnsdn0XXfRU9kpXqF=iuUGA3Q3TJr@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Wed, Feb 16, 2011 at 4:20 PM, Peter Geoghegan
<peter(dot)geoghegan86(at)gmail(dot)com> wrote:
> On 16 February 2011 15:47, Dave Page <dpage(at)pgadmin(dot)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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2011-02-16 18:50:39 Re: pgAdmin III commit: Include a variant of sysSettings::Write() that take
Previous Message Peter Geoghegan 2011-02-16 18:34:16 Re: phase 2 of wxWidgets 2.9 build