On Jan 10, 2015, at 11:42 , ecir hana <ecir.h...@gmail.com> wrote:
> 
> And that is where it stops working, no need to visit Neptune. The part of 
> custom view over the textview stops displaying the defined cursor, at shows 
> I-beam cursor instead.

Excellent! (Not that it fails, but that you have something specific to work on.)

Have you checked to see whether your custom view’s cursorUpdate: is called at 
all, when it doesn’t work? There’s a difference between not being sent the 
message, and being sent the message but having your cursor change made 
irrelevant by the other view changing the cursor afterwards.

> I have single one custom view and its tracking area covers the whole [self 
> bounds].

If you literally set the tracking area to self.bounds, that is not such a good 
idea, generally. The bounds might be different at different times. You should 
really use the option to track the visibleRect automatically.

The other thing you should be looking into:

If the text view uses NSTrackingArea (and my understanding is that it does so, 
but I don’t know for sure), then it shouldn’t be getting any cursorUpdate: 
messages *while the cursor is already inside its tracking area*. Therefore, 
there might be different behavior depending on whether the cursor enters:

— the text field tracking area first, then the custom tracking area deeper 
inside the text field area, or
— vice versa, or
— both tracking areas simultaneously, because the boundaries are in the same 
place

Note that the answer is potentially different for each of the 4 edges of the 
tracking area rect, and for each direction of movement (towards inside/towards 
outside).

BTW, if the text field is changing the cursor on mouseMoved: events, which is 
possible, then your attempts to control the cursor with cursorUpdate: seem 
doomed to failure.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to