• 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: [Q] C++ object as an Notification observer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] C++ object as an Notification observer?


  • Subject: Re: [Q] C++ object as an Notification observer?
  • From: Ondra Cada <email@hidden>
  • Date: Wed, 3 May 2006 15:16:42 +0200

JongAm,

On 3.5.2006, at 8:23, JongAm Park wrote:

While porting, I would like to make a C++ class method receive keyboard event. Probably the easiest method is to add the C++ class as an observer to a notification center. However I strongly doubt to do so.
Is it possible? If not, is there any way to receive keyboard event from a C++ method?

The C++ "classes" and "methods" alas are not true classes and methods, and thus it is impossible to use them with Cocoa.


Though, you can use Objective C++ to write a glue code (which would, e.g., observe the notification being a real Objective C thing, and in the method it would call any C++ "method").
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc



_______________________________________________ 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: 
 >[Q] C++ object as an Notification observer? (From: JongAm Park <email@hidden>)

  • Prev by Date: Linker Trouble
  • Next by Date: Re: NSString intValue
  • Previous by thread: [Q] C++ object as an Notification observer?
  • Next by thread: Handling Exceptions
  • Index(es):
    • Date
    • Thread