Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding an NSColor subclass to NSColorPanel?




On Jul 31, 2008, at 2:20 PM, David Springer wrote:
I would like to add instances of a subclass of NSColor to the color
panel.  The problem is, when you change to another app that does not
know about this subclass, the NSColorPanel kind of freaks out and
shows all the colors as white (even the system colors) - in some cases
it just crashes the other app.  Is there a way I can tell NSColorPanel
to add my special colors only for my app, and not affect other apps?

The problem goes a bit deeper. At least in the past, if the user puts
a custom colors on the palette of colors, it would get archived and will
other apps may raise/crash trying to unarchive load the color list from
~/Library/Colors/NSColorPanelSwatches.plist. If you do this, it would
be good to make sure your colors *archive* themselves as normal colors,
possibly using -replacementObjectForArchiver:, substituting a stock color.


-tim

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Adding an NSColor subclass to NSColorPanel? (From: "David Springer" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.