• 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: SEL and NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SEL and NSDictionary


  • Subject: Re: SEL and NSDictionary
  • From: Glen Low <email@hidden>
  • Date: Thu, 3 Jun 2004 08:13:00 +0800

Can one place a SEL into an NSDictionary?


If wrapping the SEL in an object strikes you as somewhat wasteful, you can use a CFDictionary instead of an NSDictionary, and just write the appropriate hash and equality functions for SEL. Since SEL is really just an atomized const char*, you can just use (int) SEL for hash and a == b for equality. Since it's persistent without reference counting, retain and release can just be no-ops.

Cheers, Glen Low


---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
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.


  • Prev by Date: How to crop NSPDFImageRep
  • Next by Date: Re: HTML to NSString
  • Previous by thread: Re: SEL and NSDictionary
  • Next by thread: Re: autorelease and distributed objects
  • Index(es):
    • Date
    • Thread