• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to create a GUID?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to create a GUID?
      • From: Scott Ribe <email@hidden>
    • Re: How to create a GUID?
      • From: "I. Savant" <email@hidden>
References: 
 >How to create a GUID? (From: Meik Schuetz <email@hidden>)
 >Re: How to create a GUID? (From: "I. Savant" <email@hidden>)
 >Re: How to create a GUID? (From: "Finlay Dobbie" <email@hidden>)
 >Re: How to create a GUID? (From: "I. Savant" <email@hidden>)
 >Re: How to create a GUID? (From: "Clark Cox" <email@hidden>)

  • Prev by Date: Re: text view example
  • Next by Date: Re: new to Cocoa -- threading question
  • Previous by thread: Re: How to create a GUID?
  • Next by thread: Re: How to create a GUID?
  • Index(es):
    • Date
    • Thread