Skip navigation.
 
mlRe: NSView+NSDrawer+nextKeyView
FROM : Håkan Waara
DATE : Mon Jun 05 22:55:26 2006

The reason is probably that NSViews by default do not accept first 
responder.

If you have some responder outside your view, you'll need to set that 
one's nextKeyView to be one of your widgets *inside* the NSView.

Or if you subclass the NSView, you can make it do the right thing by 
overriding these methods:

-(BOOL)acceptsFirstResponder;
-(BOOL)becomeFirstResponder;
-(BOOL)resignFirstResponder;

They are defined in NSResponder (which NSView inherits from). You can 
read more about this in the NSView documentation.

/Håkan

4 jun 2006 kl. 01.04 skrev Neto:

>
> Your suggestion of connecting the NSWindow initial First Responder 
> at least made the small "1" appears (I'm using layout-> show 
> keyboard check) on the NSTextField of the NSDrawer (NSView).
>
> But the loop still doesn't work at runtime...
>
> Can't understand why.
>
>
>
>
> On 03/06/2006, at 7:41 PM, Lon Giese wrote:
>

>>
>> meant to say initial first responder not first responder
>> In my version of OS the NSView has no initial first responder. 
>> Have you tried to connect the NSWindow' initial first responder 
>> outlet to the text field?
>>
>>
>> WooHoo the ultimate Mac App for 'The Sims 2' power users.
>> http://www.modthesims2.com/showthread.php?p=1239629
>> On Jun 3, 2006, at 3:21 PM, Lon Giese wrote:
>>

>>> In my version of OS the NSView has no first responder. Have you 
>>> tried to connect the NSWindow' first responder outlet to the text 
>>> field?
>>>
>>>
>>>
>>>
>>> WooHoo the ultimate Mac App for 'The Sims 2' power users.
>>> http://www.modthesims2.com/showthread.php?p=1239629
>>> On Jun 3, 2006, at 2:16 PM, Neto wrote:
>>>

>>>> well...sorry to repost...but I'm completely out of ideas.
>>>>
>>>> I set the keyboard loop of a NSView, but the NSView does not 
>>>> accept a NSTextField as its initial first responder, so the loop 
>>>> does not work at runtime...
>>>>
>>>> I don't know if that's the reason, but the NSView is connected 
>>>> to a NSDrawer as it contentView.
>>>>
>>>> any tips?
>>>>
>>>>
>>>> On 03/06/2006, at 2:28 AM, Neto wrote:
>>>>

>>>>> Does anyone could help a newbie to set up nextKeyView in NSView 
>>>>> of a NSDrawer?
>>>>>
>>>>> I have many NSTextField there...I read documentations, posts 
>>>>> and did everything as explained, but no matter what I do, it 
>>>>> does not work...
>>>>>
>>>>> Someone could point me to a step-by-step tutorial on this?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> neto
>>>>> _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Cocoa-dev mailing list      (<email_removed>)
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>> http://lists.apple.com/mailman/options/cocoa-dev/neto%
>>>>> 40bullet.com.br
>>>>>
>>>>> This email sent to <email_removed>

>>>>
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Cocoa-dev mailing list      (<email_removed>)
>>>> Help/Unsubscribe/Update your Subscription:
>>>> http://lists.apple.com/mailman/options/cocoa-dev/lgiese%
>>>> 40frontiernet.net
>>>>
>>>> This email sent to <email_removed>
>>>>

>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Cocoa-dev mailing list      (<email_removed>)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/cocoa-dev/lgiese%
>>> 40frontiernet.net
>>>
>>> This email sent to <email_removed>
>>>

>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Cocoa-dev mailing list      (<email_removed>)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>
>> This email sent to <email_removed>

>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>

Related mailsAuthorDate
mlNSView+NSDrawer+nextKeyView Neto Jun 3, 07:28
mlRe: NSView+NSDrawer+nextKeyView Neto Jun 3, 23:16
mlRe: NSView+NSDrawer+nextKeyView Lon Giese Jun 4, 00:21
mlRe: NSView+NSDrawer+nextKeyView Lon Giese Jun 4, 00:41
mlRe: NSView+NSDrawer+nextKeyView Neto Jun 4, 01:04
mlRe: NSView+NSDrawer+nextKeyView Håkan Waara Jun 5, 22:55