Here's a dumb one: My intention was to use the source file GetMetaDataForFile.m in the MetaLinear.codeproj project. Instead, I left the project template's reference to GetMetaDataForFile.c (note the .c suffix) unchanged. The project would try compiling the .c file provided by Apple's importer-project template, and produce a warning that the getter function was not filled.
The sample code disk image that accompanies this site corrects the error.
Posted by: Fritz Anderson
| @ June 19, 2006 2:28:41 PM CDT ( ) |
As I mentioned earlier, Xcode's gcc no longer supports embedded functions (functions defined inside other functions). The earlier note corrected the problem in the printed code in chapter 23.
The sample code on the CD that accompanies Step into Xcode contains another instance of this error. The function in question begins at line 31 in PointStat.m beginning with Chapter_12/2 and all later versions.
Replace that function with a C macro:
#define DoesntImplement(aSelector) ((newDelegate != nil) && \
![newDelegate respondsToSelector: aSelector])
The sample-code disk image that accompanies this site reflects the change.
Posted by: Fritz Anderson
| @ June 19, 2006 2:14:20 PM CDT ( ) |
Section 5.2 ends with the sentence, "Now the process of building Linear will include a build, if necessary, of Linrg and will copy Linrg to Linear's Resources directory inside its bundle." This is incorrect. Making Linear dependent on Linrg will cause Linrg to be built in the process of building Linear, but it will not tell Xcode to copy the Linrg tool into Linear's application bundle.
A more-accurate end to section 5.2 would be
Now the process of building Linear will include a build, if necessary, of Linrg.
One last step: We don't want simply to build Linrg; we want the Linrg tool to be part of the Linear application's resources. To do this, find Linrg.xcodeproj in the Groups & Files list, and click on the disclosure triangle next to it. This will reveal the Linrg tool product. Drag this icon down to the Targets group, and hold Linrg over the group's icon. The group will open to reveal the target Linear. Drag Linrg over the Linear target, and keep holding it there. A list now opens of the tasks, or build phases, performed in building Linear. One of these phases is "Copy Bundle Resources," which is the phase that moves non-executable files into the application package.
Once again, hold Linrg over the Copy Bundle Resources phase; the phase will open up. Drag Linrg so it is just below the Copy Build Resources list item, then release it. Now Linrg is not just a file to be built in Linear's build process, but is marked for copying into the Linear application itself.
Posted by: Fritz Anderson
| @ June 19, 2006 1:58:13 PM CDT ( ) |
|
|