• 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: Save Any Color
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Save Any Color


  • Subject: Re: Save Any Color
  • From: John Haney <email@hidden>
  • Date: Tue, 3 Jun 2003 12:27:42 -0700 (PDT)

Lorenzo,

NSColor handles NSCoding, so you can archive the
object as NSData, then grab it back from data without
having to worry where the color came from...

take a look at NSArchiver +archivedDataWithRootObject:
and NSUnarchiver +unarchiveObjectWithData:

- John


--- Lorenzo <email@hidden> wrote:
> Hi,
> the user choses a color and I have to save it.
> The user can choose an RGB or CMYK or
> NSNamedColorSpace,...
> then I get the 4 components (red green blue alpha),
> I put them into an
> NSRect and I save the rect in a NSDictionary plist
> file. It works.
>
> But if the user doesn't chooses an RGB color, later
> if I try to get the red
> or green or blueComponent I get an exception.
>
> Is a way to get and save the color all the ways?
> Thank you,
>
>
> Best Regards
> --
> Lorenzo
> email: email@hidden
> _______________________________________________
> 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.


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.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.

References: 
 >Save Any Color (From: Lorenzo <email@hidden>)

  • Prev by Date: Re: Static linking with the Mach-O linker in PB
  • Next by Date: RE: Save Any Color
  • Previous by thread: Save Any Color
  • Next by thread: RE: Save Any Color
  • Index(es):
    • Date
    • Thread