Re: [SOLVED] Undocumented NSTextMovment for space in NSTextView's -insertCompletion:...
Re: [SOLVED] Undocumented NSTextMovment for space in NSTextView's -insertCompletion:...
- Subject: Re: [SOLVED] Undocumented NSTextMovment for space in NSTextView's -insertCompletion:...
- From: Keith Blount <email@hidden>
- Date: Fri, 5 Dec 2008 15:52:53 -0800 (PST)
D'oh! You are absolutely correct of course. Sorry about that. I'll amend my code so that it only accepts return or tab movement to accept completions when they appear automatically, as that will be more consistent.
Many thanks for putting me right, much appreciated.
All the best,
Keith
--- On Fri, 12/5/08, Andrew Farmer <email@hidden> wrote:
> From: Andrew Farmer <email@hidden>
> Subject: Re: Undocumented NSTextMovment for space in NSTextView's -insertCompletion:...
> To: email@hidden
> Cc: email@hidden
> Date: Friday, December 5, 2008, 10:18 PM
> On 05 Dec 08, at 11:25, Keith Blount wrote:
> > No NSSpaceTextMovement is defined, so it seems
> reasonable to expect this to be covered by "other text
> movement". However, it turns out that this is not the
> case. Testing shows that if you hit the space key, the
> "movement" parameter of -insertCompletion:... gets
> passed in with a value of 20. So it seems that there is at
> least one other, undeclared, value for NSTextMovement, even
> though the docs for NSText state that the above are the only
> "possible values".
>
> 20 = 0x14, which is NSRightTextMovement.
_______________________________________________
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