Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument/NSFileWrapper troubles



On Thursday, July 31, 2003, at 09:27AM, Derek Chesterfield <email@hidden> wrote:

>I can't say that I have the answer, as I am a 'novice', but I have
>highlighted a couple of points in the code below:
>
>On Thursday, July 31, 2003, at 8:58 AM, Christopher Erbach wrote:
[...]
>> - (BOOL)loadFileWrapperRepresentation:(NSFileWrapper *)newWrapper
>> ofType:(NSString *)type {
>> NSEnumerator * fileEnum;
>> id curFile;
>> NSMutableDictionary * metadata;
>> NSString ** error = nil;
>I would remove all these unused variables. Especially that NSString
>**error [is ** even valid in ObjC? I've never seen a double-dereference
>in any sample code before]

Of course double dereferences are valid - they're valid C and hence valid Objective C :-) They might be more unusual, but they're still valid.

They're also completely unnecessary in this case because the entire variable's unused, as you point out.

Cheers,

Chris
_______________________________________________
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.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.