Re: Drag-and-drop onto an NSTextField?
Re: Drag-and-drop onto an NSTextField?
- Subject: Re: Drag-and-drop onto an NSTextField?
- From: Sandor Szatmari via Cocoa-dev <email@hidden>
- Date: Sat, 1 Aug 2020 08:44:37 -0400
Thanks Graham!
Sandor
> On Aug 1, 2020, at 08:28, Graham Cox <email@hidden> wrote:
>
> You shouldn’t call -becomeFirstResponder yourself.
>
> Instead, call [self.window makeFirstResponder:self].
>
> That should properly switch the first responder, giving the previous
> responder the chance to refuse. Of course, that’s more obstructive if the
> previous responder DOES refuse, but that’s what they tell you to do (from the
> documentation on [NSReponder becomeFirstResponder]:
>
>> Use the NSWindow makeFirstResponder: method, not this method, to make an
>> object the first responder. Never invoke this method directly.
>
>
>
>
> —Graham
>
>
>
>> On 1 Aug 2020, at 10:16 am, Sandor Szatmari via Cocoa-dev
>> <email@hidden> wrote:
>>
>> I call…
>>
>> [self becomeFirstResponder]
>> [self setNeedsDisplay:YES]
>>
>> Then return the drag operation required.
>>
>
_______________________________________________
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