开发者

Problems implementing Growl

I am trying to include Growl support in an app, but it is crashing when setting the delegate. As per http://growl.info/documentation/developer/implementing-growl.php , I am just setting the delegate like so [GrowlApplicationBridge setGrowlDelegate:@""]; as I am only needing Growl for basic usage, but upon running it crashes.

Xcode shows the following warning on that line:

Semantic Issue: Incompatible pointer types sending 'NSString *' to parameter of type 'NSObject<GrowlApplicationBridgeDelegate> *'

Any ideas on how to resolve this?

Fixed: I set added to my header file and set the delegate开发者_StackOverflow to self

Fixed 2: It actually wasn't that, it was the version of growl sdk I was using having a bug in it, fixed with v1.2.2 of growl.


Don't set the delegate (leave out that line) and you should be fine.

If you need a delegate that you have to set it to an instance of a class that implements the protocol.


Cast it to an untyped object to eliminate the warning.

 [GrowlApplicationBridge setGrowlDelegate:(id)@""];


It was the version of growl sdk I was using having a bug in it, fixed with v1.2.2 of growl.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜