• 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
FYI: Bug with archived NSShadow objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: Bug with archived NSShadow objects


  • Subject: FYI: Bug with archived NSShadow objects
  • From: Ricky Sharp <email@hidden>
  • Date: Tue, 07 Dec 2004 11:20:13 -0600

I just filed the following bug:

<rdar://3908770>

I've found that under Mac OS X 10.3.6 (I haven't had the chance to explore other versions), that the x-offset value of an NSShadow is either not being decoded correctly.  When decoding, you always get a value of 0.  It could be the case where the encoding side of things is at fault though.

A workaround involves not coding/decoding the NSShadow directly (which should have worked since it conforms to NSCoding).   Instead, code/decode the individual attributes.

So instead of:

    [coder encodeObject:[self textShadow] forKey:@"MyTextShadow"];

you'd use:

    NSShadow* theTextShadow = [self textShadow];

    [coder encodeObject:[theTextShadow shadowColor] forKey:@"MyTextShadowColor"];
    [coder encodeFloat:[theTextShadow shadowBlurRadius] forKey:@"MyTextShadowBlurRadius"];
    [coder encodeFloat:[theTextShadow shadowOffset].width forKey:@"MyTextShadowXOffset"];
    [coder encodeFloat:[theTextShadow shadowOffset].height forKey:@"MyTextShadowYOffset];

You'd do something similar when decoding.

--
Rick Sharp
Instant Interactive(tm)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: FYI: Bug with archived NSShadow objects
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: Save Output of NSTask to file
  • Next by Date: Re: Found! Click, activate window and select an object
  • Previous by thread: NSSearchField In Modal Dialog;
  • Next by thread: Re: FYI: Bug with archived NSShadow objects
  • Index(es):
    • Date
    • Thread