Problem in path control?

Discussion in 'Mac Programming' started by newformac, May 27, 2011.

  1. macrumors regular

    Joined:
    May 24, 2011
    #1
    Hi all,

    i m using path control to display the path of folder.

    but some time the control is not display when i open my window or when i m trying to set path.

    like this.

    Code:
    //here _logFilesFolder is the referencing outlet of path control.
    
    Preferences* pref = [Preferences sharedInstance];
      [pref setupDefaultLogFilesFolder];
      [_logFilesFolder setURL: [NSURL URLWithString:[pref logFilesFolder]]];
    
    please help me how can i solve this.
     
  2. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    Start by breaking down the complex expression into it's components, and logging them.

    Code:
    Preferences* pref = [Preferences sharedInstance];
    NSLog(@"pref=%@", pref);
    [pref setupDefaultLogFilesFolder];
    NSString* logFilesFolderPath = [pref logFilesFolder];
    NSLog(@"logFilesFolderPath=%@", logFilesFolderPath);
    NSURL* logFilesFolderURL = [NSURL URLWithString:logFilesFolderPath];
    NSLog(@"logFilesFolderURL=%@", logFilesFolderURL);
    NSLog(@"_logFilesFolder=%@", _logFilesFolder);
    [_logFilesFolder setURL:logFilesFolderURL];
    
    These log messages will appear in the Debugger Console of XCode 3 or the Debug Area of XCode 4.

    What do they show you when the control won't display?
     
  3. thread starter macrumors regular

    Joined:
    May 24, 2011
    #3
    thanks its done now.
     

Share This Page