You can register at any point really. I would expect that you would want all of your plugins to provide a their dictionaries at one time, and to register all possible things at once.
What you'll probably want to be wary of is 2 plugins with the same registration information. i.e. you don't want the same listing for 2 plugins in the registration ticket. Some apps do not register until they actually need Growl, which may be a model you could take up. I'm not sure how they accomplish this, but that's here nor there. Chris On Wed, Aug 10, 2011 at 10:19 PM, Eris <[email protected]> wrote: > 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. > > -- 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.
