Preferences panel defaults refresh


Just got my preferences panel to show the defaults, all happy.
However I noticed that for a fraction of a second the values displayed are those created in the XIB, then they are updated with the correct default ones.
I have got round that problem by making the panel invisible at launch, then after setting the colours of the controls, making the panel visible (shown in green (hopefully!):

  • (void)windowDidLoad
    [super windowDidLoad];
    // set the colours
    [colorWell setColor:[PreferenceController preferenceTableBgColor]];
    [checkbox setState:[PreferenceController preferenceEmptyDoc]];

[color=#00FF40] // now display!
[self showWindow:nil];[/color]

NSLog(@"Nib file is loaded");

Is that the best way round the issue?

Presumably this won’t happen if I use bindings but I haven’t tried that yet.


Unfortunately this is a system resources issue.

I take it that you’re running a stock Mac? i.e. with the memory etc… it came with? In my experience, most of the entry level Mac’s come with just enough memory to run what they should.

I got the MBP 2011 15" and that came with 2GB of DDR3 and some slow 720GB HDD. This is back when I used to notice things like that.

After saving up I managed to scrounge up 8GB DDR3 and a SSD drive, and since then, I don’t notice any issues.

I think for the price we pay, apple COULD throw in a little more memory :-/

If it’s not this, then the rant is pointless, but it might be worth shoving a breakpoint in just after the panel fires up and step into each line of code and see if there’s anything that takes particularly long.