Re: NSOpenPanel
Re: NSOpenPanel
- Subject: Re: NSOpenPanel
- From: cricket <email@hidden>
- Date: Fri, 3 Oct 2003 09:01:19 -0700
You want %d, not %@ (which is for printing out objects). It's the
attempt to reference a non-object as an object that causes your program
to crash.
- cricket
On Oct 3, 2003, at 8:52 AM, Malcolm Sharman wrote:
Hi All
I don't entirely understand why the NSLog() line of code is crashing..
result = [panel runModalForDirectory:NSHomeDirectory() file:nil
types:nil];
if (result == NSOKButton) {
NSArray *files = [panel filenames];
NSLog(@"*** %@ items in array ***", [files count]);
...
}
I'm just confused as to why accessing the count method of NSArray would
crash when I just initalised it. Any ideas?
Malcolm
It's probably something I'm doing stupid again, but I can't for the
life of
me work it out...maybe the fact it's 2am....
_______________________________________________
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.
_______________________________________________
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.
References: | |
| >NSOpenPanel (From: Malcolm Sharman <email@hidden>) |