At 3:22 PM -0500 2/13/03, Sherm Pendley wrote:
On Thursday, February 13, 2003, at 03:49 AM, Rich Morin wrote:What's the chance of your reworking your NSBrowser example into an NSOutlineView example?
I downloaded the example immediately, but just got around to trying it. When I did so, I encountered the following problem: 2003-02-14 12:03:05.929 OutlineSample[6242] An uncaught exception was raised 2003-02-14 12:03:05.931 OutlineSample[6242] *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value 2003-02-14 12:03:05.933 OutlineSample[6242] *** Uncaught exception: <NSInvalidArgumentException> *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value OutlineSample has exited due to signal 5 (SIGTRAP). I can force a crash by clicking on the disclosure triangle for ".Trashes" or ".vol" (see attached screenshot). I was able to open other directories, including "Applications", "bin", and "cfcl". The crash occurs in outlineView_numberOfChildrenOfItem, specifically at: $self->{'_dirCache'}->setObject_forKey($contents, $pathKey); $contents is, indeed, undefined. $path, at the time, is set to "//.Trashes". The description for directoryContentsAtPath is: Searches the contents of the directory specified by path and returns an array of strings identifying the directories and files (including symbolic links) contained in path. The search is shallow and therefore does not return the contents of any subdirectories. This returned array does not contain strings for the current directory ("."), parent directory (".."), or resource forks (begin with "._") and does not traverse symbolic links. This method returns nil if the directory specified at path does not exist or there is some other error accessing it. This method returns an empty array if the directory exists, but has no contents. so this might be an indication of an error condition. Looking at the permissions on .Trashes d-wx-wx-wx 2 root admin 68 Apr 11 2002 . and .vol: dr--r--r-- 2 root wheel 64 Feb 13 20:26 234881029 I thought that the issue might be permission-related. And, when I created a test directory (/.foo): (SU) rdm@cerberus [/] 13: L .foo total 0 dr--r--r-- 2 root admin 68 Feb 14 12:45 . drwxrwxr-t 52 root admin 1768 Feb 14 12:45 .. it exhibited the same problem. Also, when I changed the mode to 333, a crash occurred. So, this seems to be a permission-related problem. Here is a workaround, until you can supply a fix... ... return(0) unless (defined($contents)); $self->{'_dirCache'}->setObject_forKey($contents, $pathKey); ... -r -- email: [EMAIL PROTECTED]; phone: +1 650-873-7841 http://www.cfcl.com/rdm - my home page, resume, etc. http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series http://www.ptf.com/tdc - Prime Time Freeware's Darwin Collection
%NSObug.pdf
Description: application/applefile
NSObug.pdf
Description: Adobe PDF document