• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSView+NSDrawer+nextKeyView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView+NSDrawer+nextKeyView


  • Subject: Re: NSView+NSDrawer+nextKeyView
  • From: Håkan Waara <email@hidden>
  • Date: Mon, 5 Jun 2006 22:55:26 +0200

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@hidden)
Help/Unsubscribe/Update your Subscription:
40bullet.com.br


This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40frontiernet.net


This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40frontiernet.net


This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >NSView+NSDrawer+nextKeyView (From: Neto <email@hidden>)
 >Re: NSView+NSDrawer+nextKeyView (From: Neto <email@hidden>)
 >Re: NSView+NSDrawer+nextKeyView (From: Lon Giese <email@hidden>)
 >Re: NSView+NSDrawer+nextKeyView (From: Lon Giese <email@hidden>)
 >Re: NSView+NSDrawer+nextKeyView (From: Neto <email@hidden>)

  • Prev by Date: Re: nsslider subclass not responding to mouseUp:
  • Next by Date: Weird Exception While Resizing NSWindow
  • Previous by thread: Re: NSView+NSDrawer+nextKeyView
  • Next by thread: Remember last saved file
  • Index(es):
    • Date
    • Thread