• 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: Bundle for Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bundle for Mail


  • Subject: Re: Bundle for Mail
  • From: Simon Stapleton <email@hidden>
  • Date: Sun, 14 Dec 2003 10:10:31 +0100

Date: Sun, 14 Dec 2003 03:18:47 +0000
From: email@hidden
Subject: Bundle for Mail

I know that it is necessary to enable bundles on Mail but:

Is it necessary to register a bundle so that Mail can use the Bundle?
([self registerBundle])

I can't remember, but class-dumping Mail.app reveals that class MVMailBundle indeed has a +registerBundle selector. I suspect you should be calling this somewhere (probably in your class' +load or +initialize). The source for Stephane Corthesey's GPGMail should make things more clear.

By the way, does Mail have any kind of protocol that the Bundle has to
implement, so that Mail can run the Bundle?

No. Your bundle's main class should be a subclass of MVMailBundle. Use Steve Nygard's class-dump to generate a header file (`class-dump -CMailBundle /Applications/Mail.app/Contents/MacOS/Mail > MVMailBundle.h` should do it).

Of course, this may only be valid for the 10.2.8 Mail.app, which is what I have installed - Apple can and probably will change the interface for bundle loading between releases, or even remove it entirely. You need to understand that you will be using an unsupported, unstable, non-public interface to the application. Use of this may cause VERY BAD THINGS (tm) to happen to Mail.app, potentially all your mailboxes, and even data in linked apps (AddressBook springs to mind). I'd suggest that testing should probably be carried out using a non-critical account (specifically one that doesn't contain all your mail). Test carefully. Test thoroughly.

Having written loadable bundles for ProjectBuilder, I can say that, although doing this is cool, it is _very_ hard to do without affecting the app adversely. Think very carefully before you decide a loadable bundle is the way to go. You may find that it's easier to do something standalone. The potential fluidity of the undocumented interfaces you're about to use mean, at the very least, a support nightmare. Standalone is likely to be easier in the long run.

If you decide to go for the loadable bundle approach, I would humbly suggest that you read Stephane's source code. Repeatedly. Until you understand what it's doing. Then start coding.

Hope that helps.

Simon

--
PGP Key Id : 0x50D0698D
--
Eagles may soar, but weasels don't get sucked into jet engines.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: NSNumberFormatter in Panther
  • Next by Date: Re: [BUG?] NSOutlineView's -rowForItem does *not* work
  • Previous by thread: Bundle for Mail
  • Next by thread: lines in bezierpath look fuzzy
  • Index(es):
    • Date
    • Thread