Q: In release 2.0, I've designed a custom palette in InterfaceBuilder which contains a subclass of View called MyView. When I create a new application, load the palette and test it in Test Interface mode, everything looks fine. When I do a make on the application there are no errors. However, when I launch the application from the Workspace Manager it dies because the MyView object is not in the run module. What am I doing wrong? \
\i \
\i0 A: When you create a loadable palette in IB with a special class like MyView, you need to also distribute the code (in some form) for that class. This then needs to be linked into the application. There are three ways to do this:\
\
1) Distribute the
\f3 .m
\f2 and
\f3 .h
\f2 for the class.\
The user would then add these to the "[.hm] (class)" category of the project.\
\
\fi-260\li260 2) Distribute the
\f3 .o
\f2 and
\f3 .h
\f2 for the class.\
The user would then add the
\f3 .h
\f2 to the ".h (other)" category of his project. He would also add the
\f3 .o
\f2 to the "Other files" category of his project AND create a Makefile.preamble which contains the following line:\
\fi0\li0 \
\f3\fs24
\fs28 OTHER_OFILES = MyView.o
\fs24 \
\f2\fs28 \
<see Chapter 1 of DevTools "Putting Together" for more information>\
\
3) Distribute the
\f3 .h
\f2 and a
\f3 .a
\f2 which contains the class.\
\li320 The user would add the
\f3 .h
\f2 to the ".h (other)" category of his project. He would also add \
the
\f3 .a
\f2 to the "Other libs" category of his project. In this implementation the library should be placed either in the project folder or in /usr/lib.\
\li0 \
See also: The InterfaceBuilder 2.0 Release notes for more information on \
building and using custom palettes.\
\
The examples in /NextDeveloper/Examples/InterfaceBuilder.\