On Tue, 22 Nov 2016 17:07:16 +0100 Václav Slavík wrote:
VS> > It's not really catastrophic, of course, but it does seem strange to
VS> > litter the user preferences directory like this. Is there really no way to
VS> > avoid it?
VS>
VS> I’m not sure if it’s worth bothering with, because it seems libraries
VS> will write stuff there too (I can see e.g. NSFontPanelAttributes or
VS> NSFontPanelPreviewHeight that I don’t remember writing explicitly in my
VS> plist). I’d consider it a worse problem that the written setting is
VS> sticky and once set, even an update that removes this code won’t remove
VS> it.
Yes, this is true as well, although it's difficult to imagine a situation
when we would want to set this option to "YES".
VS> You should be able to make it ephemeral by registering these defaults
VS> early from a dictionary (using Obj-C 2.0 syntax and not tested):
VS>
VS> NSDictionary *defaults = @{
VS> @"NSTreatUnknownArgumentsAsOpen": @NO // or @"NO" as in the commit
VS> };
VS> [[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
Interesting, thanks, I'd definitely prefer to do it like this. But while
preparing to make this change, I realized I didn't have any test case for
the problem and my attempts to make one just failed, see
http://trac.wxwidgets.org/ticket/14558#comment:8
So now the question becomes: what exactly is the problem and does it still
exist in modern OS X versions? Maybe the best thing to do would be to just
revert 534899b?
Regards,
VZ