On Friday, February 14, 2003, at 04:01 PM, Rich Morin wrote:

I can force a crash by clicking on the disclosure triangle for ".Trashes"
or ".vol"
Then don't click on those. ;-)

Seriously, though...

Here is a workaround, until you can supply a fix...
        ...
	return(0) unless (defined($contents));
        $self->{'_dirCache'}->setObject_forKey($contents, $pathKey);
I'd call that a reasonable fix - the problem is that $contents is undef (nil) if the directory is unreadable for some reason, and undef isn't a valid object to add to a dictionary.

I could also use this as an opportunity to extend the demo, though. For example, a directory that couldn't be read could have a disclosure triangle, but its name displayed in red, and opening it wouldn't be allowed. That would be an interesting way to illustrate some of the more advanced functions used in NSOutlineView.

Stay tuned...

sherm--

C programmers never die - they're just cast into void.

Reply via email to