title: Set delegate to an instance of my class?
body: <p>I have a c++/obj c set of files to create a sort of C++ wrapper for Growl (which is Obj C) however I am stuck on one part. I need to set a Growl Delegate to something inside my Obj C class so that the registration gets called.</p>
  
  <p>This is my .mm</p>
  
  <pre><code>#import "growlwrapper.h"
  
  @implementation GrowlWrapper
  - (NSDictionary *) registrationDictionaryForGrowl {
      return [NSDictionary dictionaryWithObjectsAndKeys:
              [NSArray arrayWithObject:@"Upload"], GROWL_NOTIFICATIONS_ALL,
              [NSArray arrayWithObject:@"Upload"], GROWL_NOTIFICATIONS_DEFAULT
              , nil];
  }
  @end
  
  void showGrowlMessage(std::string title, std::string desc) {
      std::cout &lt;&lt; "[Growl] showGrowlMessage() called." &lt;&lt; std::endl;
      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
      [GrowlApplicationBridge setGrowlDelegate: @""];
      [GrowlApplicationBridge
          notifyWithTitle: [NSString stringWithUTF8String:title.c_str()]
          description: [NSString stringWithUTF8String:desc.c_str()]
          notificationName: @"Upload"
          iconData: nil
          priority: 0
          isSticky: YES
          clickContext: nil
      ];
      [pool drain];
  }
  
  int main() {
      showGrowlMessage("Hello World!", "This is a test of the growl system");
      return 0;
  }
  </code></pre>
  
  <p>and my .h</p>
  
  <pre><code>#ifndef growlwrapper_h
  #define growlwrapper_h
  
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  #include &lt;Cocoa/Cocoa.h&gt;
  #include &lt;Growl/Growl.h&gt;
  
  using namespace std;
  
  void showGrowlMessage(std::string title, std::string desc);
  int main();
  
  #endif
  
  @interface GrowlWrapper : NSObject &lt;GrowlApplicationBridgeDelegate&gt;
  
  @end
  </code></pre>
  
  <p>now as you can see my <code>[GrowlApplicationBridge setGrowlDelegate: @""];</code> is being set to an empty string, I need to set it to something so that the <code>registrationDictionaryForGrowl</code> gets called, which is currently not being called.</p>
  
  <p>But I can't figure out how to do it. Any help?</p>