in

Objective C file Browser

I am teaching myself object-c on the Mac OS platform.

It is not hard to learn and I think I'll make good use of it.

I am looking for the best way to give users a Browse For file feature.

I figure I can make my a form and do this,  but surely the API library has an object that was built for browsing and selecting a file and/or folder?

I did browse developer.apple.com for some sample code but I am not doing a very good job of finding what I am looking for.  

I think I saw a NSBrowser object - is this what I want?

Does anyone have sample code that does this with an existing API or no existing API is available then just a sample project of how it was done?

Movie Stars

Solution: Objective C file Browser

Or even that way - I attached a very simple code.

BTW, just for fun, same in AppleScript:

set theFile to (choose file with prompt "Select a file to read:" of type {"TEXT"})
open for access theFile
set fileContents to (read theFile)
close access theFile
1:
2:
3:
4:
5:
6:
7:
NSOpenPanel *open = [NSOpenPanel openPanel];
int result = [open runModal];
if (result == NSOKButton)
{
	NSString *selectedFile = [open filename];
	NSLog(@"file: %@", selectedFile);
}