Re: [Q] NSObject's poseAsClass - Replacement?
Re: [Q] NSObject's poseAsClass - Replacement?
- Subject: Re: [Q] NSObject's poseAsClass - Replacement?
- From: Michael Ash <email@hidden>
- Date: Fri, 6 Mar 2009 00:03:35 -0500
On Thu, Mar 5, 2009 at 3:00 PM, Eric Gorr <email@hidden> wrote:
>
> On Mar 5, 2009, at 2:47 PM, Benjamin Stiglitz wrote:
>
>>> I have a need to use poseAsClass, but I see that it has been deprecated
>>> in 10.5 and won't be available for 64-bit applications.
>>>
>>> So, is there a replacement?
>>
>> WAYTTD: What are you trying to do? Maybe you don’t need to pose.
>
> Well, sadly, I am pretty sure I do...at least for now.
>
> Although, this bug is not quite confirmed yet, but I suspect I know what the
> problem is.
>
> I am working on a Carbon -> Cocoa conversion. In the carbon part, the cursor
> is being set to a 64x64 cursor constantly - via NSCursor set. The problem
> comes when I move the cursor over a cocoa view which I believe, by default,
> changing the cursor to what it wants - which I believe is a 32x32 cursor.
>
> So, in the constantly fighting over what the cursor should be, there is some
> weird cursor behavior...it flickers - moves quickly to a nearby location and
> then back again.
>
> I figure I could write my own NSCursor subclass, pose it as the normal
> NSCursor class and make sure that it is always trying to set cursor in the
> same way in every situation.
>
> Yes, I know, this isn't a good situation any way you slice it...but I need a
> quick fix and poseAsClass: seems to be the best option - assuming the bug is
> what I think it is.
Sounds to me like what you actually need is for your views to stop
fighting over the cursor. At most, a subclass of whatever Cocoa view
is screwing with your cursor might be called for. Posing as NSCursor
for this is like swatting a fly with a grenade.
Mike
_______________________________________________
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