Re: Bundles as plugins
Re: Bundles as plugins
- Subject: Re: Bundles as plugins
- From: David Newberry <email@hidden>
- Date: Sat, 2 Mar 2002 20:57:05 -0800
Hum...
Thanks to those who have replied so far. I'm afraid the closest I've come
to success, though, is verifying that NSRunAlertPanel will in fact work.
(Thanks for that suggestion though, it does give me hope.) So far, I haven'
t been able to get a window loaded from a nib file.
What I did is this: From PB, made a new Cocoa bundle. Removed "main.c".
Went into IB and created a new, empty nib file. Created a "PluginInterface"
class with a "Controller" outlet and a NSWindowControler subclass called
MyWindowController (creative name, I know). Initiated one of each class.
Linked my PluginInterface to my MyWindowController. Made a window and
linked to it from MyWindowController. Created files for my classes and
imported them into my project in PB. Imported the nib file to PB. Then, I
added a method to my PluginInterface interface [terminology?] called
TestMethod:. It's been through several versions, but it's basically this:
- (int)TestMethod:(id)sender
{
[Controller showWindow:self];
return 5;
}
I also tried lifting some code from the SimpleMultiWindow example project,
in case the nib file wasn't loaded, but that didn't work out for me
either. I may very well have been implementing it incorrectly, though. The
thing that confuses me most is that there are no errors or warnings... the
window simply doesn't open. (It does return 5 to the calling app properly,
though...)
(Oh yeah, I set the bundle's Main Class before building, too... but it I
hadn't then this wouldn't have worked at all, so maybe you could have
guessed that. In the course of testing, the bundle's Main Nib File also
got set to the nib file I had added to the project.)
That's where it stands... again, thanks for you help.
Peace,
-David Newberry
_______________________________________________
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.