Updating tk +quartz failed on Snow Leopard

Joshua Root jmr at macports.org
Thu Aug 25 18:49:45 PDT 2016


On 2016-8-26 11:21 , Ryan Schmidt wrote:
>
> On Aug 25, 2016, at 11:38 AM, Ryan Schmidt wrote:
>
>> tk isn't the first program to need to deal with Retina displays. Can we find any other program that uses NSWindow's backingScaleFactor selector and see how it handles it?
>
> I missed these warning from the original post:
>
> warning: ‘NSWindow’ may not respond to ‘-backingScaleFactor’
> warning: (Messages without a matching method signature
> warning: will be assumed to return ‘id’ and accept
> warning: ‘...’ as arguments.)
>
> I *think* if we could use the 10.7 SDK, then it would know that -backingScaleFactor actually returns a float and wouldn't complain. But we can't use the 10.7 SDK because it's not in Xcode 3.2.6. Wikipedia says it's in Xcode 4.1 and later, but I don't see it in Xcode 4.1 or 4.2 for Snow Leopard. Maybe it's only in Xcode 4.1 and 4.2 for Lion. (They were different.)
>
> I think that code just has to be excluded for 10.6 and earlier with preprocessor directives.

Or you could use a category to add a declaration of backingScaleFactor 
(appropriately #ifdef'd for < 10.7 only of course.)

<https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html>

- Josh


More information about the macports-dev mailing list