I still get an error:
2010-08-29 09:13:46.337 ishop[2766:10b] *** -[NSURL
URLByAppendingPathComponent:]: unrecognized selector sent to instance
0xc6356a0
2010-08-29 09:13:46.337 ishop[2766:10b] *** -[NSURL
URLByAppendingPathComponent:]: unrecognized selector sent to instance
0xc6356a0
What OS are you building for?
On 29-Aug-2010, at 4:14 PM, Amy Heavey wrote:
I still get an error:
2010-08-29 09:13:46.337 ishop[2766:10b] *** -[NSURL
URLByAppendingPathComponent:]: unrecognized selector sent to instance
0xc6356a0
2010-08-29 09:13:46.337 ishop[2766:10b] *** -[NSURL
10.5 i386,
On 29 Aug 2010, at 9:21AM, Roland King wrote:
What OS are you building for?
On 29-Aug-2010, at 4:14 PM, Amy Heavey wrote:
I still get an error:
2010-08-29 09:13:46.337 ishop[2766:10b] *** -[NSURL
URLByAppendingPathComponent:]: unrecognized selector sent to
instance 0xc6356a0
and when you look at the documentation for that method it was available
starting with which OS version?
convert your NSURL into an NSString, then use stringByAppendingPathComponent
and convert it back to an NSURL again. Or use the string-based file methods
instead.
On 29-Aug-2010, at 4:22
On 29/08/2010, at 10:14 AM, Amy Heavey wrote:
I still get an error:
On what line?
Looking at the code you have mixed string paths and URLs. Pick one or the other
and use it consistently. While string paths are becoming deprecated in favour
of URLs, it might be easier to just use string
Thanks everyone, I've been looking at everything and still can't quite
get my head round it, basically all I want to do is copy a selected
file to a new location.
I'm using a coredata app, so I was trying to follow the 'default' code
provided, but I'm compiling for 10.5 and it seems
NSFileManager copyItemAtPath:toPath: takes two NSString's so you can't use an
NSURL anyway. In fact nothing in that code needs an NSURL.
Get rid of that NSURL stuff (note: typed in mail)
NSString *imagePath = [ [ [ self applicationSupportFolder ]
stringByAppendingPathComponent:@images ]
Thank You!
I had been trying to do that but couldn't get the brackets right,
sometimes you just need to start a fresh line instead of trying to
edit don't you.
That's working now and is perfect,
Thank you for your time and help everyone,
Many Thanks
Amy
On 29 Aug 2010, at 10:43AM,
Amy Heavey wrote:
... I've tried just using strings, but the applicationSupportFolder
returns a string, which then is immutable so I can't add to it?
There's a significant misconception lurking here.
None of the NSString methods for appending or deleting actually
modify the NSString they
'm trying to do a fairly simple copy file process, so I select a file,
and it gets copied to a new location. I seem to be mixing up NSString
and NSURL as I keep getting an NSURL error, can anyone point me down
the right path?
This is what I've got at the moment:
-
On Aug 28, 2010, at 7:58 AM, Amy Heavey wrote:
'm trying to do a fairly simple copy file process, so I select a file, and it
gets copied to a new location. I seem to be mixing up NSString and NSURL as I
keep getting an NSURL error, can anyone point me down the right path?
What is the
This is incorrect:
NSString* fileName= [filePath lastPathComponent];
NSMutableString* imagePath;
imagePath = defaultImageLocation;
[imagePath stringByAppendingPathComponent:fileName];
[[ NSFileManager defaultManager ]
Sorry duh!
2010-08-28 15:55:27.961 ishop[1920:10b] *** -[NSURL
stringByAppendingPathComponent:]: unrecognized selector sent to
instance 0x16fbe0
2010-08-28 15:55:27.961 ishop[1920:10b] *** -[NSURL
stringByAppendingPathComponent:]: unrecognized selector sent to
instance 0x16fbe0
Many
Oh duh. imagePath is an NSURL, because defaultImageLocation is an NSURL, and
stringByAppendingPathComponent: is an NSString method.
Dave
On Aug 28, 2010, at 9:03 AM, Dave DeLong wrote:
This is incorrect:
NSString* fileName= [filePath lastPathComponent];
NSMutableString*
On Aug 28, 2010, at 8:04 AM, Amy Heavey wrote:
Sorry duh!
2010-08-28 15:55:27.961 ishop[1920:10b] *** -[NSURL
stringByAppendingPathComponent:]: unrecognized selector sent to instance
0x16fbe0
2010-08-28 15:55:27.961 ishop[1920:10b] *** -[NSURL
stringByAppendingPathComponent:]:
15 matches
Mail list logo