small medium large xlarge

Generic-user-small
13 Jun 2010, 15:35
aaron haas (2 posts)

I’m on an powerpc imac w/ 10.4.11 installed. The highest version of xcode i can use is 2.5. I’m trying to follow along but, having trouble because of the differences. I can’t find the interface builder library palette. Is this available on 2.5? In the MainMenu.xib I only have 4 icons(file owners, first responder, mainmenu, and window) compared to the 7 pictured on page 17, fig 2.4.

Generic-user-small
15 Jun 2010, 23:58
aaron haas (2 posts)

Bueller……………….Bueller ……………………Bueller…

Generic-user-small
16 Jun 2010, 10:58
Tim Isted (105 posts)

Sorry for not replying immediately to your first post, I’ve had to sort out a machine to install Tiger and the 2.5 developer tools as I didn’t have anything earlier than 3.0 installed anywhere.

From the point of view of the book, you shouldn’t have too many problems working with Xcode itself, but Interface Builder has changed dramatically. Many of the techniques I describe in the book were only introduced with Developer Tools 3.0, some 3.1.

Interface Builder 2.5 doesn’t have a library palette, as you say. Instead it has a tabbed palette, that looks like this: http://embr.it/BWt

You’ll need to find controls in the palette under the relevant tab. If you hover the mouse over a control, you should find that a tooltip appears telling you what the object is. You can then click and drag out the control as mentioned in the book.

Don’t worry about the fact that you only have four objects listed in @MainMenu.nib@ (interface files will be nibs rather than xibs). As far as I can remember, and from my testing today, these appear to be the objects that would be in Interface Builder 3.0/3.1. The screenshots in the book are from Interface Builder 3.2 - the template projects provided with Xcode 3.2 include additional class descriptions and objects, but the book doesn’t make use of these in order to make it possible for people to work in IB3.1.

The change that’s going to cause you the most difficulty is making @IBOutlet@ and @IBAction@ connections. Under IB2.5, you have to make the connection in the right direction for the particular type of connection. There’s no HUD window: * for an @IBOutlet@, you need to hold down the Control key and drag from the object that declares the @IBOutlet@ in its class description, e.g. the @NotifyingClass@ object, to the e.g. @NSTextView@ or @NSButton@ object. * for an @IBAction@, you need to hold down the Control key and drag from the object that triggers the action, e.g. an @NSButton@, to the object that handles the action, e.g. the @NotifyingClass@ object.

When you release the mouse, you’ll see this Connections inspector (I’ve added red boxes…): http://embr.it/BWu

Select the relevant action or outlet, and click the Connect button to make the connection.

You may also encounter problems with protocols, or methods not existing under earlier versions of the developer tools. If so, please ask here and I’ll look into a suitable alternative.

Good luck!

Generic-user-small
28 Mar 2011, 22:20
presto (2 posts)

I am having the same issue with xcode 2.5. I downloaded the tibmac-code.zip to try and run the first app. It will not run due to this error:

SDK package /Users…/code/YourFirstApp/TextApp/macosx10.6 does not exist

Any ideas on why this is not working?

Additionally, when I attempted to build the TextApp as written in the book, I am having difficulty with the following.

I have the following code written for the NotifyingClass.m file:

#import "NotifyingClass.h"


@implementation NotifyingClass
- (id)init;
{
	NSLog(@"Hello World! I'm a new NotifyingClass instance!");
	
	return self;
}
@end



When I run the file I do not see the "Hello World! I'm a new NotifyingClass instance!" displayed in the run log.  What am I missing here?  Thank you for your time,

-presto
Generic-user-small
29 Mar 2011, 10:31
Tim Isted (105 posts)

The error you get when trying to build the code is because the SDK “Software Development Kit” for Mac OS 10.6 that I used to create the zipped projects is not available for you. If you’re using Xcode 2.5, are you running on an older PPC machine?

You’ll need to change the build settings on the project to make it compile with what you have. I don’t have a copy of Xcode 2.5 that I can check right now, but I think it is similar to Xcode 3, which means you need to find a menu item with a name like “Edit Project Settings,” possibly e.g., Project > Edit Project Settings. You’ll need to find a Build setting (this may be under a Build tab) with a name like “Target SDK,” “Base SDK” or similar; change this to an option that looks like it’s available, e.g. “MacOSX10.4u.sdk.”

Once you’ve done that you may need to change the target architecture; and under Xcode 2.5 I can’t remember if this was done through the same Build settings list, or under a drop-down in the main project window (at top-left of the project window). If you’re not running on an Intel-based Mac, you’ll need to change the target architecture to PPC.

As for why the typed-in code doesn’t work, I’m really not sure. The way that I’ve asked you to implement the @init@ method for these early chapters is simply to demonstrate something, but it does not actually do the work the Cocoa framework expects it to do. These are only simple test projects in the early chapters, and this has always been fine under the OS X versions I’ve tested under, but I’ve not tried these projects under Xcode 2.5. I cannot see any reason why this should be a problem, though. Have you definitely added a blue-box instance of the @NotifyingClass@ object into the interface .nib file? And saved it?

Please let me know how you get on! Tim

Generic-user-small
06 Apr 2011, 20:08
presto (2 posts)

Thank you for the quick and full response Tim. I took about a week to continue going through the first half of the book with Xcode 2.5 on my MacBook. I could tell that I was spending way to much time searching for the equivalent steps as your book examples show, so I took this as the final straw for me to upgrade the operating system. I highly recommend that anyone else who is having this issue upgrade the operating system for a variety of reasons. As pertaining to this topic, I can now easily work through the book. The continual searching was really stunting my learning process and I can really tell that now that I have tried with both Xcode 2.5 and 3.2.

If you or anyone else would like to learn more about just how simple it is to upgrade your operating system, I have published an article available here about the process.: http://digitalknowledgebox.com/index.php?option=com_content&view=article&id=167

Thanks again, -Presto

not too sure about the formatting, so here is a small link http://tinyurl.com/3u769jo

You must be logged in to comment