Re: Embedding a Framework within a Framework
Re: Embedding a Framework within a Framework
- Subject: Re: Embedding a Framework within a Framework
- From: Robert Goldsmith <email@hidden>
- Date: Sun, 19 Mar 2006 14:03:22 +0000
A framework I'm writing requires a custom framework, so I was
thinking about embedding it within the new framework. Similar to
embedding a framework within an app...
I've embedded a framework within an app in the past, but the same
process doesn't seem to work with frameworks.
I don't know whether this @loader_path property on the embedded
framework makes things easier in Tiger but, before tiger, there were
serious problems with loading a framework into, for instance, a
plugin. This is because the 'base' path was always that of the parent
app, not the plugin. To solve this, I worked out a work-around which
is documented here:
http://www.far-blue.co.uk/hacks/plugin-frameworks.html
In essence, it manually loads the framework by hand using NSBundle.
This works fine for the methods but you loose access to any global
consts you may have defined. This trick is in use in a number of GPG
plugins such as GPGMail and ABKey and is compatible at least as far
back as 10.2.
I suspect, if all else fails, you can use the same trick for your
private framework :)
Robert
---
GnuPG public key:
http://www.Far-Blue.co.uk
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden