Answering my own question...

The behavior I was seeing appears to have been the result of installing the bundle in the user-specific /Users/user/Library/ InputManagers directory hierarchy. Leopard requires bundles to be installed in the system-wide /Library/InputManagers hierarchy in order to run.

I find it interesting that the effect of this restriction was to prevent my bundle from receiving application notifications. I would have expected the bundled not to be loaded at all!

--
Kevin Yank
http://www.kevinyank.com/

On 11/03/2009, at 10:20 PM, Kevin Yank wrote:

Hi there,

I am attempting to write a minimal InputManager bundle, to be auto- loaded by all qualifying Cocoa applications.

I have it partly working, but have run into a stumbling block.

Here is the implementation of my bundle's primary class:

@implementation PluginIM

+ (void) load
{
 [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(loadPlugin:) name:NSApplicationWillFinishLaunchingNotification
                                            object:nil];
 NSLog(@"Loaded PluginIM");
}

+ (void) loadPlugin:(NSNotification*)_notification
{
 NSLog(@"Application launch observed");
}

@end

My bundle compiles with no warnings or errors. Once I install it, I can see the "Loaded PluginIM" message appear in the system console whenever a Cocoa application is launched.

The problem is that I never see the "Application launch observed" message that should be generated in response to the NSApplicationWillFinishLaunchingNotification.

Any idea what I might be missing?

--
Kevin Yank
http://www.kevinyank.com/

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to