• 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
ScreenSaverDefaults woes...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ScreenSaverDefaults woes...


  • Subject: ScreenSaverDefaults woes...
  • From: Phillip Hutchings <email@hidden>
  • Date: Wed, 14 Jan 2004 16:14:46 +1300

I'm trying to give my screensaver preferences. It works fine with everything except NSColor, for text and background colours.

I'm getting the colours from an NSColorWell in to an NSColor*, like this:

NSColor *newTextColour = [textColour color];
NSColor *newBgColour = [backgroundColour color];

But when I try to synchronise the defaults, it crashes.

The problem is the NSColors are being released somewhere, I've logged the retain counts from an NSLog() and I get this:
Retain Counts: newTextColour:4294967295 newBgColour:4294967295
Just after getting them.

Checking from the debugger, the type of the two NSColors is NSCachedWhiteColor. Now, I know that at least one of those is set to black, and I have no idea why I'm getting those and not an NSColor, as the documentation suggests. I know they're both linked properly in IB.

Any ideas?

This is on 10.3, but the screensaver is supposed to work on 10.2 as well.
--
Phillip Hutchings
email@hidden
http://www.sitharus.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.
  • Follow-Ups:
    • Re: ScreenSaverDefaults woes...
      • From: "Louis C. Sacha" <email@hidden>
  • Prev by Date: Re: NSArrayController with Combo Boxes, etc.
  • Next by Date: Re: How to completely release every object allocated when opening a NIB file ?
  • Previous by thread: Re: Objectiv-C++ to ANSI-C++ problem
  • Next by thread: Re: ScreenSaverDefaults woes...
  • Index(es):
    • Date
    • Thread