NSString function
I get a null return when i try out my NSString function.

    //Track.m
    
    static NSString* trackUrl;
    //static NSString* getTrackNumberUrl;
    
    @implementation Track
    
    - (NSString*)trackUrl {
        return @"http://site.com/?a=";
    }
    
    - (NSString*)setTrackNumberUrl:(NSString*)trackNumberUrl {
        if (trackUrl != trackNumberUrl) {
            return [trackUrl stringByAppendingFormat:trackNumberUrl];
        }
     
     return @"Error no trackNumber";
    }
    
    - (NSString*)getTrackNumberUrl:(NSString*)trackNumber {
     return [[[self alloc] setTrackNumberUrl:trackNumber] autorelease];
    }
    
    @end

MainView.m, just to show the return answer in NSlog


    - (NSString *) trackNumber{
     return [track getTrackNumberUrl:@"86147224549XX"];
    }
    
    - (void)drawRect:(CGRect)rect {
     NSLog(trackNumber);
    }

I get a null return answer? Have i miss something? Thanks.
NSString function
===

I get a null return when i try out my NSString function.

    //Track.m
    
    static NSString* trackUrl;
    //static NSString* getTrackNumberUrl;
    
    @implementation Track
    
    - (NSString*)trackUrl {
        return @"http://site.com/?a=";
    }
    
    - (NSString*)setTrackNumberUrl:(NSString*)trackNumberUrl {
        if (trackUrl != trackNumberUrl) {
            return [trackUrl stringByAppendingFormat:trackNumberUrl];
        }
     
     return @"Error no trackNumber";
    }
    
    - (NSString*)getTrackNumberUrl:(NSString*)trackNumber {
     return [[[self alloc] setTrackNumberUrl:trackNumber] autorelease];
    }
    
    @end

MainView.m, just to show the return answer in NSlog


    - (NSString *) trackNumber{
     return [track getTrackNumberUrl:@"86147224549XX"];
    }
    
    - (void)drawRect:(CGRect)rect {
     NSLog(trackNumber);
    }

I get a null return answer? Have i miss something? Thanks.