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: What are double asterisks for?



The double asterisks mean a double pointer, or a pointer to a pointer. This
usually means that the API will create an NSDictionary object for you and
pass that back in this parameter.

Here is an example of how you should call this API:

NSDictionary *myDict;
NSFileWrapper* fileWrapper = [[NSFileWrapper alloc] init...];

[myObject initWithRTFDFileWrapper:fileWrapper documentAttributes:&myDict];

...Do something with the document attributes now stored in myDict;

[myDict release];
[fileWrapper release];

Joe


> From: Ian Gillespie <email@hidden>
> Date: Sun, 29 Dec 2002 12:57:54 -0800
> To: email@hidden
> Subject: What are double asterisks for?
>
> For example:
>
> - (id)initWithRTFDFileWrapper:(NSFileWrapper *)wrapper
> documentAttributes:(NSDictionary **)docAttributes
>
> Notice ** after the NSDictionary. I tried using this method and
> passing a dictionary as an argument and I got a compile error:
> Invoice.m:140: warning: passing arg 2 of
> `initWithRTF:documentAttributes:' from incompatible pointer type
>
> Can someone help please? Thanks.
> _______________________________________________
> 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: 
 >What are double asterisks for? (From: Ian Gillespie <email@hidden>)



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.