TOC | PREV | NEXT

Problem: You used to use Ali Ozer's NXColor storing mechanism that you read on the net but is clearly useless for NSColors. Now what?
Solution:
Use the new NSUserDefaults object to do it right:

void SDWriteDefaultColorValue(NSString *name, NSColor * c)
{
      [[NSUserDefaults standardUserDefaults] setObject:[NSArchiver archivedDataWithRootObject:c] forKey:name];
}

NSColor * SDGetDefaultColorValue(NSString *name)
{
      NSData * data;
      data = [[NSUserDefaults standardUserDefaults] dataForKey:name];
      if (data == nil) return [NSColor blackColor];
      else return [NSUnarchiver unarchiveObjectWithData:data];
}


Problem:
Some of your textfields don't tab correctly and their delegate 's are nil
      

Solution: The NIB conversion is somewhat faulty - you have to rehook up the "nextKeyView" variable for the Next Text in IB, as well as reset the delegate on custom subclasses of TextField.

TOC | PREV | NEXT
Match: Format:
Search:
Created by Stone Design's Create on 6/2/1997