Re: Compiler bug?
Re: Compiler bug?
- Subject: Re: Compiler bug?
- From: Murat Konar <email@hidden>
- Date: Tue, 13 Jul 2010 16:20:30 -0700
Wow. That possibility seemed too outlandish to consider, but there it
is.
Curious though that asking the dictionary poser object to describe
itself triggers the fetch (as does asking for all its keys, BTW), but
actually asking for a value in the object doesn't.
Thanks everybody. And be assured that the code I'm working on is not
production/shipping code, just something for a UI prototype.
_murat
On Jul 13, 2010, at 3:04 PM, Stephen J. Butler wrote:
On Tue, Jul 13, 2010 at 3:44 PM, Murat Konar <email@hidden> wrote:
WTF?
For those interested, you can download my test project from
<http://bugs.muratnkonar.com/FileManagerBug.zip>
If you NSLog(@"class = %@", [attrs class]) you'll see what the problem
is! The NSFileManager function doesn't return an NSDictionary... just
something that behaves like one. My feeling is that a lot of those
attributes are filled in on demand. Maybe a whole set of them come
from stat(), some from the Carbon FileManager, etc.
Your problem is that since NSFileExtendedAttributes isn't in the
approved API, requesting it doesn't cause NSFileAttributes to fetch it
(since Apple never anticipated people asking for it). It just gets
filled in as a side effect of fetching some other attribute.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden