Changeset 524

Show
Ignore:
Timestamp:
05/17/07 11:34:23 (2 years ago)
Author:
gbooker
Message:

Apparently, NSBundle is caching the info.plist for the old bundle when the new one is replaced, meaning all the version information is for the old one. This is why the update mechanism wasn't working when the new pref pane was loaded but it wasn't caught in repeated testing.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CPFPerianPrefPaneController.m

    r523 r524  
    203203} 
    204204 
     205- (NSDictionary *)myInfoDict; 
     206{ 
     207        return [NSDictionary dictionaryWithContentsOfFile:[[[self bundle] bundlePath] stringByAppendingPathComponent:@"Contents/Info.plist"]]; 
     208} 
     209 
    205210- (void)checkForInstallation 
    206211{ 
    207         NSDictionary *infoDict = [[self bundle] infoDictionary]; 
     212        NSDictionary *infoDict = [self myInfoDict]; 
    208213        NSString *myVersion = [infoDict objectForKey:BundleVersionKey]; 
    209214         
     
    275280        [self checkForInstallation]; 
    276281        NSString *lastInstVersion = [self getStringFromKey:LastInstalledVersionKey forAppID:perianAppID]; 
    277         NSString *myVersion = [[[self bundle] infoDictionary] objectForKey:BundleVersionKey]; 
     282        NSString *myVersion = [[self myInfoDict] objectForKey:BundleVersionKey]; 
    278283        if((lastInstVersion == nil || [lastInstVersion isVersionStringOlderThan:myVersion]) && installStatus != InstallStatusInstalled) 
    279284        { 
     
    515520{ 
    516521        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 
    517         NSDictionary *infoDict = [[self bundle] infoDictionary]; 
     522        NSDictionary *infoDict = [self myInfoDict]; 
    518523        NSDictionary *myComponentsInfo = [infoDict objectForKey:ComponentInfoDictionaryKey]; 
    519524        NSString *componentPath = [[[self bundle] resourcePath] stringByAppendingPathComponent:@"Components"]; 
     
    563568{ 
    564569        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 
    565         NSDictionary *infoDict = [[self bundle] infoDictionary]; 
     570        NSDictionary *infoDict = [self myInfoDict]; 
    566571        NSDictionary *myComponentsInfo = [infoDict objectForKey:ComponentInfoDictionaryKey]; 
    567572