Grief with porting IB palettes to plugins
Grief with porting IB palettes to plugins
- Subject: Grief with porting IB palettes to plugins
- From: Rainer Brockerhoff <email@hidden>
- Date: Thu, 1 Nov 2007 21:33:23 -0200
At 16:11 -0700 01/11/2007, email@hidden wrote:
>From: Ricky Sharp <email@hidden>
>Date: Thu, 1 Nov 2007 17:51:30 -0500
>Message-ID: <email@hidden>
>
>I unfortunately assumed that porting my IB palettes would be fairly straightforward. I just cannot get anything to work in IB's simulator.
>
>All my plugins suffer the same fate as the ClockControlPalette sample. I can drag items from the library over to say a window.
>Running will always crash the simulator and in the console I get the same report:
>
>2007-11-01 17:44:45.457 IBCocoaSimulator[6464:10b] An uncaught exception was raised
>2007-11-01 17:44:45.458 IBCocoaSimulator[6464:10b] *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (ClockControl)
>11/1/07 5:44:45 PM IBCocoaSimulator[6464] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (ClockControl)'
I ran into that, too.
The thing is, the new simulator is a separate app, and it expects your class to be available in a framework; static-linking it into the plugin no longer works.
The Xcode template apparently expects you to build your class framework to a fixed absolute location (like /Library/Frameworks), and then include the ibplugin within the framework's resource folder. And apparently you should distribute it that way, too! But then, it's not practical for inclusion into an app. Beats me why they decided to do it that way...
I filed a bug disagreeing with that. rdar://4704698/ and it was closed with the remarks:
>Interface Builder v3.0 will automatically find plugins which are *resources* of a required framework for a project. If you create an IB plugin for a framework, you can install the .ibplugin in the resources for said framework: when a NIB file is opened from within Xcode, IB will pull the list of frameworks for the project, and then search them all for plugins which are not yet loaded.
>If you would like to have your plugin loaded, please install it inside of the framework it is exposing in IB.
Anyway. Since I want to ship my ibplugin separately from (and outside of) my framework, I'm building the framework inside the plugin, instead of the oterh way around, and for now it works OK.
HTH,
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden