Changeset 3615

Show
Ignore:
Timestamp:
03/11/07 19:03:41 (2 years ago)
Author:
timothy
Message:

Fixes some deprecated method use.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Controllers/MVApplicationController.m

    r3459 r3615  
    6767        if( _hidEntry ) { 
    6868                IOObjectRelease( _hidEntry ); 
    69                 _hidEntry = nil
     69                _hidEntry = 0
    7070        } 
    7171 
  • trunk/Models/JVEmoticonSet.m

    r3418 r3615  
    246246        NSString *contents = nil; 
    247247        if( floor( NSAppKitVersionNumber ) <= NSAppKitVersionNumber10_3 ) // test for 10.3 
    248                 contents = [NSString stringWithContentsOfURL:[self styleSheetLocation]]; 
     248                contents = [NSString performSelector:@selector( stringWithContentsOfURL: ) withObject:[self styleSheetLocation]]; 
    249249        else contents = [NSString stringWithContentsOfURL:[self styleSheetLocation] encoding:NSUTF8StringEncoding error:NULL]; 
    250250        return ( contents ? contents : @"" ); 
  • trunk/Models/JVStyle.m

    r3418 r3615  
    495495        NSString *contents = nil; 
    496496        if( floor( NSAppKitVersionNumber ) <= NSAppKitVersionNumber10_3 ) // test for 10.3 
    497                 contents = [NSString stringWithContentsOfURL:[self mainStyleSheetLocation]]; 
     497                contents = [NSString performSelector:@selector( stringWithContentsOfURL: ) withObject:[self mainStyleSheetLocation]]; 
    498498        else contents = [NSString stringWithContentsOfURL:[self mainStyleSheetLocation] encoding:NSUTF8StringEncoding error:NULL]; 
    499499        return ( contents ? contents : @"" ); 
     
    503503        NSString *contents = nil; 
    504504        if( floor( NSAppKitVersionNumber ) <= NSAppKitVersionNumber10_3 ) // test for 10.3 
    505                 contents = [NSString stringWithContentsOfURL:[self variantStyleSheetLocationWithName:name]]; 
     505                contents = [NSString performSelector:@selector( stringWithContentsOfURL: ) withObject:[self variantStyleSheetLocationWithName:name]]; 
    506506        else contents = [NSString stringWithContentsOfURL:[self variantStyleSheetLocationWithName:name] encoding:NSUTF8StringEncoding error:NULL]; 
    507507        return ( contents ? contents : @"" ); 
     
    514514        NSString *contents = nil; 
    515515        if( floor( NSAppKitVersionNumber ) <= NSAppKitVersionNumber10_3 ) // test for 10.3 
    516                 contents = [NSString stringWithContentsOfURL:url]; 
     516                contents = [NSString performSelector:@selector( stringWithContentsOfURL: ) withObject:url]; 
    517517        else contents = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:NULL]; 
    518518 
  • trunk/Preferences/JVAppearancePreferences.m

    r3471 r3615  
    77#import "JVDetailCell.h" 
    88#import "NSBundleAdditions.h" 
     9 
     10#import <objc/objc-runtime.h> 
    911 
    1012@interface WebView (WebViewPrivate) // WebKit 1.3 pending public API 
     
    561563- (void) saveStyleOptions { 
    562564        if( _variantLocked ) return; 
    563         [_userStyle writeToURL:[_style variantStyleSheetLocationWithName:[_style defaultVariantName]] atomically:YES]; 
     565 
     566        if( floor( NSAppKitVersionNumber ) <= NSAppKitVersionNumber10_3 ) // test for 10.3 
     567                ((void(*)(id, SEL, id, BOOL))objc_msgSend)( _userStyle, @selector( writeToURL: ), [_style variantStyleSheetLocationWithName:[_style defaultVariantName]], YES ); 
     568        else [_userStyle writeToURL:[_style variantStyleSheetLocationWithName:[_style defaultVariantName]] atomically:YES encoding:NSUTF8StringEncoding error:NULL]; 
    564569 
    565570        NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:[_style defaultVariantName], @"variant", nil]; 
     
    759764 
    760765        NSString *path = [[NSString stringWithFormat:@"~/Library/Application Support/Colloquy/Styles/Variants/%@/%@.css", [_style identifier], name] stringByExpandingTildeInPath]; 
    761         [_userStyle writeToFile:path atomically:YES]; 
     766 
     767        if( floor( NSAppKitVersionNumber ) <= NSAppKitVersionNumber10_3 ) // test for 10.3 
     768                ((void(*)(id, SEL, id, BOOL))objc_msgSend)( _userStyle, @selector( writeToFile: ), path, YES ); 
     769        else [_userStyle writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:NULL]; 
    762770 
    763771        [_style setDefaultVariantName:name];