Classes vs. custom palettes
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.