Hook to C++ class

Discussion in 'Mac Programming' started by SuperRunt, Nov 7, 2005.

  1. macrumors newbie

    Nov 7, 2005
    I have C++ classes that I would like to "activate" by clicking on a keyword or a button in an NSView or WebView. Can I set my C++ class as a delegate? If anyone has a tip on how to get my C++ code to respond it would be highly appreciated.

  2. macrumors 6502a


    Aug 22, 2003
    Yes and no. If you want to use that class as a delegate you would need to wrap it in Obj-C class. You can not send messages to C++ classes in Obj-C, but you can use c++ in Obj-c classes. You need to make sure you set your build settings to objc++.

Share This Page