Re: NSOpenPanel Path Problem
Re: NSOpenPanel Path Problem
- Subject: Re: NSOpenPanel Path Problem
- From: "John Q." <email@hidden>
- Date: Fri, 28 Mar 2003 11:22:23 +0100
Thank you for helping fast Marco
perfect it run!! Thank you
John
Am Freitag, 28.03.03 um 10:58 Uhr schrieb Marco Binder:
As far as I can remember, [NSOpenpanel filenames] returns an NSArray,
that would explain the quotation marks in your string. Try [[openpanel
filenames] objectAtIndex:0] or if you are sure only one directory has
been chosen you can use [openpanel filename] (note:without "s")
As for NSBrowser: try out the docs and examples for NSTableView first.
The dataSource principle is the same for both and the main point to
understand!
Marco
Am Freitag, 28.03.03 um 10:44 Uhr schrieb John Q.:
Hi,
I have a problem with the NSOpenPanel, when I load the path from a
folder
with the NSOpenPanel in an NSTextview the path starts and ends with ("
").
In the following is my code!! Don4t laugh!! I4m a newbie!!!
Thanks
John
P.S. And I don4t understand the NSBrowser!! I would read this path in
and see the files in the Browser!!
The example in the Apple Dokumentation have not many examples and the
folder with examples is not really easy!!
- (IBAction)src_search_btn:(id)sender
{
int result;
NSString *current_src_path;
NSOpenPanel *src_oDlg = [NSOpenPanel openPanel];
[src_oDlg setCanChooseDirectories:YES];
[src_oDlg setCanChooseFiles:NO];
result = [src_oDlg runModalForDirectory:NSHomeDirectory() file:nil];
if (result == NSOKButton)
{
current_src_path = [src_oDlg filenames];
}
[src_field setStringValue:current_src_path];
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
--
|\ /| E-Mail: email@hidden WWW: www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.