Re: How to create a GUID?
Re: How to create a GUID?
- Subject: Re: How to create a GUID?
- From: Klaus Backert <email@hidden>
- Date: Sun, 7 Sep 2008 10:42:41 +0200
- (NSString *)uuid
{
CFUUIDRef uuidRef = CFUUIDCreate(NULL);
CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef);
CFRelease(uuidRef);
return [NSMakeCollectable(uuidStringRef) autorelease];
}
the receiver of this -uuid message is a NSString _instance_ – is
there any reason why this could not be implemented as a class method
+ (NSString *)uuid { /* same as above */ }
or as a free function
NSString * MYuuid() { /* same as above */ }
?
Klaus
_______________________________________________
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