Problem with '(strong)' modifier


In the first exercise, when I enter the “@property (stop) NSString *label” it keeps giving me the error “expecting property attribute before ‘strong’”


Here is the entire code

[code]#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>

@interface Asset : NSObject {

NSString *label;
unsigned int resaleValue;

@property unsigned int resaleValue;
@property (strong) NSString *label;


The code you have there (the “strong” version, not the “stop” version) is correct and compiles in Xcode for me. Are you running Xcode 4.2? (The strong keyword was added with ARC, which requires Xcode 4.2.)


No I am running Xcode 3 something. I was not able to upgrade to Lion and Xcode 4 on my MacBook Pro


Oh. You may have some trouble with the rest of the book – it assumes that you are using Xcode 4.2.


Ooops. Me to. We’ve not upgraded our MacBook Pro because of the Quicken issue, so I’m stuck with XCode 3.X.X. Dang. :cry:

Well, if you were going to buy a computer purely to use for coding, would you buy the iMac, the 13" MacBook Pro, or the 13" MacBook Air? They’re basically all the same price. :astonished:

By the way, other than the version of XCode thing, I really have enjoyed your book. I read the Ted Isted book first. In retrospect, I wish that I’d read your book first and then read his. You both cover the same ground but cover it differently, but it didn’t all make sense to me until I started working through the challenges in your book. Kudos!!! :slight_smile:



Honestly, just for simple development, you should be able to get away with a Mac mini, even a used one. For larger code, a faster machine for compilation will be useful, but to get through the early stages of learning this stuff, it’s overkill.

Having said that, the SSD on the Macbook Air makes for a very, very, very pleasant experience. I can run a Parallels VM alongside my usual environment and experience no slowdowns; of course, the Windows VM chews up a huge chunk of my available disk space. Always trade-offs.


[quote=“macintux”]Having said that, the SSD on the Macbook Air makes for a very, very, very pleasant experience.
I understand your thinking on the Mini. I’ve thought that myself, but it’s SO much better to be able to “code on the go.” You get me to thinking that I want to go the Air route, but do you think it’s reasonable to use a 13.3 screen to develop for the iPad? And the storage space on the Air is tiny in comparison to other computers these days. I don’t know. Maybe the best choice is the bottom end 15" MacBook Pro, which still gives you a 500Gb hard drive and 4Gb ram for the same price as the 13.3 Air. Uggh.



Grab a used Mini now, and rumor has it we can expect a 15" Air next spring.


Santa brought a 13" MacBook Pro. The screen is a little tight for Xcode, but it works, and I can hook it up to an external monitor I have when sitting at the desk. Woot!


Santa, eh? There’s a frood who really knows where his towel is. Congrats, and enjoy your new toy!