• 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: weird user-default problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird user-default problem


  • Subject: Re: weird user-default problem
  • From: Ondra Cada <email@hidden>
  • Date: Thu, 31 Jan 2002 17:34:20 +0100

Gore,

>>>>>> Gore (G) wrote at Thu, 31 Jan 2002 18:05:01 +0200:
G> [[NSUserDefaults standardUserDefaults] setObject: myColor forKey: @"the
G> color"];
G>
G> Problem:
G>
G> myColor is a NSColor instance, somehow, when this line is run it crash,
G> why!?

Defaults database can contain just plists, IIRC, and NSColor is definitely
not a plist. Encode it into a string or data (the latter can be done
transparently for almost any object via NSArchiver).
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: weird user-default problem
      • From: Malte Tancred <email@hidden>
References: 
 >weird user-default problem (From: Gore <email@hidden>)

  • Prev by Date: Re: Hiding Package Contents
  • Next by Date: Re: PB bug or feature??
  • Previous by thread: weird user-default problem
  • Next by thread: Re: weird user-default problem
  • Index(es):
    • Date
    • Thread