I have set up a window, that I’m using as a custom sheet, to locate 3 files at one time (as opposed to the “death-by-dialog” method).
Once the files are selected, they are validated to make sure they are the correct files ← that is working fine.
If one (or more) file(s) are not correct, I want to re-display the window (as a sheet) with the NSPathControl(s) for incorrectly selected file(s) reset to the default path ← this is NOT working.
pathToFiles: “NSPathCell://localhost/Users/bradbumgarner/Desktop/NFL%20Stats”
tell current application's NSURL to set theURL to initFileURLWithPath_(pathToStats)
result:
2012-11-10 11:12:14.231 NFL Spreads Generator 3.0[16887:1307] +[NSURL initFileURLWithPath:]: unrecognized selector sent to class 0x7fff7bd0e0b8
2012-11-10 11:12:14.242 NFL Spreads Generator 3.0[16887:1307] *** -[NFL_Spreads_Generator_3_0AppDelegate statsLocated:]: +[NSURL initFileURLWithPath:]: unrecognized selector sent to class 0x7fff7bd0e0b8 (error -10000)
I got the pathToFiles string by logging the NSPathControl before any files were selected. I understand that pathToFiles is a string but I can’t figure out how to convert it back to a NSURL object. I have read through the documentation using AppKiDo and have tried using initFileURLWithPath:isDirectory:, initWithString: and a couple of others but I always get the same result.
Thanks in Advance,
Brad Bumgarner
Model: Macbook (mid 2010)
Browser: Safari 7536.25
Operating System: Mac OS X (10.7)