[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] File extension not added--common "save" dialog in msw11

From: Vadim Zeitlin
Subject: Re: [lmi] File extension not added--common "save" dialog in msw11
Date: Sun, 12 Feb 2023 00:38:42 +0100

On Sat, 11 Feb 2023 23:21:27 +0000 Greg Chicares <gchicares@sbcglobal.net> 

GC> On 2/11/23 14:02, Vadim Zeitlin wrote:
GC> [...big snip]
GC> >  Hence the question: do you think standard behaviour is good enough or do
GC> > you still think that we need to add wxFD_ALWAYS_APPEND_EXTENSION, even
GC> > though this will make lmi behave differently than the other MSW programs
GC> > and the absence of this flag had never seemed to be a problem in the past
GC> > (but, theoretically, i.e. if lmi users use file names ending in ".cat",
GC> > could be)?
GC> The answer, of course, is "it depends". But the condition that it
GC> depends on is probably easy to figure out: the standard behavior
GC> is okay for lmi if no lmi extension is regarded as "standard" by
GC> msw (and therefore tied to some application other than lmi).

 Just to be clear, I don't think it depends on this in 99.5% of cases
because if a user does enter the lmi extension matching the file being
saved, then it will be just used in any case, i.e. the distinction between
known and unknown extensions only matters if no extension was provided by
the user.

 But, to be painfully formal, this could matter if the user used a _wrong_
extension, e.g. entered "foo.ill" when saving a census. With current
(fixed) wx, this would result in the census being saved as "foo.ill.cns"
but if ".ill" were to become a known extension, it would have been saved as
just "foo.ill", which would be wrong.

GC> The important extensions for files that lmi can save and load are:
GC>   .cns, .ill, .database, .policy, .rounding, .strata
GC> while
GC>   .gpt, .mec
GC> are of secondary importance as few users work with them.

 However in any case none of these extensions is a known one in the default
OS installation. Of course, it's always possible that people install some
third party program registering one of them but, again, this will only
affect the (presumably very rare) case of saving files with specified but
mismatched extension.

 I.e. to be as explicit as possible, the behaviour using wx 3.2.2 will be:

1. On a default Windows installation, saving a census as a.ill saves it
   as a.ill.cns.

2. If you create an empty registry key HKCU\.ill, saving it as b.ill now
   saves it as b.ill.

3. Saving a census as c.cns will always save it as c.cns, no matter what.
   And saving it as "d" (without any extension) will always save it as
   d.cns and, of course, saving it using the name from the initial example
   ("1st Sample Bank - Tier 1 - FUW - $1.25M - PRELIMINARY") will also save
   it with a .cns extension.

GC> If you can confirm that none of those important extensions is
GC> "standard", then we just upgrade wx and Bob's your uncle.

 But I can indeed confirm this.

Attachment: pgpHPDsB2cN_Y.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]