• 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
Classes vs. custom palettes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Classes vs. custom palettes


  • Subject: Classes vs. custom palettes
  • From: Andrew Merenbach <email@hidden>
  • Date: Thu, 22 Aug 2002 10:17:30 -0700

In my periodic table program, I currently have a giant NSMatrix filling the window, with certain buttons cells transparent and disabled (so they won't be seen or interacted with), and the other cells forming the table. The elements themselves are in subclasses of NSButtonCell--one class for each of twelve different colors. I have taken a look at Aaron Hillegass' book, "Cocoa Programming for Mac OS X," and I stumbled upon an idea. Instead of using lots of classes for the different buttons, why not give the buttons their own IB Palette? Then I could even program them to have their colors set in IB, thus reducing the number of button cell subclasses.

I don't plan on necessarily releasing this IB palette to the public, and my question is: I haven't found anything on whether or not my program would take a performance hit from using this palette idea. Is there any advantage to sticking with multiple button cell subclasses?

Take care,
Andrew Merenbach
_______________________________________________
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.

  • Follow-Ups:
    • Re: Classes vs. custom palettes
      • From: Marco Scheurer <email@hidden>
  • Prev by Date: Linker can't find NSApplication?
  • Next by Date: Re: Bundle loading
  • Previous by thread: Linker can't find NSApplication?
  • Next by thread: Re: Classes vs. custom palettes
  • Index(es):
    • Date
    • Thread