By which I mean: I'm working on a small application that receives
notifications from a set of plugins for various sources (web services,
iTunes, RSS feeds, whatever) and would like for each of those plugins
to be able to register its own set of notification names. Growl has a
monolithic, per-application registration process that usually involves
filling out a static file in the application's resources directory.
So, is it possible to register additional notification names later?
Can I defer registration until after all plugins are loaded, at least—
that is, would something like this work?
- (void)applicationDidFinishLaunching:(NSNotification *)notification
{
[self loadMessageSourcePlugins];
[GrowlApplicationBridge setGrowlDelegate:self];
}
- (NSDictionary *)registrationDictionaryForGrowl
{
NSMutableArray *notificationNames;
notificationNames = [NSMutableArray array];
for ( Class plugin in messageSourcePlugins )
[notificationNames
addObjectsFromArray:plugin.notificationNames];
return [NSDictionary dictionaryWithObjectsForKeys:
notificationNames, @"GROWL_NOTIFICATIONS_ALL",
notificationNames, @"GROWL_NOTIFICATIONS_DEFAULT"
nil];
}
--
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.