I've found another weird thing which might be related. I was passing
the date inside the dictionary as NSDate, and I've noticed that the
docs didn't list dates as allowed types for passing in the click
context, so now I changed it to be passed as an NSNumber wrapping a
NSTimeInterval since 1970. The error in the console didn't disappear,
but I've noticed a funny thing which causes my app to crash because it
wasn't expecting that:
- the callback set up to handle clicks on Growl notifications is
called *twice* after a single click on a notification
- the first time, the commit[date] field in the dictionary is passed
as NSNumber, but on the second call (which shouldn't happen at all)
that field is passed as NSString containing that number...

Here's the relevant code:

- (void) growlNotificationWasClicked: (id) clickContext {
  NSLog(@"clicked: %@", clickContext);
  id date = [[clickContext objectForKey: @"commit"] objectForKey:
@"date"];
  NSLog(@"date = %@ (%@)", [date description], NSStringFromClass([date
class]));
  return;

and here's what I'm getting:


2011-11-21 00:02:43.995 Gitifier[10993:307] clicked: {
    commit =     {
        authorEmail = "[email protected]";
        authorName = "User 1";
        date = 1321830159;
        gitHash = 6e1dee34b6bee75bb6db72c941a9cde15f6446ca;
        subject = commit1;
    };
    repository = "/Users/psionides/a";
}
2011-11-21 00:02:43.996 Gitifier[10993:307] date = 1321830159
(__NSCFNumber)
2011-11-21 00:02:43.998 Gitifier[10993:307] clicked: {
    commit =     {
        authorEmail = "[email protected]";
        authorName = "User 1";
        date = 1321830159;
        gitHash = 6e1dee34b6bee75bb6db72c941a9cde15f6446ca;
        subject = commit1;
    };
    repository = "/Users/psionides/a";
}
2011-11-21 00:02:43.999 Gitifier[10993:307] date = 1321830159
(__NSCFString)

-- 
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.

Reply via email to