/ Published in: Objective C

This detects if a preference pane is loaded over an already loaded older version. If the version mismatches, the reload tool (http://snipplr.com/view/3924/reload-a-preference-pane/) is launched and System Preferences is quitted.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
{ if ([[self class] version] != 0) { [NSApp terminate:self]; } [[self class] setVersion:1]; if ((self = [super initWithBundle:bundle]) != nil) { // initializations } return self; }
Comments
