Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
How does one obtain the filename using URL?

Read the page and follow the links.

Start on the page you posted.

Read the deprecation warning. Notice the word "URL" in "Use URL instead." after the warning. It is a link. Click it.

You are now at the URL method. Notice its return type: NSURL *. Notice the word "NSURL" is a link. Click it.

You are now at the NSURL class reference. You can manually scroll around the page reading descriptions, or you can use Find to find the word "path" (a reasonable guess since the -filename method is described as returning a pathname). Eventually, you should stumble upon the -path method, which returns NSString*. Read its description.

All the Cocoa documentation works like this. Many keywords, method names, and typenames are links. Clicking it takes you to the reference doc.
 
I see that the filename property is not deprecated in NSSavePanel now.
http://developer.apple.com/mac/libr...ml#//apple_ref/occ/instm/NSSavePanel/filename

How does one obtain the filename using URL?

1. Some people don't care about spelling, but if your careless spelling changes the meaning of a sentence to the exact opposite, then you should figure out that you need a bit more careful.

2. "Deprecated" means you shouldn't use it, not that can't use it. It will work fine in 10.6, and probably in 10.7, and disappear in 10.8. Lots of time.

3. You are not supposed to obtain the filename, that's why it is deprecated. You are supposed to use URLRef for everything.
 
Yes, I know but might as well do it the correct way now! :)

Yes, I have looked at the docs already and I cannot figure out how to do this. I'm sorry if I'm stupid.
 
Many keywords, method names, and typenames are links. Clicking it takes you to the reference doc.

Sort of off-topic, but I wish they would also provide links to structs and things like NS(U)Integer for us cocoa newbies.
 
Code:
NSSavePanel *savePanel = [NSSavePanel savePanel];
// setup save panel and run
NSURL *fileURL = [savePanel URL];
Now you have an NSURL object representing the file that was chosen in the save panel. If whatever API you are using after this doesn't work with NSURL objects, you can call path to get an NSString and use that instead:
Code:
NSString *filePath = [fileURL path];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.