Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

newformac

macrumors regular
Original poster
May 24, 2011
107
0
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.
 

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.