• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A minimal InputManager bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A minimal InputManager bundle


  • Subject: Re: A minimal InputManager bundle
  • From: Kevin Yank <email@hidden>
  • Date: Thu, 12 Mar 2009 10:58:20 +1100

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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >A minimal InputManager bundle (From: Kevin Yank <email@hidden>)

  • Prev by Date: Re: Is cascading Nib Loading from -awakeFromNib permissible?
  • Next by Date: Re: Synthesized instance variables
  • Previous by thread: A minimal InputManager bundle
  • Next by thread: Notifications and timing
  • Index(es):
    • Date
    • Thread