the following code works in debugger , running out of xcode. tmpsourcec gets actual path. moment build release path becomes //10.5/... instead of path gets out of xcode. forgetting include anything?
code:
- (nsstring *)color: (nsstring *)coldvr { tmpsourcec = [[filemanager currentdirectorypath] stringbyappendingstring:@"/10.5/xerox phaser 7760gx.gz"]; nsrunalertpanel(@"directory path", (@"the path %s",tmpsourcec), @"ok", nil, nil); dvrchk = [filemanager fileexistsatpath:sourcecolor]; if (dvrchk == no) { [filemanager copypath:[[filemanager currentdirectorypath] stringbyappendingstring:@"/10.5/xerox phaser 7760gx.gz"] topath:@"/library/printers/ppds/contents/resources/xerox phaser 7760gx.gz" handler:nil]; } dvrchk = [filemanager fileexistsatpath:sourcecolor]; if (dvrchk == no) { coldvr = @"no"; return coldvr; } else { coldvr = @"yes"; return coldvr; } }
are expecting -currentdirectorypath return path application? if so, use [[nsbundle mainbundle] bundlepath] instead.
Forums Macs Mac Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
Comments
Post a Comment