Careful with this -- it's possible this will interfere with existing methods on 
OSs that have that method, and it'll be useless on OSs that don't have that 
method (it won't associate with any of the state of the NSColor object).  It's 
likely this was SPI, in which case it'll work, but it's pretty fragile.

--
Christopher Wright
christopher_wri...@apple.com


On Jul 20, 2013, at 12:28 PM, George Toledo <gtole...@gmail.com> wrote:

> That's what I'm seeing - differences between the color port stuff/NSColor in 
> 10.8 and previous…the ARC part is spurious.
> 
> Haven't dealt with this before…
> 
> Perhaps you can do something like this right after your imports in your 
> QCColourArtPlugin.m or make a separate file and import that ala 
> https://gist.github.com/msanders/707921
> 
> #import <AppKit/AppKit.h>
>  
> @interface NSColor (CGColor)
>  
> //
> // The Quartz color reference that corresponds to the receiver's color.
> //
> @property (nonatomic, readonly) CGColorRef CGColor;
>  
> //
> // Converts a Quartz color reference to its NSColor equivalent.
> //
> + (NSColor *)colorWithCGColor:(CGColorRef)color;
>  
> @end
> 
> That said, I can't get your plugin to compile because I'm missing 
> "Ports.plist"
> 
> -gt
> 
> On Jul 20, 2013, at 2:52 PM, "Chris (CoreGraphics) Wright" 
> <christopher_wri...@apple.com> wrote:
> 
>> Are you just getting errors regarding NSColor?  If not, can you post the 
>> error messages you're receiving?
>> 
>> I just see some NSColor stuff, and that's because -[NSColor CGColor] was 
>> added in 10.8, so it wouldn't be available in 10.7.  ARC complains about 
>> this because it doesn't know how ownership works for the returned thing 
>> since the method doesn't exist as far as it's concerned.
>> 
>> https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html
>> 
>> --
>> Christopher Wright
>> christopher_wri...@apple.com
>> 
>> 
>> On Jul 20, 2013, at 10:58 AM, Jonathan Hammond <itsthej...@gmail.com> wrote:
>> 
>>> Hi guys i've got a QC plugin that works out the primary colours of an image 
>>> like iTunes. I'm truing to build it for 10.7, each time i change the build 
>>> targets I get ARC Semantic Issues, i'm not a Obj C guys and am very 
>>> confused about how to fix this. Could anyone help 
>>> 
>>> The Source is located here 
>>> https://dl.dropboxusercontent.com/u/31564678/QCColourArt%202.zip
>>> 
>>> Much thanks
>>> 
>>> J
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/quartzcomposer-dev/christopher_wright%40apple.com
>>> 
>>> This email sent to christopher_wri...@apple.com
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/quartzcomposer-dev/gtoledo3%40gmail.com
>> 
>> This email sent to gtole...@gmail.com
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to