Re: type of errorString argument for propertyListFromData
Re: type of errorString argument for propertyListFromData
- Subject: Re: type of errorString argument for propertyListFromData
- From: David Remahl <email@hidden>
- Date: Tue, 16 Mar 2004 08:46:46 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
16 mar 2004 kl. 08.25 skrev John Karp:
In Foundation/NSPropertyList.h,
+ (id)propertyListFromData:(NSData *)data
mutabilityOption:(NSPropertyListMutabilityOptions)opt
format:(NSPropertyListFormat *)format errorDescription:(NSString
**)errorString;
Is the double star (**) for errorString a typo?
Thanks
No, it means that the method expects a pointer to a pointer. In other
words, it needs some space to store the address of an object that it
may create.
Typical usage:
NSString *error = nil;
id plist = nil;
plist = [NSObject propertyListFrom
Data:someData
mutabilityOption:SomeConstant format:SomeConstant
errorDescription:&error];
if( !plist ) // something went wrong
NSLog(@"Error: %@", error );
Most functions also permit that you pass nil in place of the pointer to
a pointer, but you will have to check the documentation for that.
/ Regards, David Remahl
- - --- PGP key information---
pub 1024D/ 87256085 2003/06/12 David Remahl <email@hidden>
Web:
http://ittpoi.com/david_remahl.asc
Fingerprint: 0C38 293C 86A9 7756 9CEA 4ED6 1651 620E 8725 6085
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFAVq+kFlFiDoclYIURAu7DAJ9t4VGpn+9VCXevDlqX7/T1mKifvACfTJX7
5j6fJmI7nMGgPiVb2EAM2tc=
=4b7f
- -----END PGP SIGNATURE-----
- --- PGP key information---
pub 1024D/ 87256085 2003/06/12 David Remahl <email@hidden>
Web:
http://ittpoi.com/david_remahl.asc
Fingerprint: 0C38 293C 86A9 7756 9CEA 4ED6 1651 620E 8725 6085
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFAVrDmFlFiDoclYIURAt7fAJ9x6jWMco2roGQ5/ebHGcA7G5kRrACfYRHe
tUwf3+1SfzQyvNHMACbofLI=
=gqyk
-----END PGP SIGNATURE-----
_______________________________________________
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.