• 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
How to set keyboard focus to in NSView in Carbon Application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to set keyboard focus to in NSView in Carbon Application?


  • Subject: How to set keyboard focus to in NSView in Carbon Application?
  • From: xue zhiy <email@hidden>
  • Date: Wed, 29 Apr 2009 17:14:31 +0800

I create a custom NSView in my Carbon Application. For embed it into Carbon window, i create a HICocoaview for it.

My question is:  How to set keyboard focus to the NSView?

I can get the focus after i mouse click the NSView. I try to set focus by SetKeyboardFocus( windowRef, pHICocoaView, kControlFocusNextPart ). But it doesn't work.


HIViewRef pHICocoaView; NSView* pView = [[MyCustomNSView alloc] initWith: this]; HICocoaViewCreate(pView, 0, &pHICocoaView);

HIViewAddSubview(pContentView, mpHICocoaView);


Thanks for you help.

Sincerely ,
Bruce




_______________________________________________

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


  • Prev by Date: Re: iphone SDK session duration
  • Next by Date: Re: Getting Display Names
  • Previous by thread: Re: It doesn't work without the NSLog()... Why?
  • Next by thread: Localizing Without Xcode UI
  • Index(es):
    • Date
    • Thread