Hi there,
I just stumbled over this notice on <http://growl.info/documentation/
developer/implementing-growl.php?lang=cocoa>
Bug note: As of 1.1, the Growl Application Bridge requires a delegate
to be set before you can use it—even if the delegate does not
implement any delegate methods. As a workaround, use
[GrowlApplicationBridge setGrowlDelegate:@""] to satisfy it.
Since this bothered me, I fixed it. Here's the patch:
[EMAIL PROTECTED] ~/Desktop/growl % hg diff
diff -r f01fda50f784 Framework/Source/GrowlApplicationBridge.m
--- a/Framework/Source/GrowlApplicationBridge.m Wed Aug 13 02:48:07
2008 -0700
+++ b/Framework/Source/GrowlApplicationBridge.m Sun Aug 31 16:27:36
2008 +0200
@@ -115,6 +115,14 @@
#pragma mark -
@implementation GrowlApplicationBridge
+
++ (void) initialize
+{
+ if ([GrowlApplicationBridge class] != self)
+ return; // only once
+
+ [self setGrowlDelegate:nil];
+}
+ (void) setGrowlDelegate:(NSObject<GrowlApplicationBridgeDelegate>
*)inDelegate {
NSDistributedNotificationCenter *NSDNC =
[NSDistributedNotificationCenter defaultCenter];
It fixes the bug, by calling -setGrowlDelegate: method once, before
the class receives it's first message (by using +initialize).
This works, because -setGrowlDelegate: also runs some initialization
code which is triggered this way.
This of course is not the best fix - the best fix would be to factor
that initialization code out of -setGrowlDelegate: - but it'l do. And
it also preserves the behaviour of -setGrowlDelegate: so other
developers depending on it can rely on it still being here.
Well, thats it, please include it and greetings,
Martin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Growl Discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/growldiscuss?hl=en
-~----------~----~----~----~------~----~------~--~---