• 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: How to make a plugin?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make a plugin?


  • Subject: Re: How to make a plugin?
  • From: Chris Hanson <email@hidden>
  • Date: Thu, 26 Jul 2001 18:14:36 -0500

At 11:37 AM +0200 7/26/01, Georg Tuparev wrote:
I was doing this on NeXTstep. You can unload a class, but is a tricky
stuff. There should be no holes in the class stack. Did not tried it on
OSX though...

Unfortunately there's no support in NSBundle for unloading. I think there should be.

While class/bundle unloading might be "hard" it's not an unsolvable problem. You can always just declare a bundle unloadable if and only if (a) no classes will derive from any classes defined in the bundle, (b) no instances of a class defined in the bundle exist, and (c) the bundle does not declare any categories on classes external to the bundle. NSBundle could detect conditions (a) and (c) at bundle load time and mark the bundle as permanently loaded (and throw an exception if it receives -unload). Developers could probably be relied upon to do the right thing with respect to condition (b).

This would make it possible to build a component software architecture like OpenDoc rather simply on top of Cocoa. It can't be done optimally without unloading support because for instance you can't (say) have a compound document open and decide to upgrade one of your editor parts before using it. Without unloading you have to quit your document, upgrade your editor part, and re-launch your document.

-- Chris

--
Chris Hanson <email@hidden>
bDistributed.com: Making business distributed.
Personal email: <email@hidden>


  • Follow-Ups:
    • Re: How to make a plugin?
      • From: Stéphane Sudre <email@hidden>
    • Re: How to make a plugin?
      • From: Rob Rix <email@hidden>
References: 
 >Re: How to make a plugin? (From: Georg Tuparev <email@hidden>)

  • Prev by Date: Re: Discovering Openstep Tutorial (missing code)
  • Next by Date: Small, simple, cool IB tip you may not have run across...
  • Previous by thread: Re: How to make a plugin?
  • Next by thread: Re: How to make a plugin?
  • Index(es):
    • Date
    • Thread