Loadable bundle as a document window
Loadable bundle as a document window
- Subject: Loadable bundle as a document window
- From: Steve Israelson <email@hidden>
- Date: Wed, 16 Nov 2005 11:04:04 -0800
Ok, I have an interesting situation that I can not figure out.
I have read an Andrew Stone article on using loadable bundles to
encapsulate objects.
Since I want a plug-in extendable app, this seems the way to go.
What I have is this situation though:
My main document, when it loads its data file, can make one of a
variety of window types.
Each of these window types is in a loadable bundle.
What I am doing is in "- (BOOL)readFromURL:(NSURL *)absoluteURL
ofType:(NSString *)typeName error:(NSError **)outError;" I am
determining what type of window is appropriate for this document and
then loading the appropriate bundle.
This bundle's main class is a subclass of NSWindowController. Its
init method looks like this:
- (id)init;
{
[super initWithWindowNibName:@"MyCoolWindow"];
}
Now, back in the document class I call this:
[self addWindowController:[theController autorelease]];
The question is, is this the correct way to go about this?
I seem to have some oddities with the window not working correctly,
re-sizing etc. Though this may be due to how i configured it.
Also, if this loadable bundle uses classes / objects that are
defined / compiled in my main app, will this be ok, or do I need the
code for them compiled into the bundle too?
_______________________________________________
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