Re: +underPageBackgroundColor
Re: +underPageBackgroundColor
- Subject: Re: +underPageBackgroundColor
- From: Uli Kusterer <email@hidden>
- Date: Wed, 08 Aug 2012 11:46:18 +0200
On 07.08.2012, at 00:38, Graham Cox <email@hidden> wrote:
>
> On 07/08/2012, at 2:38 AM, Kevin Perry <email@hidden> wrote:
>
>> A stab in the dark: Have you tried running with OBJC_PRINT_REPLACED_METHODS set? There's a small chance that you have code in your app or a library that you're linking that replaces via category a method implementation internal to AppKit that +underPageBackgroundColor relies on.
>
>
> Bingo! You nailed it....
>
> I have a category on NSColor that defines all the "named" SVG colours, and there's one called 'linenColor'. In 10.8, there appears to be a private method called +linenColor which is invoked by +underPageBackgroundColor, so it calls my SVG method and I get my sRGB "chino" colour. Removing that method it now works as expected.
>
> Thanks!
>
> I just need to figure a safer way to add my SVG named methods.... They aren't really used for supporting SVG because mostly SVG colours are looked up by parsing the name and using that to do a key-value lookup in a table.
Prefix/suffix them with gc_ / _gc ? Alternately, just define them in a .plist and build your table from that, then you don't need to implement named NSColor methods for them at all.
Cheers,
-- Uli Kusterer
http://stacksmith.org
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden