Addendum: Re: wxStandardPaths::GetUserConfigDir on windows
Dave Silvia
dsilvia at mchsi.com
Sun Dec 17 01:42:01 PST 2006
>-- On Sun, 17 Dec 2006 09:55:35 +0100 Robert Roebling wrote --
>
>> Anyway, I'm really hard pressed to see what advantage there is to
>> delving into shell32.dll for paths. It's a proprietary library,
>>
> subject to
>> change, but no matter how it changes, the above environment
>> variables (and/or their equivalent)
>>
>> should always be available. And, as I said before, ::wxGetEnv
>> seems to work fine
>>
>
> We should use or do what is the "official" way to do it. I just
> read a few MSDN articles on the shell functions and the environment
> variables, and I have been unable to find out which way is right.
> Ideally, both should work. Are you saying that you set the env
> variables as you described and wxStandardPaths did not reflect
> those changes? That would be a bug. If it does reflect those
> changes, then it's an implementation detail, even if I'd agree that
> I didn't see any reason not to query the environment variables.
>
> Robert
>
I guess it's my mindset. I look at the most opaque way of platform access as the
preferred way in a cross-platform endeavor. Once tied too deeply into
implementation details of a given platform, life for the developer/maintainer of
said endeavor becomes more complicated. I.E. the "best" or "right" choice is the
one that has the least coding impact. Traditionally, environment variables have
been a kind of "opaque accessor" that has not changed on any platform that uses
them (to my knowledge) despite any implementation details that might underlie.
thx,
Dave S.
wxMS_developers · Development with wxWidgets on MSWindows
http://tech.groups.yahoo.com/group/wxMS_developers/
wxWidgets Code Exchange
http://wxcodex.net/
More information about the wx-users
mailing list