<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.8.0-dev (info@mypapit.net)" -->
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
    <title>forums.bignerdranch.com</title>
    <subtitle>Books written by Big Nerd Ranch</subtitle>
    <link rel="self" type="application/atom+xml" href="http://forums.bignerdranch.com/smartfeed.php?feed_type=ATOM1.0&amp;limit=1_DAY&amp;sort_by=standard&amp;feed_style=HTML&amp;" />
    <id>http://forums.bignerdranch.com/smartfeed.php?feed_type=ATOM1.0&amp;limit=1_DAY&amp;sort_by=standard&amp;feed_style=HTML&amp;</id>
    <updated>2012-05-16T21:39:17+00:00</updated>
    <generator>FeedCreator 1.8.0-dev (info@mypapit.net)</generator>
    <entry>
        <title>10. Archiving :: Re: App Not Saving as .rsmn :: Reply by davegg</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=182&amp;t=3331&amp;p=10632#p10632"/>
        <published>2012-05-16T00:13:33+00:00</published>
        <updated>2012-05-16T00:13:33+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=182&amp;t=3331&amp;p=10632#p10632</id>
        <author>
            <name>davegg</name>
        </author>
        <category term="10. Archiving" />
        <content type="html"><![CDATA[I also went from not working to working with turpinm's fix.  Thanks!]]></content>
        <summary type="html"><![CDATA[I also went from not working to working with turpinm's fix.  Thanks!]]></summary>
    </entry>
    <entry>
        <title>General Book Discussion :: Solutions for Bronze, Silver, Gold challenges :: Author ricste</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=214&amp;t=4378&amp;p=10629#p10629"/>
        <published>2012-05-15T22:37:51+00:00</published>
        <updated>2012-05-15T22:37:51+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=214&amp;t=4378&amp;p=10629#p10629</id>
        <author>
            <name>ricste</name>
        </author>
        <category term="General Book Discussion" />
        <content type="html"><![CDATA[The ZIP file on the bignerdranch.com site, iOSProgramming3ed.zip, doesn't seem to have sample solutions for the bronze, silver, and gold challenges.  Is this code available elsewhere?]]></content>
        <summary type="html"><![CDATA[The ZIP file on the bignerdranch.com site, iOSProgramming3ed.zip, doesn't seem to have sample solutions for the bronze, silver, and gold challenges.  Is this code available elsewhere?]]></summary>
    </entry>
    <entry>
        <title>2. Objective-C :: Use of Undeclared Identifier &quot;p&quot; :: Author bgordon999</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=213&amp;t=4377&amp;p=10628#p10628"/>
        <published>2012-05-15T21:44:38+00:00</published>
        <updated>2012-05-15T21:44:38+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=213&amp;t=4377&amp;p=10628#p10628</id>
        <author>
            <name>bgordon999</name>
        </author>
        <category term="2. Objective-C" />
        <content type="html"><![CDATA[#import &lt;Foundation/Foundation.h&gt;<br /><br />int main(int argc, const char * argv[])<br />{<br /><br />    @autoreleasepool {<br />        @autoreleasepool {<br />            //Create a mutable array object,store it's address in items variable<br />            NSMutableArray *items = [[NSMutableArray alloc] init];<br />            <br />            //Send message to addObjec:to the NSMutable Array pointed to<br />            // By the variable items,passing  a string each time.<br />            [items addObject:@&quot;One&quot;];<br />            [items addObject:@&quot;Two&quot;];<br />            [items addObject:@&quot;three&quot;];<br />            <br />            //Send another message,insertObject:at index:'to that same array object<br />            [items insertObject:@&quot;Zero&quot; atIndex:0];<br />            <br />            //For every item in the array as determined by sending count to items<br />            for (int i =0; i&lt;[items count];i++) {<br />                //We get the ith object from the array and pass it as an argument to<br />                <br />                //NSLog, which implicitly sends the description message to that object<br />                NSLog(@&quot;%@&quot;,[items objectAtIndex:i]);<br />            }<br />            BNRItem *p = [[BNRItem alloc] init];<br />            //This creates a new NSString,&quot;Read Sofaa and gives it to the BNRItem<br />            [p setItemName:@&quot;Red Sofa&quot;];                                                                 undeclared Identifier &quot;p&quot;<br />            //This creates a NSString,&quot;A1B2C&quot; and gives it to The BNRItem                 <br />            [p setSeriallNumber:@&quot;A1B2C&quot;];                                                           undeclared Identifier &quot;p&quot;<br />            //We Need To send the value100 to be used  as the caleInDollarsof this BNRItem<br />            [p setValueInDollars:100];                                                                          undeclared Identifier &quot;p&quot;<br />            <br />            //Remmeber, an NSSlog with %@ as the tokken will print the description of the corresponding argument<br />            NSLog(@&quot;%@&quot;,p);                           undeclared Identifier &quot;p&quot;<br />            <br />            items = nil;      <br /><br /><br /><br /><br /><br /><br />import &quot;BNRItem.h&quot;                               Unknown type name Import<br />       <br />    @implementation BNRItem<br /><br />- (void)setItemName:(NSString *)str<br />{<br />    itemName = str;<br />}<br /><br />- (NSString *)itemName<br />{<br />    return itemName;<br />}<br /><br />- (void)setSerialNumber:(NSString *)str<br />{<br />    serialNumber = str;<br />}<br /><br />- (NSString *)serialNumber<br />{<br />    return serialNumber;<br />}<br /><br />- (void)setValueInDollars:(int)i<br />{<br />    valueInDollars = i;   <br />}<br /><br />- (int)valueInDollars<br />{<br />    return valueInDollars;<br />}<br /><br />- (NSDate *)dateCreated<br />{<br />    return dateCreated;<br />}<br /><br />@end<br />            <br />        }<br />        return 0;<br />       <br />                <br />    }<br />    return 0;<br /><br /><br /><br />}<br />I have not clue how to fix this. I have created new projects from scratch. I have saved it in a word processor and copied and pasted.I have rewritten the code several times. I have checked the forum for it. There is a forum that has a similar problem. I used that and try the new project. still no luck. If any one could help I would appreciated it.]]></content>
        <summary type="html"><![CDATA[#import &lt;Foundation/Foundation.h&gt;<br /><br />int main(int argc, const char * argv[])<br />{<br /><br />    @autoreleasepool {<br />        @autoreleasepool {<br />            //Create a mutable array object,store it's address in items variable<br />            NSMutableArray *items = [[NSMutableArray alloc] init];<br />            <br />            //Send message to addObjec:to the NSMutable Array pointed to<br />            // By the variable items,passing  a string each time.<br />            [items addObject:@&quot;One&quot;];<br />            [items addObject:@&quot;Two&quot;];<br />            [items addObject:@&quot;three&quot;];<br />            <br />            //Send another message,insertObject:at index:'to that same array object<br />            [items insertObject:@&quot;Zero&quot; atIndex:0];<br />            <br />            //For every item in the array as determined by sending count to items<br />            for (int i =0; i&lt;[items count];i++) {<br />                //We get the ith object from the array and pass it as an argument to<br />                <br />                //NSLog, which implicitly sends the description message to that object<br />                NSLog(@&quot;%@&quot;,[items objectAtIndex:i]);<br />            }<br />            BNRItem *p = [[BNRItem alloc] init];<br />            //This creates a new NSString,&quot;Read Sofaa and gives it to the BNRItem<br />            [p setItemName:@&quot;Red Sofa&quot;];                                                                 undeclared Identifier &quot;p&quot;<br />            //This creates a NSString,&quot;A1B2C&quot; and gives it to The BNRItem                 <br />            [p setSeriallNumber:@&quot;A1B2C&quot;];                                                           undeclared Identifier &quot;p&quot;<br />            //We Need To send the value100 to be used  as the caleInDollarsof this BNRItem<br />            [p setValueInDollars:100];                                                                          undeclared Identifier &quot;p&quot;<br />            <br />            //Remmeber, an NSSlog with %@ as the tokken will print the description of the corresponding argument<br />            NSLog(@&quot;%@&quot;,p);                           undeclared Identifier &quot;p&quot;<br />            <br />            items = nil;      <br /><br /><br /><br /><br /><br /><br />import &quot;BNRItem.h&quot;                               Unknown type name Import<br />       <br />    @implementation BNRItem<br /><br />- (void)setItemName:(NSString *)str<br />{<br />    itemName = str;<br />}<br /><br />- (NSString *)itemName<br />{<br />    return itemName;<br />}<br /><br />- (void)setSerialNumber:(NSString *)str<br />{<br />    serialNumber = str;<br />}<br /><br />- (NSString *)serialNumber<br />{<br />    return serialNumber;<br />}<br /><br />- (void)setValueInDollars:(int)i<br />{<br />    valueInDollars = i;   <br />}<br /><br />- (int)valueInDollars<br />{<br />    return valueInDollars;<br />}<br /><br />- (NSDate *)dateCreated<br />{<br />    return dateCreated;<br />}<br /><br />@end<br />            <br />        }<br />        return 0;<br />       <br />                <br />    }<br />    return 0;<br /><br /><br /><br />}<br />I have not clue how to fix this. I have created new projects from scratch. I have saved it in a word processor and copied and pasted.I have rewritten the code several times. I have checked the forum for it. There is a forum that has a similar problem. I used that and try the new project. still no luck. If any one could help I would appreciated it.]]></summary>
    </entry>
    <entry>
        <title>2. Objective-C :: Re: Use of Undeclared Identifier &quot;p&quot; :: Reply by JoeConway</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=213&amp;t=4377&amp;p=10653#p10653"/>
        <published>2012-05-16T17:53:57+00:00</published>
        <updated>2012-05-16T17:53:57+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=213&amp;t=4377&amp;p=10653#p10653</id>
        <author>
            <name>JoeConway</name>
        </author>
        <category term="2. Objective-C" />
        <content type="html"><![CDATA[There are a lot of typos and the code looks to be in the wrong order. Try checking your code against the full solution set, which is located here: <a href="http://www.bignerdranch.com/solutions/iOSProgramming3ed.zip" class="postlink">http://www.bignerdranch.com/solutions/iOSProgramming3ed.zip</a>]]></content>
        <summary type="html"><![CDATA[There are a lot of typos and the code looks to be in the wrong order. Try checking your code against the full solution set, which is located here: <a href="http://www.bignerdranch.com/solutions/iOSProgramming3ed.zip" class="postlink">http://www.bignerdranch.com/solutions/iOSProgramming3ed.zip</a>]]></summary>
    </entry>
    <entry>
        <title>2. Objective-C :: Re: Use of Undeclared Identifier &quot;p&quot; :: Reply by bgordon999</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=213&amp;t=4377&amp;p=10667#p10667"/>
        <published>2012-05-16T21:04:47+00:00</published>
        <updated>2012-05-16T21:04:47+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=213&amp;t=4377&amp;p=10667#p10667</id>
        <author>
            <name>bgordon999</name>
        </author>
        <category term="2. Objective-C" />
        <content type="html"><![CDATA[Thanks,I should have checked those folders.]]></content>
        <summary type="html"><![CDATA[Thanks,I should have checked those folders.]]></summary>
    </entry>
    <entry>
        <title>3. Managing Memory with ARC :: use of undeclared identifier 'date created' :: Author godimago</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=215&amp;t=4379&amp;p=10630#p10630"/>
        <published>2012-05-15T23:38:29+00:00</published>
        <updated>2012-05-15T23:38:29+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=215&amp;t=4379&amp;p=10630#p10630</id>
        <author>
            <name>godimago</name>
        </author>
        <category term="3. Managing Memory with ARC" />
        <content type="html"><![CDATA[In 3rd chapter you advise to delete explicit declaration of instance variables(instead we added properties), but after this built was failed as compiler couldn't find declaration of dateCreated variable in this part of code:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>- (id)initWithItemName:(NSString *)name<br />&nbsp; &nbsp; &nbsp; &nbsp; valueInDollars:(int)value <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; serialNumber:(NSString *)sNumber<br />{<br />&nbsp; &nbsp; self = &#91;super init&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; if (self) {<br />&nbsp; &nbsp; &#91;self setItemName:name&#93;;<br />&nbsp; &nbsp; &#91;self setSerialNumber:sNumber&#93;;<br />&nbsp; &nbsp; &#91;self setValueInDollars:value&#93;;<br />&nbsp; &#91;b&#93;&nbsp; dateCreated = &#91;&#91;NSDate alloc&#93; init&#93;;&#91;/b&#93;&nbsp; &nbsp;// use of undeclared identifier 'date created'&nbsp; (!)<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; return self;<br />&nbsp; &nbsp; <br />}<br /></code></dd></dl>  <br />In spite of I added property for dateCreated and synthesized it<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>@property (nonatomic, readonly, strong) NSDate *dateCreated;</code></dd></dl><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>@synthesize serialNumber, valueInDollars, &#91;b&#93;dateCreated&#91;/b&#93;, containedItem, container;</code></dd></dl><br />So I had to declare it explicity in BNRItem.h as it was before and then built was succeeded. Can you tell me what I did wrong? Thank you in advance!]]></content>
        <summary type="html"><![CDATA[In 3rd chapter you advise to delete explicit declaration of instance variables(instead we added properties), but after this built was failed as compiler couldn't find declaration of dateCreated variable in this part of code:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>- (id)initWithItemName:(NSString *)name<br />&nbsp; &nbsp; &nbsp; &nbsp; valueInDollars:(int)value <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; serialNumber:(NSString *)sNumber<br />{<br />&nbsp; &nbsp; self = &#91;super init&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; if (self) {<br />&nbsp; &nbsp; &#91;self setItemName:name&#93;;<br />&nbsp; &nbsp; &#91;self setSerialNumber:sNumber&#93;;<br />&nbsp; &nbsp; &#91;self setValueInDollars:value&#93;;<br />&nbsp; &#91;b&#93;&nbsp; dateCreated = &#91;&#91;NSDate alloc&#93; init&#93;;&#91;/b&#93;&nbsp; &nbsp;// use of undeclared identifier 'date created'&nbsp; (!)<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; return self;<br />&nbsp; &nbsp; <br />}<br /></code></dd></dl>  <br />In spite of I added property for dateCreated and synthesized it<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>@property (nonatomic, readonly, strong) NSDate *dateCreated;</code></dd></dl><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>@synthesize serialNumber, valueInDollars, &#91;b&#93;dateCreated&#91;/b&#93;, containedItem, container;</code></dd></dl><br />So I had to declare it explicity in BNRItem.h as it was before and then built was succeeded. Can you tell me what I did wrong? Thank you in advance!]]></summary>
    </entry>
    <entry>
        <title>3. Managing Memory with ARC :: Re: use of undeclared identifier 'date created' :: Reply by JoeConway</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=215&amp;t=4379&amp;p=10654#p10654"/>
        <published>2012-05-16T17:55:04+00:00</published>
        <updated>2012-05-16T17:55:04+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=215&amp;t=4379&amp;p=10654#p10654</id>
        <author>
            <name>JoeConway</name>
        </author>
        <category term="3. Managing Memory with ARC" />
        <content type="html"><![CDATA[Hm, can you post the entire .h and .m files exactly from your project?]]></content>
        <summary type="html"><![CDATA[Hm, can you post the entire .h and .m files exactly from your project?]]></summary>
    </entry>
    <entry>
        <title>3. Managing Memory with ARC :: Re: use of undeclared identifier 'date created' :: Reply by godimago</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=215&amp;t=4379&amp;p=10666#p10666"/>
        <published>2012-05-16T20:58:46+00:00</published>
        <updated>2012-05-16T20:58:46+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=215&amp;t=4379&amp;p=10666#p10666</id>
        <author>
            <name>godimago</name>
        </author>
        <category term="3. Managing Memory with ARC" />
        <content type="html"><![CDATA[of course!<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>//<br /><br />#import &lt;Foundation/Foundation.h&gt;<br /><br />@interface BNRItem : NSObject<br />{<br />&nbsp; &nbsp; NSDate *dateCreated;<br />}<br /><br />// class method<br />+ (id)randomItem;<br /><br />// designated initializer<br />- (id)initWithItemName:(NSString *)name<br />&nbsp; &nbsp; &nbsp; &nbsp; valueInDollars:(int)value<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; serialNumber:(NSString *)sNumber;<br /><br />//&nbsp; accessors<br />@property (nonatomic, strong) BNRItem *containedItem;<br />@property (nonatomic, weak) BNRItem *container;<br /><br />@property (nonatomic, copy) NSString *itemName;<br />@property (nonatomic, copy) NSString *serialNumber;<br />@property (nonatomic) int valueInDollars;<br />@property (nonatomic, readonly, strong) NSDate *dateCreated;<br /><br /><br /><br /><br /><br />@end<br /></code></dd></dl> <br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>//<br /><br />#import &quot;BNRItem.h&quot;<br /><br />@implementation BNRItem<br /><br />+(id)randomItem<br />{<br />&nbsp; &nbsp; // create an array with three adjectives<br />&nbsp; &nbsp; NSArray *randomAdjectiveList = &#91;NSArray arrayWithObjects:@&quot;Fluffy&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @&quot;Rusty&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @&quot;Shiny&quot;, nil&#93;;<br />&nbsp; &nbsp; // create an array with three nouns<br />&nbsp; &nbsp; NSArray *randomNounList = &#91;NSArray arrayWithObjects:@&quot;Bear&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@&quot;Spork&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@&quot;Mac&quot;, nil&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; NSInteger adjectiveIndex = rand() % &#91;randomAdjectiveList count&#93;;<br />&nbsp; &nbsp; NSInteger nounIndex = rand() % &#91;randomNounList count&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; NSString *randomName = &#91;NSString stringWithFormat:@&quot;%@ %@&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;randomAdjectiveList objectAtIndex:adjectiveIndex&#93;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;randomNounList objectAtIndex:nounIndex&#93;&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; int randomValue = rand() % 100;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; NSString *randomSerialNumber = &#91;NSString stringWithFormat:@&quot;%c%c%c%c%c&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0' + rand() % 10,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'A' + rand() %26,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0' + rand() % 10,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'A' + rand() %26,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0' + rand() % 10&#93;;<br />&nbsp; &nbsp; BNRItem *newItem = &#91;&#91;self alloc&#93; initWithItemName:randomName<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;valueInDollars:randomValue <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;serialNumber:randomSerialNumber&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; return newItem;<br />}<br /><br />// designated initializer<br />- (id)initWithItemName:(NSString *)name<br />&nbsp; &nbsp; &nbsp; &nbsp; valueInDollars:(int)value <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; serialNumber:(NSString *)sNumber<br />{<br />&nbsp; &nbsp; self = &#91;super init&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; if (self) {<br />&nbsp; &nbsp; &#91;self setItemName:name&#93;;<br />&nbsp; &nbsp; &#91;self setSerialNumber:sNumber&#93;;<br />&nbsp; &nbsp; &#91;self setValueInDollars:value&#93;;<br />&nbsp; &nbsp; dateCreated = &#91;&#91;NSDate alloc&#93; init&#93;;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; return self;<br />&nbsp; &nbsp; <br />}<br /><br />// overriding superclass init method<br />- (id)init<br />{<br />&nbsp; &nbsp; return &#91;self initWithItemName:@&quot;Item&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;valueInDollars:0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;serialNumber:@&quot;&quot;&#93;;<br />}<br /><br /><br />// accessors<br />@synthesize itemName;<br />@synthesize serialNumber, valueInDollars, dateCreated, containedItem, container;<br /><br />- (void)setContainedItem:(BNRItem *)i<br />{<br />&nbsp; &nbsp; containedItem = i;<br />&nbsp; &nbsp; &#91;i setContainer:self&#93;;<br />}<br /><br /><br /><br /><br /><br />// overriding superclass methods descriprion and dealloc<br />- (NSString *)description<br />{<br />&nbsp; &nbsp; NSString *stringDescription = &#91;&#91;NSString alloc&#93; initWithFormat:@&quot;%@(%@): Worth $%d recorded on %@&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; itemName, serialNumber, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; valueInDollars, dateCreated&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; return stringDescription;<br />}<br /><br />-(void)dealloc<br />{<br />&nbsp; &nbsp; NSLog(@&quot;Destroyed: %@&quot;, self);<br />}<br /><br /><br /><br />@end<br /></code></dd></dl>]]></content>
        <summary type="html"><![CDATA[of course!<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>//<br /><br />#import &lt;Foundation/Foundation.h&gt;<br /><br />@interface BNRItem : NSObject<br />{<br />&nbsp; &nbsp; NSDate *dateCreated;<br />}<br /><br />// class method<br />+ (id)randomItem;<br /><br />// designated initializer<br />- (id)initWithItemName:(NSString *)name<br />&nbsp; &nbsp; &nbsp; &nbsp; valueInDollars:(int)value<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; serialNumber:(NSString *)sNumber;<br /><br />//&nbsp; accessors<br />@property (nonatomic, strong) BNRItem *containedItem;<br />@property (nonatomic, weak) BNRItem *container;<br /><br />@property (nonatomic, copy) NSString *itemName;<br />@property (nonatomic, copy) NSString *serialNumber;<br />@property (nonatomic) int valueInDollars;<br />@property (nonatomic, readonly, strong) NSDate *dateCreated;<br /><br /><br /><br /><br /><br />@end<br /></code></dd></dl> <br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>//<br /><br />#import &quot;BNRItem.h&quot;<br /><br />@implementation BNRItem<br /><br />+(id)randomItem<br />{<br />&nbsp; &nbsp; // create an array with three adjectives<br />&nbsp; &nbsp; NSArray *randomAdjectiveList = &#91;NSArray arrayWithObjects:@&quot;Fluffy&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @&quot;Rusty&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @&quot;Shiny&quot;, nil&#93;;<br />&nbsp; &nbsp; // create an array with three nouns<br />&nbsp; &nbsp; NSArray *randomNounList = &#91;NSArray arrayWithObjects:@&quot;Bear&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@&quot;Spork&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@&quot;Mac&quot;, nil&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; NSInteger adjectiveIndex = rand() % &#91;randomAdjectiveList count&#93;;<br />&nbsp; &nbsp; NSInteger nounIndex = rand() % &#91;randomNounList count&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; NSString *randomName = &#91;NSString stringWithFormat:@&quot;%@ %@&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;randomAdjectiveList objectAtIndex:adjectiveIndex&#93;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;randomNounList objectAtIndex:nounIndex&#93;&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; int randomValue = rand() % 100;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; NSString *randomSerialNumber = &#91;NSString stringWithFormat:@&quot;%c%c%c%c%c&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0' + rand() % 10,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'A' + rand() %26,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0' + rand() % 10,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'A' + rand() %26,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0' + rand() % 10&#93;;<br />&nbsp; &nbsp; BNRItem *newItem = &#91;&#91;self alloc&#93; initWithItemName:randomName<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;valueInDollars:randomValue <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;serialNumber:randomSerialNumber&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; return newItem;<br />}<br /><br />// designated initializer<br />- (id)initWithItemName:(NSString *)name<br />&nbsp; &nbsp; &nbsp; &nbsp; valueInDollars:(int)value <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; serialNumber:(NSString *)sNumber<br />{<br />&nbsp; &nbsp; self = &#91;super init&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; if (self) {<br />&nbsp; &nbsp; &#91;self setItemName:name&#93;;<br />&nbsp; &nbsp; &#91;self setSerialNumber:sNumber&#93;;<br />&nbsp; &nbsp; &#91;self setValueInDollars:value&#93;;<br />&nbsp; &nbsp; dateCreated = &#91;&#91;NSDate alloc&#93; init&#93;;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; return self;<br />&nbsp; &nbsp; <br />}<br /><br />// overriding superclass init method<br />- (id)init<br />{<br />&nbsp; &nbsp; return &#91;self initWithItemName:@&quot;Item&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;valueInDollars:0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;serialNumber:@&quot;&quot;&#93;;<br />}<br /><br /><br />// accessors<br />@synthesize itemName;<br />@synthesize serialNumber, valueInDollars, dateCreated, containedItem, container;<br /><br />- (void)setContainedItem:(BNRItem *)i<br />{<br />&nbsp; &nbsp; containedItem = i;<br />&nbsp; &nbsp; &#91;i setContainer:self&#93;;<br />}<br /><br /><br /><br /><br /><br />// overriding superclass methods descriprion and dealloc<br />- (NSString *)description<br />{<br />&nbsp; &nbsp; NSString *stringDescription = &#91;&#91;NSString alloc&#93; initWithFormat:@&quot;%@(%@): Worth $%d recorded on %@&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; itemName, serialNumber, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; valueInDollars, dateCreated&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; return stringDescription;<br />}<br /><br />-(void)dealloc<br />{<br />&nbsp; &nbsp; NSLog(@&quot;Destroyed: %@&quot;, self);<br />}<br /><br /><br /><br />@end<br /></code></dd></dl>]]></summary>
    </entry>
    <entry>
        <title>4. Delegation and Core Location :: Re: Property documentation :: Reply by pedwards</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=216&amp;t=4372&amp;p=10631#p10631"/>
        <published>2012-05-16T00:05:29+00:00</published>
        <updated>2012-05-16T00:05:29+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=216&amp;t=4372&amp;p=10631#p10631</id>
        <author>
            <name>pedwards</name>
        </author>
        <category term="4. Delegation and Core Location" />
        <content type="html"><![CDATA[Wow...I looked right at that documentation before, shamefully it was actually a few times, and totally missed that information within the parentheses. <br /><br />Thanks for the response though.  I guess I need to read more carefully.  What else have I missed?   <img src="http://forums.bignerdranch.com/images/smilies/icon_e_confused.gif" alt=":?" title="Confused" /> <br /><br />Thanks again,<br />Phil]]></content>
        <summary type="html"><![CDATA[Wow...I looked right at that documentation before, shamefully it was actually a few times, and totally missed that information within the parentheses. <br /><br />Thanks for the response though.  I guess I need to read more carefully.  What else have I missed?   <img src="http://forums.bignerdranch.com/images/smilies/icon_e_confused.gif" alt=":?" title="Confused" /> <br /><br />Thanks again,<br />Phil]]></summary>
    </entry>
    <entry>
        <title>6. Subclassing UIView and UIScrollView :: Re: I really do not get it :( :: Reply by keegandewitt</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=218&amp;t=4286&amp;p=10639#p10639"/>
        <published>2012-05-16T04:03:52+00:00</published>
        <updated>2012-05-16T04:03:52+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=218&amp;t=4286&amp;p=10639#p10639</id>
        <author>
            <name>keegandewitt</name>
        </author>
        <category term="6. Subclassing UIView and UIScrollView" />
        <content type="html"><![CDATA[Hey guys,<br /><br />Maybe I'm just not locking in on this, so please speak up if you can clarify.<br /><br />I understand that there is a context (in this case &quot;ctx&quot;) which is either written explicitly in methods or accessed via the UIColor superclass... but I guess I just don't understand why it's all one fluid connection.<br /><br />Why are we having to use the same context for the circles, then the string of text (&quot;are you getting sleepy?&quot;), then the shadow and eventually... the crosshair in the silver challenge? Everything else in iOS seems so artfully separated and singularly made into objects. Why are we, in this case, having to commit to this one ctx instance, structure our code appropriately around that?<br /><br />Seems so strange to me that, just with vector view drawing, we are using calls like [[UIColor redColor] setFill] and so on and not referring to specific pointers.<br /><br />I'm sure it's a broad explanation, but any enlightenment would be awesome. Felt like I was really making progress, then I hit this chapter and felt absolutely confused after multiple reads and walk throughs.]]></content>
        <summary type="html"><![CDATA[Hey guys,<br /><br />Maybe I'm just not locking in on this, so please speak up if you can clarify.<br /><br />I understand that there is a context (in this case &quot;ctx&quot;) which is either written explicitly in methods or accessed via the UIColor superclass... but I guess I just don't understand why it's all one fluid connection.<br /><br />Why are we having to use the same context for the circles, then the string of text (&quot;are you getting sleepy?&quot;), then the shadow and eventually... the crosshair in the silver challenge? Everything else in iOS seems so artfully separated and singularly made into objects. Why are we, in this case, having to commit to this one ctx instance, structure our code appropriately around that?<br /><br />Seems so strange to me that, just with vector view drawing, we are using calls like [[UIColor redColor] setFill] and so on and not referring to specific pointers.<br /><br />I'm sure it's a broad explanation, but any enlightenment would be awesome. Felt like I was really making progress, then I hit this chapter and felt absolutely confused after multiple reads and walk throughs.]]></summary>
    </entry>
    <entry>
        <title>6. Subclassing UIView and UIScrollView :: Re: I really do not get it :( :: Reply by JoeConway</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=218&amp;t=4286&amp;p=10655#p10655"/>
        <published>2012-05-16T18:01:47+00:00</published>
        <updated>2012-05-16T18:01:47+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=218&amp;t=4286&amp;p=10655#p10655</id>
        <author>
            <name>JoeConway</name>
        </author>
        <category term="6. Subclassing UIView and UIScrollView" />
        <content type="html"><![CDATA[The for the more curious in this chapter may give you some insight, but the basic idea is such:<br /><br />When a view is asked to redraw itself (the first time it appears on the screen or when it is sent setNeedsDisplay), it gets added to a queue of all views waiting to be redrawn. When an event is finished processing, the following steps are taken for each view in the redraw queue:<br /><br />1. Create a CGContextRef.<br />2. Make this context &quot;the&quot; current context.<br />3. Call the view's drawRect: method<br />4. Get the image out of &quot;the&quot; current context.<br />5. Set the view's &quot;image&quot; to that image.<br /><br />The reason you use the same context is because every drawing operation will result in one single image that will become that view's image. Thus, it makes sense to the circles, text, etc. onto the same context because you want it all to be in the same image. (If you did not want it to be in the same image, you would create separate view objects.)<br /><br />But you shouldn't think about the globalness of it all. What you should think about is the drawRect: method - it gets called automatically for you, and when it is called, all you have to do is draw to this context you are provided, and the result of all drawing into that context becomes the image for the view running drawRect:.]]></content>
        <summary type="html"><![CDATA[The for the more curious in this chapter may give you some insight, but the basic idea is such:<br /><br />When a view is asked to redraw itself (the first time it appears on the screen or when it is sent setNeedsDisplay), it gets added to a queue of all views waiting to be redrawn. When an event is finished processing, the following steps are taken for each view in the redraw queue:<br /><br />1. Create a CGContextRef.<br />2. Make this context &quot;the&quot; current context.<br />3. Call the view's drawRect: method<br />4. Get the image out of &quot;the&quot; current context.<br />5. Set the view's &quot;image&quot; to that image.<br /><br />The reason you use the same context is because every drawing operation will result in one single image that will become that view's image. Thus, it makes sense to the circles, text, etc. onto the same context because you want it all to be in the same image. (If you did not want it to be in the same image, you would create separate view objects.)<br /><br />But you shouldn't think about the globalness of it all. What you should think about is the drawRect: method - it gets called automatically for you, and when it is called, all you have to do is draw to this context you are provided, and the result of all drawing into that context becomes the image for the view running drawRect:.]]></summary>
    </entry>
    <entry>
        <title>9. UITableView and UITableViewController :: Re: clang: error :: Reply by jemicha</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=221&amp;t=4088&amp;p=10638#p10638"/>
        <published>2012-05-16T02:23:03+00:00</published>
        <updated>2012-05-16T02:23:03+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=221&amp;t=4088&amp;p=10638#p10638</id>
        <author>
            <name>jemicha</name>
        </author>
        <category term="9. UITableView and UITableViewController" />
        <content type="html"><![CDATA[Thanks! it fixed it for me too. I had copied it but not added it to the target.<br /><br />There was something earlier in the book I just remembered too: When you come across an error, write it down and how it was resolved, for future reference.<br /><br />I wish I had done this, as this is the second time this error showed up and the first time was too long ago to remember how I fixed it.<br /><br />Thanks again,<br /><br />Michael.]]></content>
        <summary type="html"><![CDATA[Thanks! it fixed it for me too. I had copied it but not added it to the target.<br /><br />There was something earlier in the book I just remembered too: When you come across an error, write it down and how it was resolved, for future reference.<br /><br />I wish I had done this, as this is the second time this error showed up and the first time was too long ago to remember how I fixed it.<br /><br />Thanks again,<br /><br />Michael.]]></summary>
    </entry>
    <entry>
        <title>10. Editing UITableView :: Re: Bronze, Silver and Gold challenge solutions :: Reply by TheEskil</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=222&amp;t=4231&amp;p=10636#p10636"/>
        <published>2012-05-16T02:19:50+00:00</published>
        <updated>2012-05-16T02:19:50+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=222&amp;t=4231&amp;p=10636#p10636</id>
        <author>
            <name>TheEskil</name>
        </author>
        <category term="10. Editing UITableView" />
        <content type="html"><![CDATA[<blockquote><div><cite>sl0o0m wrote:</cite>Thanks for Sharing, its work with me,<br /><br /><br />is this book your first book in iOS programming? or you had some experience on objective-c?<br /><br />in all challenges I know what I should to do, but I couldn't figure out How or what the method I should use and implement !! even if I search in API and documentation I couldn't !! <img src="http://forums.bignerdranch.com/images/smilies/icon_e_sad.gif" alt=":(" title="Sad" /><br /><br />every time I saw the solutions on this forum, I disappoint why I am not able to answer the challenges like them ?!! is it because of me or because of Book or because the they have background about iOS programming !</div></blockquote><br /><br />Yeah, this is my first iOS book, but I've semi-read the 2nd edition before. Gave it up for about a year. Raced through a Obj-C book prior to reading this edition, just to brush up on OO.<br /><br />I had the same difficulty, until I changed my way of thinking. Searching the docs wasn't helping me until after I did an initial search in google in less precise terms. I.e. &quot;ios uitableview static row&quot; or something along those lines. That would usually get me some pointers from sites like Stackoverflow, which I then took with me into the docs and gave me the answer to how I should do things. And a lot of trial and error. A. lot. One of the challenges in the book I had to keep trying to figure out over the  span of three days, each day trying different things for a couple of hours until I finally got it. That experience alone taught me very much.<br /><br />Keep at it, trial and error, google, docs; those are things you learn from. This book is - as the authors say - not in-depth in any areas, so it is your responsibility to delve deeper. I've already expanded a few of the apps we develop over the course of the book, just because you learn a lot that way. Hang in there <img src="http://forums.bignerdranch.com/images/smilies/icon_e_smile.gif" alt=":)" title="Smile" />]]></content>
        <summary type="html"><![CDATA[<blockquote><div><cite>sl0o0m wrote:</cite>Thanks for Sharing, its work with me,<br /><br /><br />is this book your first book in iOS programming? or you had some experience on objective-c?<br /><br />in all challenges I know what I should to do, but I couldn't figure out How or what the method I should use and implement !! even if I search in API and documentation I couldn't !! <img src="http://forums.bignerdranch.com/images/smilies/icon_e_sad.gif" alt=":(" title="Sad" /><br /><br />every time I saw the solutions on this forum, I disappoint why I am not able to answer the challenges like them ?!! is it because of me or because of Book or because the they have background about iOS programming !</div></blockquote><br /><br />Yeah, this is my first iOS book, but I've semi-read the 2nd edition before. Gave it up for about a year. Raced through a Obj-C book prior to reading this edition, just to brush up on OO.<br /><br />I had the same difficulty, until I changed my way of thinking. Searching the docs wasn't helping me until after I did an initial search in google in less precise terms. I.e. &quot;ios uitableview static row&quot; or something along those lines. That would usually get me some pointers from sites like Stackoverflow, which I then took with me into the docs and gave me the answer to how I should do things. And a lot of trial and error. A. lot. One of the challenges in the book I had to keep trying to figure out over the  span of three days, each day trying different things for a couple of hours until I finally got it. That experience alone taught me very much.<br /><br />Keep at it, trial and error, google, docs; those are things you learn from. This book is - as the authors say - not in-depth in any areas, so it is your responsibility to delve deeper. I've already expanded a few of the apps we develop over the course of the book, just because you learn a lot that way. Hang in there <img src="http://forums.bignerdranch.com/images/smilies/icon_e_smile.gif" alt=":)" title="Smile" />]]></summary>
    </entry>
    <entry>
        <title>10. Editing UITableView :: Re: Bronze, Silver and Gold challenge solutions :: Reply by sl0o0m</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=222&amp;t=4231&amp;p=10643#p10643"/>
        <published>2012-05-16T08:03:14+00:00</published>
        <updated>2012-05-16T08:03:14+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=222&amp;t=4231&amp;p=10643#p10643</id>
        <author>
            <name>sl0o0m</name>
        </author>
        <category term="10. Editing UITableView" />
        <content type="html"><![CDATA[<blockquote><div><cite>TheEskil wrote:</cite><br />Yeah, this is my first iOS book, but I've semi-read the 2nd edition before. Gave it up for about a year. Raced through a Obj-C book prior to reading this edition, just to brush up on OO.<br /><br />I had the same difficulty, until I changed my way of thinking. Searching the docs wasn't helping me until after I did an initial search in google in less precise terms. I.e. &quot;ios uitableview static row&quot; or something along those lines. That would usually get me some pointers from sites like Stackoverflow, which I then took with me into the docs and gave me the answer to how I should do things. And a lot of trial and error. A. lot. One of the challenges in the book I had to keep trying to figure out over the  span of three days, each day trying different things for a couple of hours until I finally got it. That experience alone taught me very much.<br /><br />Keep at it, trial and error, google, docs; those are things you learn from. This book is - as the authors say - not in-depth in any areas, so it is your responsibility to delve deeper. I've already expanded a few of the apps we develop over the course of the book, just because you learn a lot that way. Hang in there <img src="http://forums.bignerdranch.com/images/smilies/icon_e_smile.gif" alt=":)" title="Smile" /></div></blockquote><br /><br />Thanks for your input, its really help me. I am currently on my first step learning iOS programming (I start two months ago). however, I am on the right way, there is nothing wrong with me <img src="http://forums.bignerdranch.com/images/smilies/icon_e_biggrin.gif" alt=":D" title="Very Happy" />]]></content>
        <summary type="html"><![CDATA[<blockquote><div><cite>TheEskil wrote:</cite><br />Yeah, this is my first iOS book, but I've semi-read the 2nd edition before. Gave it up for about a year. Raced through a Obj-C book prior to reading this edition, just to brush up on OO.<br /><br />I had the same difficulty, until I changed my way of thinking. Searching the docs wasn't helping me until after I did an initial search in google in less precise terms. I.e. &quot;ios uitableview static row&quot; or something along those lines. That would usually get me some pointers from sites like Stackoverflow, which I then took with me into the docs and gave me the answer to how I should do things. And a lot of trial and error. A. lot. One of the challenges in the book I had to keep trying to figure out over the  span of three days, each day trying different things for a couple of hours until I finally got it. That experience alone taught me very much.<br /><br />Keep at it, trial and error, google, docs; those are things you learn from. This book is - as the authors say - not in-depth in any areas, so it is your responsibility to delve deeper. I've already expanded a few of the apps we develop over the course of the book, just because you learn a lot that way. Hang in there <img src="http://forums.bignerdranch.com/images/smilies/icon_e_smile.gif" alt=":)" title="Smile" /></div></blockquote><br /><br />Thanks for your input, its really help me. I am currently on my first step learning iOS programming (I start two months ago). however, I am on the right way, there is nothing wrong with me <img src="http://forums.bignerdranch.com/images/smilies/icon_e_biggrin.gif" alt=":D" title="Very Happy" />]]></summary>
    </entry>
    <entry>
        <title>13. UIPopoverController and Modal View Controllers :: Re: iOS iPad simulator crashes, but not iPhone :: Reply by JoeConway</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=225&amp;t=4375&amp;p=10656#p10656"/>
        <published>2012-05-16T18:02:51+00:00</published>
        <updated>2012-05-16T18:02:51+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=225&amp;t=4375&amp;p=10656#p10656</id>
        <author>
            <name>JoeConway</name>
        </author>
        <category term="13. UIPopoverController and Modal View Controllers" />
        <content type="html"><![CDATA[Yeah, the only way to really check is pretty much what you've done. You can always confirm by navigating to that folder and seeing what is insidei t.]]></content>
        <summary type="html"><![CDATA[Yeah, the only way to really check is pretty much what you've done. You can always confirm by navigating to that folder and seeing what is insidei t.]]></summary>
    </entry>
    <entry>
        <title>14. Saving, Loading, and Application States :: Images saved - items not saved :: Author joejohannesjoe</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=226&amp;t=4381&amp;p=10642#p10642"/>
        <published>2012-05-16T07:32:50+00:00</published>
        <updated>2012-05-16T07:32:50+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=226&amp;t=4381&amp;p=10642#p10642</id>
        <author>
            <name>joejohannesjoe</name>
        </author>
        <category term="14. Saving, Loading, and Application States" />
        <content type="html"><![CDATA[if the application crashes items are not saved but images are -&gt; images exist but i do not have keys for them --- is it possible to destroy them in case of a crash (at the next application start)?]]></content>
        <summary type="html"><![CDATA[if the application crashes items are not saved but images are -&gt; images exist but i do not have keys for them --- is it possible to destroy them in case of a crash (at the next application start)?]]></summary>
    </entry>
    <entry>
        <title>14. Saving, Loading, and Application States :: Re: Images saved - items not saved :: Reply by JoeConway</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=226&amp;t=4381&amp;p=10657#p10657"/>
        <published>2012-05-16T18:04:04+00:00</published>
        <updated>2012-05-16T18:04:04+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=226&amp;t=4381&amp;p=10657#p10657</id>
        <author>
            <name>JoeConway</name>
        </author>
        <category term="14. Saving, Loading, and Application States" />
        <content type="html"><![CDATA[Sure, you could loop through all of the images by using NSFileManager's enumeratorAtPath: method and confirm that every image has a BNRItem. However, you'd probably want to be more robust than that, which would require a solution that automatically saves the BNRItems when they get the image. The Core Data chapter will do this]]></content>
        <summary type="html"><![CDATA[Sure, you could loop through all of the images by using NSFileManager's enumeratorAtPath: method and confirm that every image has a BNRItem. However, you'd probably want to be more robust than that, which would require a solution that automatically saves the BNRItems when they get the image. The Core Data chapter will do this]]></summary>
    </entry>
    <entry>
        <title>15. Subclassing UITableViewCell :: Re: Custom UIButton bypasses tableview: didselectrow?? :: Reply by waddeler</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=227&amp;t=4276&amp;p=10641#p10641"/>
        <published>2012-05-16T07:24:28+00:00</published>
        <updated>2012-05-16T07:24:28+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=227&amp;t=4276&amp;p=10641#p10641</id>
        <author>
            <name>waddeler</name>
        </author>
        <category term="15. Subclassing UITableViewCell" />
        <content type="html"><![CDATA[Re Custom UIButton.<br /><br />Could the same results have been effected using some form of delegation i.e. making the ItemsViewController the delegate of the tableCell ?]]></content>
        <summary type="html"><![CDATA[Re Custom UIButton.<br /><br />Could the same results have been effected using some form of delegation i.e. making the ItemsViewController the delegate of the tableCell ?]]></summary>
    </entry>
    <entry>
        <title>15. Subclassing UITableViewCell :: Re: Custom UIButton bypasses tableview: didselectrow?? :: Reply by JoeConway</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=227&amp;t=4276&amp;p=10658#p10658"/>
        <published>2012-05-16T18:06:25+00:00</published>
        <updated>2012-05-16T18:06:25+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=227&amp;t=4276&amp;p=10658#p10658</id>
        <author>
            <name>JoeConway</name>
        </author>
        <category term="15. Subclassing UITableViewCell" />
        <content type="html"><![CDATA[You certainly could, but because the target-action mechanism is already being used, it makes sense to use it again to relay the message. Delegation is nice when you have an object that can spawn multiple events that it expects one object to handle, because you can neatly define a protocol and all of the messages it might send. In this case, it is much easier to just write this general purpose &quot;append atIndexPath:&quot; method and have all action messages do the same thing.]]></content>
        <summary type="html"><![CDATA[You certainly could, but because the target-action mechanism is already being used, it makes sense to use it again to relay the message. Delegation is nice when you have an object that can spawn multiple events that it expects one object to handle, because you can neatly define a protocol and all of the messages it might send. In this case, it is much easier to just write this general purpose &quot;append atIndexPath:&quot; method and have all action messages do the same thing.]]></summary>
    </entry>
    <entry>
        <title>16. Core Data :: Re: forward declaration? :: Reply by mataz137</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=228&amp;t=4369&amp;p=10635#p10635"/>
        <published>2012-05-16T02:02:56+00:00</published>
        <updated>2012-05-16T02:02:56+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=228&amp;t=4369&amp;p=10635#p10635</id>
        <author>
            <name>mataz137</name>
        </author>
        <category term="16. Core Data" />
        <content type="html"><![CDATA[Last time I had a similar message (I wasn't using Core Data), I was using Core Animation, and I forgot to do the obvious, which was link the Core Animation framework and import it ( i.e. #import &lt;AnyFramework&gt; ). At the risk of asking the obvious, but... did you import Core Data?]]></content>
        <summary type="html"><![CDATA[Last time I had a similar message (I wasn't using Core Data), I was using Core Animation, and I forgot to do the obvious, which was link the Core Animation framework and import it ( i.e. #import &lt;AnyFramework&gt; ). At the risk of asking the obvious, but... did you import Core Data?]]></summary>
    </entry>
    <entry>
        <title>16. Core Data :: Re: forward declaration? :: Reply by gripnerd</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=228&amp;t=4369&amp;p=10637#p10637"/>
        <published>2012-05-16T02:20:05+00:00</published>
        <updated>2012-05-16T02:20:05+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=228&amp;t=4369&amp;p=10637#p10637</id>
        <author>
            <name>gripnerd</name>
        </author>
        <category term="16. Core Data" />
        <content type="html"><![CDATA[i actually moved on to the next chapters and trashed the project i was working on... in favor of the saved copy in the solutions file.<br /><br />but i do remember importing core date... i forget which file(but i'm pretty sure it's whichever one the book said) but i do remember that it wasn't auto completing &quot;CoreData/CoreData.h&quot; when i typed it in]]></content>
        <summary type="html"><![CDATA[i actually moved on to the next chapters and trashed the project i was working on... in favor of the saved copy in the solutions file.<br /><br />but i do remember importing core date... i forget which file(but i'm pretty sure it's whichever one the book said) but i do remember that it wasn't auto completing &quot;CoreData/CoreData.h&quot; when i typed it in]]></summary>
    </entry>
    <entry>
        <title>20. UIGestureRecognizer and UIMenuController :: Re: Mega-Gold Challenge :: Reply by BryanLuby</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=232&amp;t=4296&amp;p=10633#p10633"/>
        <published>2012-05-16T01:36:15+00:00</published>
        <updated>2012-05-16T01:36:15+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=232&amp;t=4296&amp;p=10633#p10633</id>
        <author>
            <name>BryanLuby</name>
        </author>
        <category term="20. UIGestureRecognizer and UIMenuController" />
        <content type="html"><![CDATA[@TheEskil You can save a few steps if you add the segmented controller programmatically to the existing view.<br />Added the lineColor property to <span style="font-weight: bold">Line.h</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>@property (nonatomic) UIColor *lineColor;</code></dd></dl><br />Added the segmentedControl ivar and selectedColor property to <span style="font-weight: bold">TouchDrawView.h</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>UISegmentedControl *segmentedControl; <br />}<br />@property (nonatomic) UIColor *selectedColor;</code></dd></dl><br />Added swipe gesture recognizers to present/dismiss the color picker in <span style="font-weight: bold">TouchDrawView.m</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>UISwipeGestureRecognizer *swipeUpRecognizer = &#91;&#91;UISwipeGestureRecognizer alloc&#93; initWithTarget:self<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action:@selector(presentColorPicker:)&#93;;<br />&#91;swipeUpRecognizer setDirection:UISwipeGestureRecognizerDirectionUp&#93;;<br />&#91;swipeUpRecognizer setNumberOfTouchesRequired:3&#93;;<br />&#91;self addGestureRecognizer:swipeUpRecognizer&#93;;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />UISwipeGestureRecognizer *swipeDownRecognizer = &#91;&#91;UISwipeGestureRecognizer alloc&#93; initWithTarget:self<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action:@selector(dismissColorPicker:)&#93;;<br />&#91;swipeDownRecognizer setDirection:UISwipeGestureRecognizerDirectionDown&#93;;<br />&#91;swipeDownRecognizer setNumberOfTouchesRequired:3&#93;;<br />&#91;self addGestureRecognizer:swipeDownRecognizer&#93;;</code></dd></dl><br />Added changeColor method to <span style="font-weight: bold">TouchDrawView.m</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>- (void)changeColor:(UISegmentedControl *)sender<br />{<br />&nbsp; &nbsp; NSArray *colorArray = &#91;NSArray arrayWithObjects:&#91;UIColor redColor&#93;, &#91;UIColor greenColor&#93;, &#91;UIColor blueColor&#93;, &#91;UIColor blackColor&#93;, nil&#93;;<br />&nbsp; &nbsp; &#91;self setSelectedColor:&#91;colorArray objectAtIndex:&#91;sender selectedSegmentIndex&#93;&#93;&#93;;<br />}</code></dd></dl><br />Added methods to present/dismiss the color picker in <span style="font-weight: bold">TouchDrawView.m</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>- (void)presentColorPicker:(UISwipeGestureRecognizer *)gr<br />{<br />&nbsp; &nbsp; &#91;linesInProcess removeAllObjects&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; NSArray *rgbbArray = &#91;&#91;NSArray alloc&#93; initWithObjects:@&quot;Red&quot;, @&quot;Green&quot;, @&quot;Blue&quot;, @&quot;Black&quot;, nil&#93;;<br />&nbsp; &nbsp; segmentedControl = &#91;&#91;UISegmentedControl alloc&#93; initWithItems:rgbbArray&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &#91;segmentedControl setCenter:CGPointMake(self.frame.size.width / 2, self.frame.size.height / 2)&#93;;<br />&nbsp; &nbsp; &#91;segmentedControl setSegmentedControlStyle:UISegmentedControlStyleBordered&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &#91;segmentedControl addTarget:nil<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;action:@selector(changeColor:)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;forControlEvents:UIControlEventValueChanged&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &#91;self addSubview:segmentedControl&#93;;<br />}<br /><br />- (void)dismissColorPicker:(UISwipeGestureRecognizer *)gr<br />{<br />&nbsp; &nbsp; &#91;linesInProcess removeAllObjects&#93;;<br />&nbsp; &nbsp; &#91;segmentedControl removeFromSuperview&#93;;<br />}<br /></code></dd></dl><br />Set the line color in <span style="font-weight: bold">drawRect</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>for (Line *line in completeLines) {<br />&nbsp; &nbsp; &nbsp; &nbsp; if (!&#91;line lineColor&#93;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;line setLineColor:selectedColor&#93;;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &#91;&#91;line lineColor&#93; set&#93;;</code></dd></dl><br /><br /><img src="http://i.imgur.com/rMcfE.png" alt="Image" />]]></content>
        <summary type="html"><![CDATA[@TheEskil You can save a few steps if you add the segmented controller programmatically to the existing view.<br />Added the lineColor property to <span style="font-weight: bold">Line.h</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>@property (nonatomic) UIColor *lineColor;</code></dd></dl><br />Added the segmentedControl ivar and selectedColor property to <span style="font-weight: bold">TouchDrawView.h</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>UISegmentedControl *segmentedControl; <br />}<br />@property (nonatomic) UIColor *selectedColor;</code></dd></dl><br />Added swipe gesture recognizers to present/dismiss the color picker in <span style="font-weight: bold">TouchDrawView.m</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>UISwipeGestureRecognizer *swipeUpRecognizer = &#91;&#91;UISwipeGestureRecognizer alloc&#93; initWithTarget:self<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action:@selector(presentColorPicker:)&#93;;<br />&#91;swipeUpRecognizer setDirection:UISwipeGestureRecognizerDirectionUp&#93;;<br />&#91;swipeUpRecognizer setNumberOfTouchesRequired:3&#93;;<br />&#91;self addGestureRecognizer:swipeUpRecognizer&#93;;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />UISwipeGestureRecognizer *swipeDownRecognizer = &#91;&#91;UISwipeGestureRecognizer alloc&#93; initWithTarget:self<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action:@selector(dismissColorPicker:)&#93;;<br />&#91;swipeDownRecognizer setDirection:UISwipeGestureRecognizerDirectionDown&#93;;<br />&#91;swipeDownRecognizer setNumberOfTouchesRequired:3&#93;;<br />&#91;self addGestureRecognizer:swipeDownRecognizer&#93;;</code></dd></dl><br />Added changeColor method to <span style="font-weight: bold">TouchDrawView.m</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>- (void)changeColor:(UISegmentedControl *)sender<br />{<br />&nbsp; &nbsp; NSArray *colorArray = &#91;NSArray arrayWithObjects:&#91;UIColor redColor&#93;, &#91;UIColor greenColor&#93;, &#91;UIColor blueColor&#93;, &#91;UIColor blackColor&#93;, nil&#93;;<br />&nbsp; &nbsp; &#91;self setSelectedColor:&#91;colorArray objectAtIndex:&#91;sender selectedSegmentIndex&#93;&#93;&#93;;<br />}</code></dd></dl><br />Added methods to present/dismiss the color picker in <span style="font-weight: bold">TouchDrawView.m</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>- (void)presentColorPicker:(UISwipeGestureRecognizer *)gr<br />{<br />&nbsp; &nbsp; &#91;linesInProcess removeAllObjects&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; NSArray *rgbbArray = &#91;&#91;NSArray alloc&#93; initWithObjects:@&quot;Red&quot;, @&quot;Green&quot;, @&quot;Blue&quot;, @&quot;Black&quot;, nil&#93;;<br />&nbsp; &nbsp; segmentedControl = &#91;&#91;UISegmentedControl alloc&#93; initWithItems:rgbbArray&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &#91;segmentedControl setCenter:CGPointMake(self.frame.size.width / 2, self.frame.size.height / 2)&#93;;<br />&nbsp; &nbsp; &#91;segmentedControl setSegmentedControlStyle:UISegmentedControlStyleBordered&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &#91;segmentedControl addTarget:nil<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;action:@selector(changeColor:)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;forControlEvents:UIControlEventValueChanged&#93;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &#91;self addSubview:segmentedControl&#93;;<br />}<br /><br />- (void)dismissColorPicker:(UISwipeGestureRecognizer *)gr<br />{<br />&nbsp; &nbsp; &#91;linesInProcess removeAllObjects&#93;;<br />&nbsp; &nbsp; &#91;segmentedControl removeFromSuperview&#93;;<br />}<br /></code></dd></dl><br />Set the line color in <span style="font-weight: bold">drawRect</span>:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>for (Line *line in completeLines) {<br />&nbsp; &nbsp; &nbsp; &nbsp; if (!&#91;line lineColor&#93;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;line setLineColor:selectedColor&#93;;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &#91;&#91;line lineColor&#93; set&#93;;</code></dd></dl><br /><br /><img src="http://i.imgur.com/rMcfE.png" alt="Image" />]]></summary>
    </entry>
    <entry>
        <title>21. Instruments :: Re: Time profiler not matching up :: Reply by BryanLuby</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=233&amp;t=4309&amp;p=10648#p10648"/>
        <published>2012-05-16T13:10:21+00:00</published>
        <updated>2012-05-16T13:10:21+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=233&amp;t=4309&amp;p=10648#p10648</id>
        <author>
            <name>BryanLuby</name>
        </author>
        <category term="21. Instruments" />
        <content type="html"><![CDATA[The only way I could find mach_msg_trap was to select the &quot;Invert Call Tree&quot; setting on the left side of the window.<br /><br /><img src="http://i.imgur.com/Zm7lP.png" alt="Image" />]]></content>
        <summary type="html"><![CDATA[The only way I could find mach_msg_trap was to select the &quot;Invert Call Tree&quot; setting on the left side of the window.<br /><br /><img src="http://i.imgur.com/Zm7lP.png" alt="Image" />]]></summary>
    </entry>
    <entry>
        <title>23. Controlling Animation with CAAnimation :: Re: Bronze, Silver and Gold challenge solutions :: Reply by dmddmd</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=234&amp;t=4303&amp;p=10651#p10651"/>
        <published>2012-05-16T17:44:31+00:00</published>
        <updated>2012-05-16T17:44:31+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=234&amp;t=4303&amp;p=10651#p10651</id>
        <author>
            <name>dmddmd</name>
        </author>
        <category term="23. Controlling Animation with CAAnimation" />
        <content type="html"><![CDATA[Does anyone have a working solution for the Silver Challenge where the What time is it? button slides into position from the left each time the TimeView appears?  It's not clear to me which if any of these previously posted solution does ... and I haven't been able to make that work yet either! :/]]></content>
        <summary type="html"><![CDATA[Does anyone have a working solution for the Silver Challenge where the What time is it? button slides into position from the left each time the TimeView appears?  It's not clear to me which if any of these previously posted solution does ... and I haven't been able to make that work yet either! :/]]></summary>
    </entry>
    <entry>
        <title>23. Controlling Animation with CAAnimation :: Re: Bronze, Silver and Gold challenge solutions :: Reply by BryanLuby</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=234&amp;t=4303&amp;p=10665#p10665"/>
        <published>2012-05-16T20:55:50+00:00</published>
        <updated>2012-05-16T20:55:50+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=234&amp;t=4303&amp;p=10665#p10665</id>
        <author>
            <name>BryanLuby</name>
        </author>
        <category term="23. Controlling Animation with CAAnimation" />
        <content type="html"><![CDATA[@dmddmd Override viewDidAppear with the slideTimeButton method. The button should slide in every time you select the Time tab:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>- (void)viewDidAppear:(BOOL)animated<br />{<br />&nbsp; &nbsp; &#91;super viewDidAppear:animated&#93;;<br />&nbsp; &nbsp; &#91;self slideTimeButton&#93;; // Silver challenge<br />}<br /></code></dd></dl>]]></content>
        <summary type="html"><![CDATA[@dmddmd Override viewDidAppear with the slideTimeButton method. The button should slide in every time you select the Time tab:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>- (void)viewDidAppear:(BOOL)animated<br />{<br />&nbsp; &nbsp; &#91;super viewDidAppear:animated&#93;;<br />&nbsp; &nbsp; &#91;self slideTimeButton&#93;; // Silver challenge<br />}<br /></code></dd></dl>]]></summary>
    </entry>
    <entry>
        <title>12. Objects :: Re: variable or pointer ? :: Reply by FreddyF</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=144&amp;t=4348&amp;p=10647#p10647"/>
        <published>2012-05-16T12:58:17+00:00</published>
        <updated>2012-05-16T12:58:17+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=144&amp;t=4348&amp;p=10647#p10647</id>
        <author>
            <name>FreddyF</name>
        </author>
        <category term="12. Objects" />
        <content type="html"><![CDATA[Aha, got it, thanks !!]]></content>
        <summary type="html"><![CDATA[Aha, got it, thanks !!]]></summary>
    </entry>
    <entry>
        <title>17. Your First Class :: Re: Do I need to declare variables when using @property? :: Reply by rogeriom</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=149&amp;t=3511&amp;p=10659#p10659"/>
        <published>2012-05-16T18:15:23+00:00</published>
        <updated>2012-05-16T18:15:23+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=149&amp;t=3511&amp;p=10659#p10659</id>
        <author>
            <name>rogeriom</name>
        </author>
        <category term="17. Your First Class" />
        <content type="html"><![CDATA[In the section <span style="font-weight: bold">&quot;Declared Properties&quot;</span> of the <span style="font-weight: bold">&quot;The Objective-C Programming Language&quot;</span> in Apple documentation, you can get details about using @property and @synthesize keywords.<br />The Objective-C declared properties feature provides a simple way to declare and implement an object’s accessor methods. Is like automatic implemented properties in C#, since version 3.0. Is a &quot;sugar&quot; syntax.<br /><br />There are two parts to a declared property, its declaration and its implementation.<br /><br /><span style="font-weight: bold">Property Declaration</span><br />A property declaration begins with the keyword @property.<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>@property (attributes) type propertyName;</code></dd></dl><br /><span style="font-weight: bold">Note: </span> Until this chapter, the book does not give information about attributes.<br /><br />You can think of a property declaration as being equivalent to declaring two accessor methods. Thus<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>@property type myProperty;</code></dd></dl><br />is equivalent to:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>- (float)myProperty;<br />- (void)setMyProperty:(float)value;</code></dd></dl><br /><br /><span style="font-weight: bold">Property Implementation Directives</span><br /><br />You can use the @synthesize and @dynamic directives in @implementation blocks to trigger specific compiler actions. Note that neither is required for any given @property declaration.<br /><br />You use the @synthesize directive to tell the compiler that it should synthesize the setter and/or getter methods for a property if you do not supply them within the @implementation block. <span style="font-weight: bold">The @synthesize directive also synthesizes an appropriate instance variable if it is not otherwise declared.</span>]]></content>
        <summary type="html"><![CDATA[In the section <span style="font-weight: bold">&quot;Declared Properties&quot;</span> of the <span style="font-weight: bold">&quot;The Objective-C Programming Language&quot;</span> in Apple documentation, you can get details about using @property and @synthesize keywords.<br />The Objective-C declared properties feature provides a simple way to declare and implement an object’s accessor methods. Is like automatic implemented properties in C#, since version 3.0. Is a &quot;sugar&quot; syntax.<br /><br />There are two parts to a declared property, its declaration and its implementation.<br /><br /><span style="font-weight: bold">Property Declaration</span><br />A property declaration begins with the keyword @property.<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>@property (attributes) type propertyName;</code></dd></dl><br /><span style="font-weight: bold">Note: </span> Until this chapter, the book does not give information about attributes.<br /><br />You can think of a property declaration as being equivalent to declaring two accessor methods. Thus<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>@property type myProperty;</code></dd></dl><br />is equivalent to:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>- (float)myProperty;<br />- (void)setMyProperty:(float)value;</code></dd></dl><br /><br /><span style="font-weight: bold">Property Implementation Directives</span><br /><br />You can use the @synthesize and @dynamic directives in @implementation blocks to trigger specific compiler actions. Note that neither is required for any given @property declaration.<br /><br />You use the @synthesize directive to tell the compiler that it should synthesize the setter and/or getter methods for a property if you do not supply them within the @implementation block. <span style="font-weight: bold">The @synthesize directive also synthesizes an appropriate instance variable if it is not otherwise declared.</span>]]></summary>
    </entry>
    <entry>
        <title>17. Your First Class :: Challenge Error Question - Please Help! :: Author StanC3</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=149&amp;t=4386&amp;p=10663#p10663"/>
        <published>2012-05-16T20:47:32+00:00</published>
        <updated>2012-05-16T20:47:32+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=149&amp;t=4386&amp;p=10663#p10663</id>
        <author>
            <name>StanC3</name>
        </author>
        <category term="17. Your First Class" />
        <content type="html"><![CDATA[This is my attempt at the challenge.  I got it right except that I wanted the stock name to populate as well and this is the error I'm getting:<br /><br />2012-05-16 16:37:12.265 Stocks[1820:403] -[StockHolding nameOfStock:]: unrecognized selector sent to instance 0x107914290<br />2012-05-16 16:37:12.273 Stocks[1820:403] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[StockHolding nameOfStock:]: unrecognized selector sent to instance 0x107914290'<br />*** First throw call stack:<br />(<br />	0   CoreFoundation                      0x00007fff8c217fc6 __exceptionPreprocess + 198<br />	1   libobjc.A.dylib                     0x00007fff8a2d5d5e objc_exception_throw + 43<br />	2   CoreFoundation                      0x00007fff8c2a42ae -[NSObject doesNotRecognizeSelector:] + 190<br />	3   CoreFoundation                      0x00007fff8c204e73 ___forwarding___ + 371<br />	4   CoreFoundation                      0x00007fff8c204c88 _CF_forwarding_prep_0 + 232<br />	5   Stocks                              0x0000000107846393 main + 403<br />	6   Stocks                              0x00000001078461f4 start + 52<br />	7   ???                                 0x0000000000000001 0x0 + 1<br />)<br />terminate called throwing an exception(lldb)<br /><br />My StockHolding.h is below:<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>//<br />//&nbsp; StockHolding.h<br />//&nbsp; Stocks<br />//<br />//&nbsp; Created by Stan Cromlish - Email on 5/16/12.<br />//&nbsp; Copyright (c) 2012 __MyCompanyName__. All rights reserved.<br />//<br /><br />#import &lt;Foundation/Foundation.h&gt;<br /><br />@interface StockHolding : NSObject<br />{<br />&nbsp; &nbsp;NSString *nameOfStock;<br />}<br />@property float costInDollars;<br />@property float valueInDollars;<br />@property int numberOfShares;<br /><br /><br />&nbsp; &nbsp;// Instance Variables that will be set.<br />-(float) costInDollars;<br />-(void) setCostInDollars:(float)c;<br />-(float) valueInDollars;<br />-(void) setValueInDollars:(float)v;<br />-(int) numberOfShares;<br />-(void) setNumberOfShares:(int)n;<br />-(NSString *)nameOfStock;<br />-(void) nameOfStock:(NSString *)s;<br /><br /><br />&nbsp; &nbsp;//The Value Method<br />-(float) totalStockValue;<br />-(float) totalStockCost;<br /><br /><br />@end<br /></code></dd></dl><br /><br />My StockHolding.m is below:<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>//<br />//&nbsp; StockHolding.m<br />//&nbsp; Stocks<br />//<br />//&nbsp; Created by Stan Cromlish - Email on 5/16/12.<br />//&nbsp; Copyright (c) 2012 __MyCompanyName__. All rights reserved.<br />//<br /><br />#import &quot;StockHolding.h&quot;<br /><br />@implementation StockHolding<br /><br />@synthesize costInDollars;<br />@synthesize valueInDollars;<br />@synthesize numberOfShares;<br /><br /><br /><br />-(float) costInDollars{<br />&nbsp; &nbsp;return costInDollars;<br />}<br /><br />-(void)setCostInDollars:(float)c{<br />&nbsp; &nbsp;costInDollars = c;<br />}<br /><br />-(float) valueInDollars{<br />&nbsp; &nbsp;return valueInDollars;<br />}<br /><br />-(void) setValueInDollars:(float)v{<br />&nbsp; &nbsp;valueInDollars = v;<br />}<br /><br />-(int) numberOfShares{<br />&nbsp; &nbsp;return numberOfShares;<br />}<br /><br />-(void) setNumberOfShares:(int)n{<br />&nbsp; &nbsp;numberOfShares = n;<br />}<br /><br />-(float) totalStockValue{<br />&nbsp; &nbsp;return numberOfShares * valueInDollars;<br />}<br /><br />-(float) totalStockCost{<br />&nbsp; &nbsp;return numberOfShares * costInDollars;<br />}<br /><br />-(NSString *) nameOfStock;&nbsp; &nbsp;{<br />&nbsp; &nbsp;return nameOfStock;<br />}<br /><br />@end<br /></code></dd></dl><br /><br />Here is my main.m file below:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>//<br />//&nbsp; main.m<br />//&nbsp; Stocks<br />//<br />//&nbsp; Created by Stan Cromlish - Email on 5/16/12.<br />//&nbsp; Copyright (c) 2012 __MyCompanyName__. All rights reserved.<br />//<br /><br />#import &lt;Foundation/Foundation.h&gt;<br />#import &quot;StockHolding.h&quot;<br /><br />int main(int argc, const char * argv&#91;&#93;)<br />{<br /><br />&nbsp; &nbsp;@autoreleasepool {<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// Create an instance<br />&nbsp; &nbsp;&nbsp; &nbsp;StockHolding *ibm = &#91;&#91;StockHolding alloc&#93; init&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;StockHolding *apl = &#91;&#91;StockHolding alloc&#93; init&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;StockHolding *google = &#91;&#91;StockHolding alloc&#93; init&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;//Set Stock Values<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm nameOfStock:(@&quot;IBM&quot;)&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm setNumberOfShares:10&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm setValueInDollars:20.75&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm setCostInDollars:11.75&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm totalStockValue&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm totalStockCost&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &#91;apl nameOfStock:(@&quot;Apple&quot;)&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;apl setNumberOfShares:12&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;apl setValueInDollars:310.52&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;apl setCostInDollars:127.22&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;apl totalStockValue&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;apl totalStockCost&#93;;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google nameOfStock:(@&quot;Google&quot;)&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google setNumberOfShares:22&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google setValueInDollars:177.62&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google setCostInDollars:109.96&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google totalStockValue&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google totalStockCost&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;//Create a Mutable Array<br />&nbsp; &nbsp;&nbsp; &nbsp;NSMutableArray *stocks = &#91;&#91;NSMutableArray alloc&#93; init&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;stocks addObject:ibm&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;stocks addObject:apl&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;stocks addObject:google&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;//print values in the array<br />&nbsp; &nbsp;&nbsp; &nbsp;for(StockHolding *n in stocks)<br />&nbsp; &nbsp;&nbsp; &nbsp;{<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;NSLog(@&quot;Stock %@ :Number of shares = %i Purchase price = %.2f Current price = %.2f&quot;,&#91;n nameOfStock&#93;,&#91;n numberOfShares&#93;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; ,&#91;n costInDollars&#93;,&#91;n valueInDollars&#93;);<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;NSLog(@&quot;The cost in dollars is %.2f&quot;,&#91;n totalStockCost&#93;);<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;NSLog(@&quot;The value in dollars is %.2f&quot;,&#91;n totalStockValue&#93;);<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;}<br />&nbsp; &nbsp;}<br />&nbsp; &nbsp;return 0;<br />}</code></dd></dl><br /><br />What am I doing wrong?  It seems so straight forward.  Any help would be greatly appreciated.  Thanks<br /><br />Stan]]></content>
        <summary type="html"><![CDATA[This is my attempt at the challenge.  I got it right except that I wanted the stock name to populate as well and this is the error I'm getting:<br /><br />2012-05-16 16:37:12.265 Stocks[1820:403] -[StockHolding nameOfStock:]: unrecognized selector sent to instance 0x107914290<br />2012-05-16 16:37:12.273 Stocks[1820:403] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[StockHolding nameOfStock:]: unrecognized selector sent to instance 0x107914290'<br />*** First throw call stack:<br />(<br />	0   CoreFoundation                      0x00007fff8c217fc6 __exceptionPreprocess + 198<br />	1   libobjc.A.dylib                     0x00007fff8a2d5d5e objc_exception_throw + 43<br />	2   CoreFoundation                      0x00007fff8c2a42ae -[NSObject doesNotRecognizeSelector:] + 190<br />	3   CoreFoundation                      0x00007fff8c204e73 ___forwarding___ + 371<br />	4   CoreFoundation                      0x00007fff8c204c88 _CF_forwarding_prep_0 + 232<br />	5   Stocks                              0x0000000107846393 main + 403<br />	6   Stocks                              0x00000001078461f4 start + 52<br />	7   ???                                 0x0000000000000001 0x0 + 1<br />)<br />terminate called throwing an exception(lldb)<br /><br />My StockHolding.h is below:<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>//<br />//&nbsp; StockHolding.h<br />//&nbsp; Stocks<br />//<br />//&nbsp; Created by Stan Cromlish - Email on 5/16/12.<br />//&nbsp; Copyright (c) 2012 __MyCompanyName__. All rights reserved.<br />//<br /><br />#import &lt;Foundation/Foundation.h&gt;<br /><br />@interface StockHolding : NSObject<br />{<br />&nbsp; &nbsp;NSString *nameOfStock;<br />}<br />@property float costInDollars;<br />@property float valueInDollars;<br />@property int numberOfShares;<br /><br /><br />&nbsp; &nbsp;// Instance Variables that will be set.<br />-(float) costInDollars;<br />-(void) setCostInDollars:(float)c;<br />-(float) valueInDollars;<br />-(void) setValueInDollars:(float)v;<br />-(int) numberOfShares;<br />-(void) setNumberOfShares:(int)n;<br />-(NSString *)nameOfStock;<br />-(void) nameOfStock:(NSString *)s;<br /><br /><br />&nbsp; &nbsp;//The Value Method<br />-(float) totalStockValue;<br />-(float) totalStockCost;<br /><br /><br />@end<br /></code></dd></dl><br /><br />My StockHolding.m is below:<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>//<br />//&nbsp; StockHolding.m<br />//&nbsp; Stocks<br />//<br />//&nbsp; Created by Stan Cromlish - Email on 5/16/12.<br />//&nbsp; Copyright (c) 2012 __MyCompanyName__. All rights reserved.<br />//<br /><br />#import &quot;StockHolding.h&quot;<br /><br />@implementation StockHolding<br /><br />@synthesize costInDollars;<br />@synthesize valueInDollars;<br />@synthesize numberOfShares;<br /><br /><br /><br />-(float) costInDollars{<br />&nbsp; &nbsp;return costInDollars;<br />}<br /><br />-(void)setCostInDollars:(float)c{<br />&nbsp; &nbsp;costInDollars = c;<br />}<br /><br />-(float) valueInDollars{<br />&nbsp; &nbsp;return valueInDollars;<br />}<br /><br />-(void) setValueInDollars:(float)v{<br />&nbsp; &nbsp;valueInDollars = v;<br />}<br /><br />-(int) numberOfShares{<br />&nbsp; &nbsp;return numberOfShares;<br />}<br /><br />-(void) setNumberOfShares:(int)n{<br />&nbsp; &nbsp;numberOfShares = n;<br />}<br /><br />-(float) totalStockValue{<br />&nbsp; &nbsp;return numberOfShares * valueInDollars;<br />}<br /><br />-(float) totalStockCost{<br />&nbsp; &nbsp;return numberOfShares * costInDollars;<br />}<br /><br />-(NSString *) nameOfStock;&nbsp; &nbsp;{<br />&nbsp; &nbsp;return nameOfStock;<br />}<br /><br />@end<br /></code></dd></dl><br /><br />Here is my main.m file below:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>//<br />//&nbsp; main.m<br />//&nbsp; Stocks<br />//<br />//&nbsp; Created by Stan Cromlish - Email on 5/16/12.<br />//&nbsp; Copyright (c) 2012 __MyCompanyName__. All rights reserved.<br />//<br /><br />#import &lt;Foundation/Foundation.h&gt;<br />#import &quot;StockHolding.h&quot;<br /><br />int main(int argc, const char * argv&#91;&#93;)<br />{<br /><br />&nbsp; &nbsp;@autoreleasepool {<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br /><br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// Create an instance<br />&nbsp; &nbsp;&nbsp; &nbsp;StockHolding *ibm = &#91;&#91;StockHolding alloc&#93; init&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;StockHolding *apl = &#91;&#91;StockHolding alloc&#93; init&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;StockHolding *google = &#91;&#91;StockHolding alloc&#93; init&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;//Set Stock Values<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm nameOfStock:(@&quot;IBM&quot;)&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm setNumberOfShares:10&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm setValueInDollars:20.75&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm setCostInDollars:11.75&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm totalStockValue&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;ibm totalStockCost&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &#91;apl nameOfStock:(@&quot;Apple&quot;)&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;apl setNumberOfShares:12&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;apl setValueInDollars:310.52&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;apl setCostInDollars:127.22&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;apl totalStockValue&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;apl totalStockCost&#93;;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google nameOfStock:(@&quot;Google&quot;)&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google setNumberOfShares:22&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google setValueInDollars:177.62&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google setCostInDollars:109.96&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google totalStockValue&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;google totalStockCost&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;//Create a Mutable Array<br />&nbsp; &nbsp;&nbsp; &nbsp;NSMutableArray *stocks = &#91;&#91;NSMutableArray alloc&#93; init&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;stocks addObject:ibm&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;stocks addObject:apl&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;&#91;stocks addObject:google&#93;;<br />&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;//print values in the array<br />&nbsp; &nbsp;&nbsp; &nbsp;for(StockHolding *n in stocks)<br />&nbsp; &nbsp;&nbsp; &nbsp;{<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;NSLog(@&quot;Stock %@ :Number of shares = %i Purchase price = %.2f Current price = %.2f&quot;,&#91;n nameOfStock&#93;,&#91;n numberOfShares&#93;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; ,&#91;n costInDollars&#93;,&#91;n valueInDollars&#93;);<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;NSLog(@&quot;The cost in dollars is %.2f&quot;,&#91;n totalStockCost&#93;);<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;NSLog(@&quot;The value in dollars is %.2f&quot;,&#91;n totalStockValue&#93;);<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp;}<br />&nbsp; &nbsp;}<br />&nbsp; &nbsp;return 0;<br />}</code></dd></dl><br /><br />What am I doing wrong?  It seems so straight forward.  Any help would be greatly appreciated.  Thanks<br /><br />Stan]]></summary>
    </entry>
    <entry>
        <title>23. Writing Files with NSString and NSData :: Re: return 1;    ...just wondering? :: Reply by ibex10</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=155&amp;t=4376&amp;p=10634#p10634"/>
        <published>2012-05-16T01:49:15+00:00</published>
        <updated>2012-05-16T01:49:15+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=155&amp;t=4376&amp;p=10634#p10634</id>
        <author>
            <name>ibex10</name>
        </author>
        <category term="23. Writing Files with NSString and NSData" />
        <content type="html"><![CDATA[In Unix world, thus in Mac OS world, the convention is to return 0 to the OS to indicate normal completion, and a nonzero value to indicate an abnormal completion.<br /><br />For example:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code><br />bool StartFoo ();<br /><br />int main (int nargs, char *argv &#91;&#93;)<br />{<br />&nbsp; &nbsp; &nbsp; if (StartFoo ())<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return 0;&nbsp; &nbsp; // started<br />&nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return 1;&nbsp; &nbsp; // did not start<br />}<br /><br /></code></dd></dl><br />The operating system will make this information, the value returned by <span style="font-weight: bold">main ()</span>, available to other programs if they ask for it.<br /><br />Your code fragment:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>if (!written) {<br />&nbsp; &nbsp;NSLog(@&quot;write failed: %@&quot;, &#91;error localizedDescription&#93;);<br />&nbsp; &nbsp;return 1;<br />}<br /></code></dd></dl><br />is returning a nozero value to signal that the write operation has failed.]]></content>
        <summary type="html"><![CDATA[In Unix world, thus in Mac OS world, the convention is to return 0 to the OS to indicate normal completion, and a nonzero value to indicate an abnormal completion.<br /><br />For example:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code><br />bool StartFoo ();<br /><br />int main (int nargs, char *argv &#91;&#93;)<br />{<br />&nbsp; &nbsp; &nbsp; if (StartFoo ())<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return 0;&nbsp; &nbsp; // started<br />&nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return 1;&nbsp; &nbsp; // did not start<br />}<br /><br /></code></dd></dl><br />The operating system will make this information, the value returned by <span style="font-weight: bold">main ()</span>, available to other programs if they ask for it.<br /><br />Your code fragment:<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>if (!written) {<br />&nbsp; &nbsp;NSLog(@&quot;write failed: %@&quot;, &#91;error localizedDescription&#93;);<br />&nbsp; &nbsp;return 1;<br />}<br /></code></dd></dl><br />is returning a nozero value to signal that the write operation has failed.]]></summary>
    </entry>
    <entry>
        <title>27. Your First iOS Application :: Where is the loop? :: Author gika30</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=159&amp;t=4380&amp;p=10640#p10640"/>
        <published>2012-05-16T05:08:46+00:00</published>
        <updated>2012-05-16T05:08:46+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=159&amp;t=4380&amp;p=10640#p10640</id>
        <author>
            <name>gika30</name>
        </author>
        <category term="27. Your First iOS Application" />
        <content type="html"><![CDATA[Maybe a stupid question, but I'm a little confused. Why the program in chapter 23 needed a run loop and this one doesn't? Where the program &quot;sits and waits&quot; for something to happen?]]></content>
        <summary type="html"><![CDATA[Maybe a stupid question, but I'm a little confused. Why the program in chapter 23 needed a run loop and this one doesn't? Where the program &quot;sits and waits&quot; for something to happen?]]></summary>
    </entry>
    <entry>
        <title>27. Your First iOS Application :: Re: Where is the loop? :: Reply by AaronHillegass</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=159&amp;t=4380&amp;p=10649#p10649"/>
        <published>2012-05-16T13:27:11+00:00</published>
        <updated>2012-05-16T13:27:11+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=159&amp;t=4380&amp;p=10649#p10649</id>
        <author>
            <name>AaronHillegass</name>
        </author>
        <category term="27. Your First iOS Application" />
        <content type="html"><![CDATA[In main.m, you should see line like this:<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>&nbsp; &nbsp; &nbsp; &nbsp; return UIApplicationMain(argc, argv, nil, NSStringFromClass(&#91;AppDelegate class&#93;));<br /></code></dd></dl><br /><br />UIApplicationMain() creates and starts the runloop for you.]]></content>
        <summary type="html"><![CDATA[In main.m, you should see line like this:<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>&nbsp; &nbsp; &nbsp; &nbsp; return UIApplicationMain(argc, argv, nil, NSStringFromClass(&#91;AppDelegate class&#93;));<br /></code></dd></dl><br /><br />UIApplicationMain() creates and starts the runloop for you.]]></summary>
    </entry>
    <entry>
        <title>29. init :: init vs other methods :: Author FreddyF</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=161&amp;t=4384&amp;p=10646#p10646"/>
        <published>2012-05-16T12:53:21+00:00</published>
        <updated>2012-05-16T12:53:21+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=161&amp;t=4384&amp;p=10646#p10646</id>
        <author>
            <name>FreddyF</name>
        </author>
        <category term="29. init" />
        <content type="html"><![CDATA[Hello,<br /><br />I have seen in the book 2 different ways to initialize an array :<br /><span style="font-weight: bold"><br />NSArray *array = [NSArray array];</span><br />(or NSArray *array = [NSArray arrayWithObjects:obj1, obj2, obj3, nil];)<br /><br />and <br /><br /><span style="font-weight: bold">NSArray *array = [[NSArray alloc]init];</span><br /><br /><br />Am I correct by saying that :<br />- both are possible,<br />- when it is possible, use the most precise method (array)<br />- [[xxx alloc]init] is a more general way to initialize an object, that is usable almost for every case<br /><br />Does that make sense ?<br /><br />Thanks<br />Fred]]></content>
        <summary type="html"><![CDATA[Hello,<br /><br />I have seen in the book 2 different ways to initialize an array :<br /><span style="font-weight: bold"><br />NSArray *array = [NSArray array];</span><br />(or NSArray *array = [NSArray arrayWithObjects:obj1, obj2, obj3, nil];)<br /><br />and <br /><br /><span style="font-weight: bold">NSArray *array = [[NSArray alloc]init];</span><br /><br /><br />Am I correct by saying that :<br />- both are possible,<br />- when it is possible, use the most precise method (array)<br />- [[xxx alloc]init] is a more general way to initialize an object, that is usable almost for every case<br /><br />Does that make sense ?<br /><br />Thanks<br />Fred]]></summary>
    </entry>
    <entry>
        <title>29. init :: Re: init vs other methods :: Reply by AaronHillegass</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=161&amp;t=4384&amp;p=10650#p10650"/>
        <published>2012-05-16T14:54:12+00:00</published>
        <updated>2012-05-16T14:54:12+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=161&amp;t=4384&amp;p=10650#p10650</id>
        <author>
            <name>AaronHillegass</name>
        </author>
        <category term="29. init" />
        <content type="html"><![CDATA[Before ARC there was a difference between<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>NSMutableArray *a1 = &#91;&#91;NSMutableArray alloc&#93; init&#93;;</code></dd></dl><br /><br />and<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>NSMutableArray *a2 = &#91;NSMutableArray array&#93;;</code></dd></dl><br /><br />(Trivia: a2 was autoreleased, a1 was not.)<br /><br />But, with ARC the two are exactly the same.<br /><br />Now, because <span style="font-weight: bold">init</span> is defined in <span style="font-weight: bold">NSObject</span> and other methods are not, you are always safe doing<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>Poodle *p = &#91;&#91;Poodle alloc&#93; init&#93;;<br /></code></dd></dl>]]></content>
        <summary type="html"><![CDATA[Before ARC there was a difference between<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>NSMutableArray *a1 = &#91;&#91;NSMutableArray alloc&#93; init&#93;;</code></dd></dl><br /><br />and<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>NSMutableArray *a2 = &#91;NSMutableArray array&#93;;</code></dd></dl><br /><br />(Trivia: a2 was autoreleased, a1 was not.)<br /><br />But, with ARC the two are exactly the same.<br /><br />Now, because <span style="font-weight: bold">init</span> is defined in <span style="font-weight: bold">NSObject</span> and other methods are not, you are always safe doing<br /><br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>Poodle *p = &#91;&#91;Poodle alloc&#93; init&#93;;<br /></code></dd></dl>]]></summary>
    </entry>
    <entry>
        <title>29. init :: Re: init vs other methods :: Reply by FreddyF</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=161&amp;t=4384&amp;p=10662#p10662"/>
        <published>2012-05-16T20:29:40+00:00</published>
        <updated>2012-05-16T20:29:40+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=161&amp;t=4384&amp;p=10662#p10662</id>
        <author>
            <name>FreddyF</name>
        </author>
        <category term="29. init" />
        <content type="html"><![CDATA[Thank you very much for your answer, Aaron<br />That makes things very clear.<br /><br />Fred]]></content>
        <summary type="html"><![CDATA[Thank you very much for your answer, Aaron<br />That makes things very clear.<br /><br />Fred]]></summary>
    </entry>
    <entry>
        <title>30. Properties :: Re: 'Copy' and mutable string :: Reply by FreddyF</title>
        <link rel="alternate" type="text/html" href="http://forums.bignerdranch.com/viewtopic.php?f=162&amp;t=3638&amp;p=10664#p10664"/>
        <published>2012-05-16T20:53:47+00:00</published>
        <updated>2012-05-16T20:53:47+00:00</updated>
        <id>http://forums.bignerdranch.com/viewtopic.php?f=162&amp;t=3638&amp;p=10664#p10664</id>
        <author>
            <name>FreddyF</name>
        </author>
        <category term="30. Properties" />
        <content type="html"><![CDATA[I too was confused, and Mikey's explanation just made it clear.<br /><br />So in our Ono-Lennon case, if I code this in main.c :<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>NSMutableString *x = &#91;&#91;NSMutableString alloc&#93;initWithString:@&quot;Ono&quot;&#93;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#91;myObj setLastName:x&#93;;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; NSLog(@&quot;1. x is %@, lastName of myObj is %@&quot;, x, &#91;myObj lastName&#93;);<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &#91;x appendString:@&quot; Lennon&quot;&#93;;<br />&nbsp; &nbsp; &nbsp; &nbsp; NSLog(@&quot;2. x is %@, lastName of myObj is %@&quot;, x, &#91;myObj lastName&#93;);<br /></code></dd></dl><br /><br />I'll get :<br />1. x is Ono, lastName of myObj is Ono<br />2. x is Ono Lennon, lastName of myObj is Ono<br /><br />Thanks a lot]]></content>
        <summary type="html"><![CDATA[I too was confused, and Mikey's explanation just made it clear.<br /><br />So in our Ono-Lennon case, if I code this in main.c :<br /><dl class="codebox"><dt>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></dt><dd><code>NSMutableString *x = &#91;&#91;NSMutableString alloc&#93;initWithString:@&quot;Ono&quot;&#93;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#91;myObj setLastName:x&#93;;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; NSLog(@&quot;1. x is %@, lastName of myObj is %@&quot;, x, &#91;myObj lastName&#93;);<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &#91;x appendString:@&quot; Lennon&quot;&#93;;<br />&nbsp; &nbsp; &nbsp; &nbsp; NSLog(@&quot;2. x is %@, lastName of myObj is %@&quot;, x, &#91;myObj lastName&#93;);<br /></code></dd></dl><br /><br />I'll get :<br />1. x is Ono, lastName of myObj is Ono<br />2. x is Ono Lennon, lastName of myObj is Ono<br /><br />Thanks a lot]]></summary>
    </entry>
</feed>

