<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1116854827513485317</id><updated>2011-11-30T17:45:46.607-08:00</updated><category term='$$$'/><category term='progress'/><category term='setback'/><title type='text'>The Journey of an iPhone Developer</title><subtitle type='html'>Getting to the App Store</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-6303577284717545104</id><published>2009-07-10T16:23:00.000-07:00</published><updated>2009-07-10T16:45:50.280-07:00</updated><title type='text'>Completed Pickers Tutorial</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_qbPFzJ1LR98/SlfOFqsh-3I/AAAAAAAAAPQ/Oq8II_BV6X4/s1600-h/Picture+4.png"&gt;&lt;img style="cursor: pointer; width: 216px; height: 400px;" src="http://1.bp.blogspot.com/_qbPFzJ1LR98/SlfOFqsh-3I/AAAAAAAAAPQ/Oq8II_BV6X4/s400/Picture+4.png" alt="" id="BLOGGER_PHOTO_ID_5356976878536227698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In this tutorial, I created a slot machine game using Tab Bars and Pickers. The game works by clicking the spin button, which will spin five reels at random. If three or more images line up in a row, a song is played and you win.&lt;br /&gt;&lt;br /&gt;Although this tutorial was primarily meant to be an introduction to Tab Bars and Pickers, this tutorial also taught me how to display images and plays sounds programmatically.&lt;br /&gt;&lt;br /&gt;For those interested in the tutorial, please see Chapter 7 in Dave Mark's "&lt;a href="http://www.amazon.com/gp/product/1430216263?ie=UTF8&amp;amp;tag=beepshare-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1430216263"&gt;Beginning iPhone Development: Exploring the iPhone SDK&lt;/a&gt;"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-6303577284717545104?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/6303577284717545104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/07/completed-pickers-tutorial.html#comment-form' title='41 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/6303577284717545104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/6303577284717545104'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/07/completed-pickers-tutorial.html' title='Completed Pickers Tutorial'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_qbPFzJ1LR98/SlfOFqsh-3I/AAAAAAAAAPQ/Oq8II_BV6X4/s72-c/Picture+4.png' height='72' width='72'/><thr:total>41</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-6604441026141771814</id><published>2009-07-10T16:12:00.001-07:00</published><updated>2009-07-10T16:12:57.985-07:00</updated><title type='text'>How do I find EXC_BAD_ACCESS bugs in a Cocoa project?</title><content type='html'>Q: How do I find EXC_BAD_ACCESS bugs in a Cocoa project?&lt;br /&gt;&lt;br /&gt;A: This kind of problem is usually the result of over-releasing an object. It can be very confusing, since the failure tends to occur well after the mistake is made. The crash can also occur while the program is deep in framework code, often with none of your own code visible in the stack.&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;To avoid problems like this, you must follow the Cocoa memory management rules. Refer to ADC's document "Memory Management Programming Guide for Cocoa". The section “Object Ownership and Disposal” describes the primary policy.&lt;br /&gt;&lt;br /&gt;http://developer.apple.com/qa/qa2004/qa1367.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-6604441026141771814?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/6604441026141771814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/07/how-do-i-find-excbadaccess-bugs-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/6604441026141771814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/6604441026141771814'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/07/how-do-i-find-excbadaccess-bugs-in.html' title='How do I find EXC_BAD_ACCESS bugs in a Cocoa project?'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-3040763674994747669</id><published>2009-07-06T10:52:00.000-07:00</published><updated>2009-07-10T16:14:20.700-07:00</updated><title type='text'>Objective-C: When should you use @class instead of #import</title><content type='html'>Say you're looking at AppController.h, which contains this code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;#import &lt;cocoa h=""&gt;&lt;/cocoa&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;@class PreferenceController;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;@interface AppController : NSObject&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;PreferenceController *preferenceController;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;-(IBAction)showPreferencePanel:(id)sender;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you are wondering why @class is used within AppController.h, Aaron Hillegass in "&lt;a href="http://www.amazon.com/gp/product/0321503619?ie=UTF8&amp;amp;tag=beepshare-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321503619"&gt;Cocoa(R) Programming for Mac(R) OS X (3rd Edition)&lt;/a&gt;" explains:&lt;br /&gt;&lt;br /&gt;The "@class PreferenceController;" line tells the compiler that there is a class PreferenceController. You can then make the following declaration without importing the header file for PreferenceController:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;PreferenceController *preferenceController;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You could replace&lt;br /&gt;&lt;br /&gt;@class PreferenceController;&lt;br /&gt;&lt;br /&gt;with&lt;br /&gt;&lt;br /&gt;#import "PreferenceController.h"&lt;br /&gt;&lt;br /&gt;The #import statement would import the header, and the compiler would learn PreferenceController was a class. Because the import command requires the compiler to parse more files, @class will often result in faster builds.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-3040763674994747669?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/3040763674994747669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/07/import-versus-class-why-would-i-use.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/3040763674994747669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/3040763674994747669'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/07/import-versus-class-why-would-i-use.html' title='Objective-C: When should you use @class instead of #import'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-386636100146149304</id><published>2009-06-24T17:24:00.001-07:00</published><updated>2009-07-10T16:14:56.498-07:00</updated><title type='text'>A way to display all possible typeahead values in XCode</title><content type='html'>As you enter code into the XCode IDE, the IDE will often attempt to complete the term for you by using a typeahead feature. To view all possible values that match the type-ahead, simply press the escape key when a partial term is displayed.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_qbPFzJ1LR98/SkLG0vNEUfI/AAAAAAAAAOk/U2ye1Wj1Ln0/s1600-h/Picture+1.png"&gt;&lt;img style="cursor: pointer; width: 400px; height: 148px;" src="http://3.bp.blogspot.com/_qbPFzJ1LR98/SkLG0vNEUfI/AAAAAAAAAOk/U2ye1Wj1Ln0/s400/Picture+1.png" alt="" id="BLOGGER_PHOTO_ID_5351057916596343282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From Dave Mark's "&lt;a href="http://www.amazon.com/gp/product/1430216263?ie=UTF8&amp;amp;tag=beepshare-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1430216263"&gt;Beginning iPhone Development: Exploring the iPhone SDK&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=beepshare-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1430216263" alt="" style="border: medium none  ! important; margin: 0px ! important;" border="0" height="1" width="1" /&gt;"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-386636100146149304?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/386636100146149304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/how-to-display-all-possible-typeahead.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/386636100146149304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/386636100146149304'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/how-to-display-all-possible-typeahead.html' title='A way to display all possible typeahead values in XCode'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_qbPFzJ1LR98/SkLG0vNEUfI/AAAAAAAAAOk/U2ye1Wj1Ln0/s72-c/Picture+1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-2979362168424867601</id><published>2009-06-22T14:48:00.000-07:00</published><updated>2009-07-10T16:17:29.200-07:00</updated><title type='text'>A shortcut to perform a keyword look-up within the XCode IDE</title><content type='html'>To look up a constant, variable, method or function in iPhone's documentation library diretly from within the XCode IDE,  simply option+double-click on the term.&lt;br /&gt;&lt;br /&gt;From Dave Mark's "&lt;a href="http://www.amazon.com/gp/product/1430216263?ie=UTF8&amp;amp;tag=beepshare-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1430216263"&gt;Beginning iPhone Development: Exploring the iPhone SDK&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=beepshare-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1430216263" alt="" style="border: medium none  ! important; margin: 0px ! important;" border="0" height="1" width="1" /&gt;"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-2979362168424867601?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/2979362168424867601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/shortcut-to-lookup-any-word-in-iphones.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/2979362168424867601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/2979362168424867601'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/shortcut-to-lookup-any-word-in-iphones.html' title='A shortcut to perform a keyword look-up within the XCode IDE'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-2510611681138095147</id><published>2009-06-21T21:33:00.001-07:00</published><updated>2009-06-21T22:36:34.646-07:00</updated><title type='text'>Differences between Cocoa and Cocoa Touch</title><content type='html'>I learned...&lt;br /&gt;&lt;br /&gt;According to Dave Mark in "&lt;a href="http://www.amazon.com/gp/product/1430216263?ie=UTF8&amp;amp;tag=beepshare-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1430216263"&gt;Beginning iPhone Development: Exploring the iPhone SDK&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=beepshare-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1430216263" alt="" style="border: medium none  ! important; margin: 0px ! important;" border="0" height="1" width="1" /&gt;":&lt;br /&gt;&lt;br /&gt;"If you are coming to iPhone with previous Cocoa experience, a few tools that you're probably accustomed to using aren't available on the iPhone. &lt;span style="font-weight: bold;"&gt;The iPhone SDK doesn't support Core Data or Cocoa Bindings&lt;/span&gt;. We mentioned earlier that Cocoa Touch uses Objective C 2.0, but one of the key new features of that language is not available on iPhone: &lt;span style="font-weight: bold;"&gt;Cocoa Touch does not support garbage collection&lt;/span&gt;."&lt;br /&gt;&lt;br /&gt;Its a good thing I spent a lot of time reviewing memory management. It looks like those retain and release statements will come in handy. I'm also glad I  stopped at Chapter 8 in "&lt;a href="http://www.amazon.com/gp/product/0321503619?ie=UTF8&amp;amp;tag=beepshare-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321503619"&gt;Cocoa(R) Programming for Mac(R) OS X (3rd Edition)&lt;/a&gt;" and picked up this new book. Core Data was only a few chapters away and I would have wasted lots of precious time learning something I wouldn't be able to use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-2510611681138095147?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/2510611681138095147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/differences-between-cocoa-and-cocoa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/2510611681138095147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/2510611681138095147'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/differences-between-cocoa-and-cocoa.html' title='Differences between Cocoa and Cocoa Touch'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-8028883298086272069</id><published>2009-06-21T21:29:00.000-07:00</published><updated>2009-07-10T16:18:09.880-07:00</updated><title type='text'>Currently reading "Beginning iPhone Development: Exploring the iPhone SDK" by Dave Mark &amp; Jeff LaMarche</title><content type='html'>&lt;iframe src="http://rcm.amazon.com/e/cm?t=beepshare-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=1430216263&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="width: 120px; height: 240px;" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;This Purchase: &lt;/span&gt;&lt;span&gt;$26.39&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; | Running Total: &lt;/span&gt;&lt;span&gt;$3008.11&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-8028883298086272069?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/8028883298086272069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/moving-onto-beginning-iphone.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/8028883298086272069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/8028883298086272069'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/moving-onto-beginning-iphone.html' title='Currently reading &quot;Beginning iPhone Development: Exploring the iPhone SDK&quot; by Dave Mark &amp; Jeff LaMarche'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-8470702620994271505</id><published>2009-06-21T19:43:00.000-07:00</published><updated>2009-07-10T16:18:48.736-07:00</updated><title type='text'>The Benefit of Key-Value Coding</title><content type='html'>I am learning about Key-Value coding in Chapter 7 of "&lt;a href="http://www.amazon.com/gp/product/0321503619?ie=UTF8&amp;amp;tag=beepshare-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321503619"&gt;Cocoa(R) Programming for Mac(R) OS X (3rd Edition)&lt;/a&gt;".&lt;br /&gt;&lt;br /&gt;I would say the most important lesson from this chapter is knowing what accessor methods are and when they get called. The author's tutorial in this chapter clearly demonstrates this behavior. In the tutorial, I implemented an AppController with two accessor methods "set" and "get".&lt;br /&gt;&lt;br /&gt;The implementation of these methods were fundamentally simply.&lt;br /&gt;&lt;br /&gt;"set" sets an instance variable in the AppController class to a specified value&lt;br /&gt;"get" returns that value&lt;br /&gt;&lt;br /&gt;The "set" accessor method got called when I used "setValue ... forKey".&lt;br /&gt;e.g.  [self &lt;span style="font-weight: bold;"&gt;setValue&lt;/span&gt;:[NSNumber numberWithInt:5] &lt;span style="font-weight: bold;"&gt;forKey&lt;/span&gt;:@"fido"];&lt;br /&gt;&lt;br /&gt;The "get" accessor method got called when I used "valueForKey".&lt;br /&gt;e.g. NSNumber *n = [self &lt;span style="font-weight: bold;"&gt;valueForKey&lt;/span&gt;:@"fido"];&lt;br /&gt;&lt;br /&gt;The tutorial helped illustrate this by having me issue NSLog calls from within each accessor method. I was also taught how to bind key-value code to a graphical object, in this case a slider. When the slider moved, the NSLog calls showed the set and get methods being called in the GDB debug console window.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-8470702620994271505?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/8470702620994271505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/key-value-coding.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/8470702620994271505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/8470702620994271505'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/key-value-coding.html' title='The Benefit of Key-Value Coding'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-4225429972675687484</id><published>2009-06-18T14:15:00.001-07:00</published><updated>2009-07-10T16:19:23.126-07:00</updated><title type='text'>How to create a new instance of an AppController in the NIB</title><content type='html'>Following the steps in Aaron Hillegass' SpeakLine tutorial in Chapter 5 of "&lt;a href="http://www.amazon.com/gp/product/0321503619?ie=UTF8&amp;amp;tag=beepshare-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321503619"&gt;Cocoa(R) Programming for Mac(R) OS X (3rd Edition)&lt;/a&gt;", I got lost on how to add the AppController to the nib. I found out this is what you need to do:&lt;br /&gt;&lt;br /&gt;Assuming you've already added the "AppController.m" and "AppController.h" Objective C files to your project.&lt;br /&gt;&lt;br /&gt;1. From Interface Builder, go to Tools &gt; Library&lt;br /&gt;2. Find NSObject under "Library - Cocoa - Objects &amp;amp; Controllers"&lt;br /&gt;3. Drag that into the NIB window (i.e. - MainMenu.xib)&lt;br /&gt;4. Rename the new NSObject to "AppController"&lt;br /&gt;5. With the "AppController" object highlighted, go to Tools &gt; Identity Inspector, drill down on the "Class" field and select "AppController"&lt;br /&gt;6. Your AppController class is now added to the nib&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-4225429972675687484?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/4225429972675687484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/how-to-create-new-instance-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/4225429972675687484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/4225429972675687484'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/how-to-create-new-instance-of.html' title='How to create a new instance of an AppController in the NIB'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-2989564274082604962</id><published>2009-06-18T13:24:00.000-07:00</published><updated>2009-07-10T16:20:03.681-07:00</updated><title type='text'>Accessor Methods: "Retain, then Release" methodology</title><content type='html'>From "&lt;a href="http://www.amazon.com/gp/product/0321503619?ie=UTF8&amp;amp;tag=beepshare-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321503619"&gt;Cocoa(R) Programming for Mac(R) OS X (3rd Edition)&lt;/a&gt;" by Aaron Hillegass&lt;br /&gt;&lt;br /&gt;If you have a nonpointer type, the accessor methods are quite simple. For example, if your class has an instance variable called foo of type int, you would create the following accessor methods:&lt;br /&gt;&lt;br /&gt;- (int)foo&lt;br /&gt;{&lt;br /&gt;       return foo;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;-(void)setFoo:(int)x&lt;br /&gt;{&lt;br /&gt;       foo = x;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;MATTERS BECOME MORE COMPLICATED IF FOO IS A POINTER TO AN OBJECT. In the "setter" method, you need to make sure that the new value is retained and the old value released, as shown below:&lt;br /&gt;&lt;br /&gt;-(void)setFoo:(NSCalendarDate *)x&lt;br /&gt;{&lt;br /&gt;       [x retain];&lt;br /&gt;       [foo release];&lt;br /&gt;       foo = x;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-2989564274082604962?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/2989564274082604962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/accessor-methods-retain-then-release.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/2989564274082604962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/2989564274082604962'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/accessor-methods-retain-then-release.html' title='Accessor Methods: &quot;Retain, then Release&quot; methodology'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-6064224004556543756</id><published>2009-06-17T21:38:00.000-07:00</published><updated>2009-07-10T16:20:42.077-07:00</updated><title type='text'>I installed XCode but cannot find the executable. Where does it get installed?</title><content type='html'>Once you download and install XCode, the executable can be found here:&lt;br /&gt;&lt;br /&gt;Macintosh HD &gt; Developer &gt; Applications &gt; XCode&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-6064224004556543756?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/6064224004556543756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/where-is-xcode-installed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/6064224004556543756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/6064224004556543756'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/where-is-xcode-installed.html' title='I installed XCode but cannot find the executable. Where does it get installed?'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-613035221759238379</id><published>2009-06-17T20:12:00.000-07:00</published><updated>2009-06-17T21:44:32.374-07:00</updated><title type='text'>Debugging "objc[17695]: FREED(id): message release sent to freed object=0x1073d0"</title><content type='html'>Here's a good article on how to troubleshoot these kinds of errors:&lt;br /&gt;&lt;a href="http://www.cocoadev.com/index.pl?DebuggingAutorelease"&gt;http://www.cocoadev.com/index.pl?DebuggingAutorelease&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Taken from the article:&lt;br /&gt;&lt;p&gt; One of the most opaque bugs I've had to deal with in Cocoa is leaving a released object in the autorelease pool, causing an EXC_BAD_ACCESS in NSPopAutoreleasePool&lt;a href="http://www.cocoadev.com/index.pl?edit=NSPopAutoreleasePool"&gt;?&lt;/a&gt;().  When this happens, it's pretty much impossible to tell what the doubly-released object was and where it was instantiated. &lt;/p&gt;&lt;p&gt; Fear no more!  Using Cocoa's NSZombie&lt;a href="http://www.cocoadev.com/index.pl?edit=NSZombie"&gt;?&lt;/a&gt; debugging class and the command-line malloc_history tool, we can nail this bug in a pinch. &lt;/p&gt;&lt;p&gt; Suppose you have the following (obviously incorrect) code: &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;blockquote&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;  &lt;a href="http://www.cocoadev.com/index.pl?NSAutoreleasePool"&gt;NSAutoreleasePool&lt;/a&gt;* pool = [[&lt;a href="http://www.cocoadev.com/index.pl?NSAutoreleasePool"&gt;NSAutoreleasePool&lt;/a&gt; alloc] init];&lt;br /&gt; &lt;a href="http://www.cocoadev.com/index.pl?NSData"&gt;NSData&lt;/a&gt;* data = [&lt;a href="http://www.cocoadev.com/index.pl?NSData"&gt;NSData&lt;/a&gt; dataWithBytes:"asklaskdxjgr" length:12];&lt;br /&gt;&lt;br /&gt; [data release];&lt;br /&gt; [pool release];&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt; The dataWithBytes: method sends an autorelease message to the created object, so we don't need to release it ourselves. When the autorelease pool is tossed the freed data object gets another release message, our app crashes, and we have no idea why. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;The dataWithBytes: method sends an autorelease message to the created object, so we don't need to release it ourselves. When the autorelease pool is tossed the freed data object gets another release message, our app crashes, and we have no idea why. &lt;/p&gt;&lt;p&gt; Here's what we do: &lt;/p&gt;&lt;p&gt; Click on the "Targets" tab, open "Executables" and select the app (In &lt;a href="http://www.cocoadev.com/index.pl?XCode"&gt;XCode&lt;/a&gt; 2.0, double-click the executable in the file tree and select the arguments tab to enter environment variables). In the executable settings, add the following environment variables and set their values to "YES" (without the quotes): &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;blockquote&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;  NSDebugEnabled&lt;br /&gt;&lt;a href="http://www.cocoadev.com/index.pl?NSZombieEnabled"&gt;NSZombieEnabled&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.cocoadev.com/index.pl?MallocStackLogging"&gt;MallocStackLogging&lt;/a&gt;&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt; You may also want the following environment variable set to YES: &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;blockquote&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;  MallocStackLoggingNoCompact&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt; With &lt;a href="http://www.cocoadev.com/index.pl?NSZombieEnabled"&gt;NSZombieEnabled&lt;/a&gt;, Cocoa sets an object's isa pointer to the NSZombie&lt;a href="http://www.cocoadev.com/index.pl?edit=NSZombie"&gt;?&lt;/a&gt; class when its retain count drops to zero instead of deallocating it.  Then when you send a message to an NSZombie&lt;a href="http://www.cocoadev.com/index.pl?edit=NSZombie"&gt;?&lt;/a&gt; object (i.e., you're accessing freed data), it raises an exception and tells you where the object lives: &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;blockquote&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;  2003-03-18 13:01:38.644 autoreleasebug[3939] *** *** Selector 'release'&lt;br /&gt;sent to dealloced instance 0xa4e10 of class NSConcreteData.&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt; Since you have &lt;a href="http://www.cocoadev.com/index.pl?MallocStackLogging"&gt;MallocStackLogging&lt;/a&gt; turned on, you can now run "malloc_history &lt;pid&gt; &lt;/pid&gt;&lt;/p&gt;&lt;address&gt;" to see the stack trace when the object was allocated: &lt;p&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/address&gt;&lt;blockquote&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;  [dave@host193 Frameworks]$ malloc_history 3939 0xa4e10&lt;br /&gt;&lt;br /&gt;Call [2] [arg=32]: thread_a0000dec |0x1000 | start | _start | main |&lt;br /&gt;+[&lt;a href="http://www.cocoadev.com/index.pl?NSData"&gt;NSData&lt;/a&gt; dataWithBytes:length:] | NSAllocateObject | object_getIndexedIvars |&lt;br /&gt;malloc_zone_calloc &lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt; if you run under gdb, you may enter: &lt;/p&gt;&lt;blockquote&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt; (gdb) shell malloc_history 3939 0xa4e10&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt; And there it is: the double-released object was allocated with [&lt;a href="http://www.cocoadev.com/index.pl?NSData"&gt;NSData&lt;/a&gt; dataWithBytes:length:] in the function main()! &lt;/p&gt;&lt;p&gt; I love you, Cocoa! &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-613035221759238379?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/613035221759238379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/debugging-objc17695-freedid-message.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/613035221759238379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/613035221759238379'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/debugging-objc17695-freedid-message.html' title='Debugging &quot;objc[17695]: FREED(id): message release sent to freed object=0x1073d0&quot;'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-3844641325874633197</id><published>2009-06-16T17:51:00.000-07:00</published><updated>2009-07-10T16:22:11.914-07:00</updated><title type='text'>Currently Reading "Cocoa(R) Programming for Mac(R) OS X (3rd Edition)" by Aaron Hillegass</title><content type='html'>&lt;iframe src="http://rcm.amazon.com/e/cm?t=beepshare-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=0321503619&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="width: 120px; height: 240px;" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;This Purchase: &lt;/span&gt;&lt;span&gt;$26.97&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; | Running Total: &lt;/span&gt;&lt;span&gt;$2981.72 &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-3844641325874633197?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/3844641325874633197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/picking-up-cocoar-programming-for-macr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/3844641325874633197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/3844641325874633197'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/picking-up-cocoar-programming-for-macr.html' title='Currently Reading &quot;Cocoa(R) Programming for Mac(R) OS X (3rd Edition)&quot; by Aaron Hillegass'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-2896179408422330053</id><published>2009-06-16T17:50:00.000-07:00</published><updated>2009-07-10T16:21:33.393-07:00</updated><title type='text'>Before moving on. I think I really need to learn Objective C</title><content type='html'>So far, I've encountered enough code in Objective C in the Apple iPhone documentation to say that I'm lost Being new to the iPhone, with no prior experience in Cocoa nor Objective C, I found myself getting very little out of the articles I've read so far from Apple's dev center. I thought since I already knew how to program in Java, C, C++ and PHP that I would have enough of a programming background to learn Objective C as I go along but I was wrong. I found Objective C to be a language unlike any other I've ever seen before.&lt;br /&gt;&lt;br /&gt;Today, I made the decision to spend some more time to focus on learning Objective C. Hopefully after a weeks time I'll have a stronger grasp of the language and then get back on track to create this iPhone application.&lt;br /&gt;&lt;br /&gt;As a first step towards becoming more proficient in Objective C, I went to the bookstore today and picked up a book called "Cocoa Programming for Mac OS X".  Chapter 3 is about Objective C and I found it to be a very well written and easy to digest introduction to the Objective C programming language. The introduction provided me with answers to a lot of the questions I had about the code snip-its in previous articles, such as why we use brackets so much [ ], why functions begin with -, why we don't explicitly declare private, protected and public classes and why Objective C makes such liberal use of the '@' character, to name a few.&lt;br /&gt;&lt;br /&gt;Now, not only do I better understand what is going on, but I am beginning to see a benefit to doing things in Objective C. Check out Chatper 3 for yourself and you'll be surprised at how fast you will learn. The book is written by Aaron Hillegass and I highly recommend it:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=beepshare-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=0321503619&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="width: 120px; height: 240px;" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I'll be spending the next week reading this book and I'll be going through this Objective C tutorial published by Apple.&lt;br /&gt;&lt;br /&gt;&lt;h3 class="r"&gt;&lt;a href="http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fdeveloper.apple.com%2Fdocumentation%2Fcocoa%2Fconceptual%2FobjectiveC%2Fobjc.pdf&amp;amp;ei=7us2SvKRMYyIsgOorbTSBQ&amp;amp;usg=AFQjCNGGAsP7LqzzUCAsk3hYVoVtPCmbiA&amp;amp;sig2=Pgh5PzxW3SmkCRJY7HmjbA" class="l" onmousedown="return rwt(this,'','','res','1','AFQjCNGGAsP7LqzzUCAsk3hYVoVtPCmbiA','&amp;amp;sig2=Pgh5PzxW3SmkCRJY7HmjbA')"&gt;&lt;em&gt;Apple Objective&lt;/em&gt;-&lt;em&gt;C&lt;/em&gt; Tutorial &lt;em&gt;PDF&lt;/em&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-2896179408422330053?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/2896179408422330053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/iphone-programming-must-read-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/2896179408422330053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/2896179408422330053'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/iphone-programming-must-read-for.html' title='Before moving on. I think I really need to learn Objective C'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-319724508192033538</id><published>2009-06-15T15:41:00.000-07:00</published><updated>2009-06-15T15:59:09.265-07:00</updated><title type='text'>Memory Management: alloc vs. convenience constructor vs. accessor method. What is the difference and which is preferred?</title><content type='html'>&lt;p&gt;The following simple examples illustrate the contrast between creating a new object using &lt;code&gt;alloc&lt;/code&gt;, using a convenience constructor, and using an accessor method.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;The first example creates a new string object using &lt;/span&gt;&lt;code style="font-weight: bold;"&gt;alloc&lt;/code&gt;&lt;span style="font-weight: bold;"&gt;: &lt;/span&gt;&lt;span style="font-style: italic;"&gt;It must therefore be released.&lt;/span&gt;&lt;/p&gt;&lt;div class="codesample"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;- (void)printHello {&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    NSString *string;&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    string = [[NSString alloc] initWithString:@"Hello"];&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    NSLog(string);&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    [string release];&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;}&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;The second example creates a new string object using a convenience constructor: &lt;/span&gt;&lt;span style="font-style: italic;"&gt;There is no additional work to do.&lt;/span&gt;&lt;/p&gt;&lt;div class="codesample"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;- (void)printHello {&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    NSString *string;&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    string = [NSString stringWithFormat:@"Hello"];&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    NSLog(string);&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;}&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;The third example retrieves a string object using an accessor method: &lt;/span&gt;&lt;span style="font-style: italic;"&gt;As with the convenience constructor, &lt;/span&gt;&lt;span style="font-style: italic;"&gt;there is no additional work to do.&lt;/span&gt;&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;- (void)printWindowTitle {&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    NSString *string;&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    string = [myWindow title];&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    NSLog(string);&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;According to Apple, using accessor methods is the preferred way to go. "Sometimes it might seem tedious or pedantic, but if you use accessor methods consistently the chances of having problems with memory&lt;br /&gt;management decrease considerably. If you are using &lt;code&gt;retain&lt;/code&gt; and &lt;code&gt;release&lt;/code&gt; on instance variables throughout your code, you are almost certainly doing the wrong thing."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html"&gt;http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html&lt;/a&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-319724508192033538?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/319724508192033538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/memory-management-3-ways-to-create.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/319724508192033538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/319724508192033538'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/memory-management-3-ways-to-create.html' title='Memory Management: alloc vs. convenience constructor vs. accessor method. What is the difference and which is preferred?'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-1012824412005429114</id><published>2009-06-15T15:35:00.001-07:00</published><updated>2009-06-15T15:47:05.543-07:00</updated><title type='text'>Memory Management: rules to always keep in mind</title><content type='html'>&lt;ul class="ul"&gt;&lt;li class="li"&gt;&lt;p&gt;Within a given block of code, the number of times you use &lt;code&gt;copy&lt;/code&gt;, &lt;code&gt;alloc&lt;/code&gt; and &lt;code&gt;retain&lt;/code&gt; should equal the number of times you use &lt;code&gt;release&lt;/code&gt; and &lt;code&gt;autorelease&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li class="li"&gt;&lt;p&gt;You only own objects you created using a method whose name begins with “alloc” or “new” or contains “copy” (for example, &lt;code&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/occ/clm/NSObject/alloc" target="_top"&gt;alloc&lt;/a&gt;&lt;/code&gt;, &lt;code&gt;&lt;!--a target="_top" --&gt;newObject&lt;!--/a--&gt;&lt;/code&gt;, or &lt;code&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/mutableCopy" target="_top"&gt;mutableCopy&lt;/a&gt;&lt;/code&gt;), or if you send it a &lt;code&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html#//apple_ref/occ/intfm/NSObject/retain" target="_top"&gt;retain&lt;/a&gt;&lt;/code&gt; message.&lt;/p&gt;&lt;/li&gt;&lt;li class="li"&gt;&lt;p&gt;Implement a &lt;code&gt;dealloc&lt;/code&gt; method to release the instance variables you own.&lt;/p&gt;&lt;/li&gt;&lt;li class="li"&gt;&lt;p&gt;You should never invoke &lt;code&gt;dealloc&lt;/code&gt; directly (other than when you invoke super’s implementation in a custom &lt;code&gt;dealloc&lt;/code&gt; method).&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;pre&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html"&gt;http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html&lt;/a&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-1012824412005429114?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/1012824412005429114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/memory-management-rules.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/1012824412005429114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/1012824412005429114'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/memory-management-rules.html' title='Memory Management: rules to always keep in mind'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-1251790943687856657</id><published>2009-06-15T11:54:00.000-07:00</published><updated>2009-06-15T15:46:38.548-07:00</updated><title type='text'>Memory Management: “reference counting” methods</title><content type='html'>You manipulate the retain count (take and relinquish ownership) using a variety of methods:&lt;dl class="termdef"&gt;&lt;dl class="content_text"&gt;&lt;b&gt;&lt;code&gt;alloc&lt;/code&gt;&lt;/b&gt;&lt;dd&gt;&lt;p&gt;Allocates memory for an object, and returns it with retain count of &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;You own objects you create using any method that starts with the word &lt;code&gt;alloc&lt;/code&gt; or with the word &lt;code&gt;new&lt;/code&gt;.&lt;/p&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;dl class="content_text"&gt;&lt;b&gt;&lt;code&gt;copy&lt;/code&gt;&lt;/b&gt;&lt;dd&gt;&lt;p&gt;Makes a copy of an object, and returns it with retain count of &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;If you copy an object, you own the copy. This applies to any method that contains the word &lt;code&gt;copy&lt;/code&gt; where “copy” refers to the object being returned.&lt;/p&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;dl class="content_text"&gt;&lt;b&gt;&lt;code&gt;retain&lt;/code&gt;&lt;/b&gt;&lt;dd&gt;&lt;p&gt;Increases the retain count of an object by &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Takes ownership of an object.&lt;/p&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;dl class="content_text"&gt;&lt;b&gt;&lt;code&gt;release&lt;/code&gt;&lt;/b&gt;&lt;dd&gt;&lt;p&gt;Decreases the retain count of an object by &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Relinquishes ownership of an object.&lt;/p&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;dl class="content_text"&gt;&lt;b&gt;&lt;code&gt;autorelease&lt;/code&gt;&lt;/b&gt;&lt;dd&gt;&lt;p&gt;Decreases the reference count of an object by &lt;code&gt;1&lt;/code&gt; at some stage in the future.&lt;/p&gt;&lt;p&gt;Relinquishes ownership of an object at some stage in the future.&lt;/p&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/dl&gt;&lt;p&gt;The rules for memory management are summarized as follows (see also &lt;span class="content_text"&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html#//apple_ref/doc/uid/20000994-BAJHFBGH"&gt;“Memory Management Rules”&lt;/a&gt;&lt;/span&gt;):&lt;/p&gt;&lt;ul class="ul"&gt;&lt;li class="li"&gt;&lt;p&gt;Within a given block of code, the number of times you use &lt;code&gt;copy&lt;/code&gt;, &lt;code&gt;alloc&lt;/code&gt; and &lt;code&gt;retain&lt;/code&gt; should equal the number of times you use &lt;code&gt;release&lt;/code&gt; and &lt;code&gt;autorelease&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li class="li"&gt;&lt;p&gt;You only own objects you created using a method whose name begins with “alloc” or “new” or contains “copy” (for example, &lt;code&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/occ/clm/NSObject/alloc" target="_top"&gt;alloc&lt;/a&gt;&lt;/code&gt;, &lt;code&gt;&lt;!--a target="_top" --&gt;newObject&lt;!--/a--&gt;&lt;/code&gt;, or &lt;code&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/mutableCopy" target="_top"&gt;mutableCopy&lt;/a&gt;&lt;/code&gt;), or if you send it a &lt;code&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html#//apple_ref/occ/intfm/NSObject/retain" target="_top"&gt;retain&lt;/a&gt;&lt;/code&gt; message.&lt;/p&gt;&lt;/li&gt;&lt;li class="li"&gt;&lt;p&gt;Implement a &lt;code&gt;dealloc&lt;/code&gt; method to release the instance variables you own.&lt;/p&gt;&lt;/li&gt;&lt;li class="li"&gt;&lt;p&gt;You should never invoke &lt;code&gt;dealloc&lt;/code&gt; directly (other than when you invoke super’s implementation in a custom &lt;code&gt;dealloc&lt;/code&gt; method).&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;pre&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html"&gt;http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html&lt;/a&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-1251790943687856657?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/1251790943687856657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/memory-management-concepts-reference_15.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/1251790943687856657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/1251790943687856657'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/memory-management-concepts-reference_15.html' title='Memory Management: “reference counting” methods'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-4397930407019134442</id><published>2009-06-15T11:45:00.000-07:00</published><updated>2009-06-15T15:34:14.649-07:00</updated><title type='text'>Memory Management: “reference counting” overview</title><content type='html'>&lt;p&gt;Cocoa implements its ownership policy through a mechanism called “reference counting” or “retain counting.” When you create an object, it has a retain count of &lt;code&gt;1&lt;/code&gt;. When you send an object a &lt;code&gt;retain&lt;/code&gt; message, its retain count is increased by &lt;code&gt;1&lt;/code&gt;. When you send an object a &lt;code&gt;release&lt;/code&gt; message, its retain count is decreased by &lt;code&gt;1&lt;/code&gt; (&lt;code&gt;autorelease&lt;/code&gt; causes the retain count to be decremented in the future). &lt;/p&gt;&lt;p&gt;When its retain count drops to &lt;code&gt;0&lt;/code&gt;, an object’s memory is reclaimed—in Cocoa terminology it is “freed” or “deallocated.” When an object is deallocated, its &lt;code&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/dealloc" target="_top"&gt;dealloc&lt;/a&gt;&lt;/code&gt; method is invoked automatically. The role of the &lt;code&gt;dealloc&lt;/code&gt; method is to free the object's own memory, and dispose of any resources it holds, including its object instance variables.&lt;/p&gt;&lt;p&gt;If your class has object instance variables, you must implement a &lt;code&gt;dealloc&lt;/code&gt; method that releases them, and then invokes super's implementation. For example, if the Thingamajig class had &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;sprockets&lt;/code&gt; instance variables, you would implement its &lt;code&gt;dealloc&lt;/code&gt; method as follows: &lt;/p&gt;&lt;div class="codesample"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;- (void)dealloc&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;{&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    [sprockets release];&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    [name release];&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;    [super dealloc];&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;}&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;You should never invoke another object’s &lt;code&gt;dealloc&lt;/code&gt; method directly.&lt;/p&gt;&lt;p&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmObjectOwnership.html#//apple_ref/doc/uid/20000043-BEHDEDDB"&gt;http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmObjectOwnership.html#//apple_ref/doc/uid/20000043-BEHDEDDB&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-4397930407019134442?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/4397930407019134442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/memory-management-concepts-reference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/4397930407019134442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/4397930407019134442'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/memory-management-concepts-reference.html' title='Memory Management: “reference counting” overview'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-8891270345465480657</id><published>2009-06-15T08:15:00.001-07:00</published><updated>2009-06-15T11:58:28.666-07:00</updated><title type='text'>Implementing Accessor Methods: @synthesize</title><content type='html'>&lt;p&gt;In many cases you can (and should) avoid the need to implement your own accessor methods by using the Objective-C declared properties feature and asking the compiler to synthesize accessor methods for you:&lt;/p&gt;&lt;div class="codesample"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;@synthesize firstName;&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;@synthesize fullName;&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;@synthesize birthday;&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;@synthesize luckyNumber;&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Even if you need to provide your own implementation, you should declare accessors using a declared property—you must ensure, of course, that your implementation meets the specification you give. (Note in particular that by default a declared property is atomic; if you don’t provide an atomic implementation, you should specify &lt;code&gt;nonatomic&lt;/code&gt; in the declaration.)&lt;/p&gt;&lt;p&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAccessorMethods.html#//apple_ref/doc/uid/TP40003539-SW1"&gt;http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAccessorMethods.html#//apple_ref/doc/uid/TP40003539-SW1&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-8891270345465480657?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/8891270345465480657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/synthesize.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/8891270345465480657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/8891270345465480657'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/synthesize.html' title='Implementing Accessor Methods: @synthesize'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-4544722434274180664</id><published>2009-06-15T08:14:00.001-07:00</published><updated>2009-06-15T11:58:54.643-07:00</updated><title type='text'>Declaring Accessor Methods: @property</title><content type='html'>&lt;p&gt;You should typically use the Objective-C declared properties feature to declare accessor methods (see &lt;span class="content_text"&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocProperties.html#//apple_ref/doc/uid/TP30001163-CH17" target="_top"&gt;Declared Properties&lt;/a&gt;&lt;/span&gt; in &lt;em&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/ObjectiveC/index.html#//apple_ref/doc/uid/TP30001163" target="_top"&gt;The Objective-C 2.0 Programming Language&lt;/a&gt;&lt;/em&gt;), for example:&lt;/p&gt;&lt;div class="codesample"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;@property (copy) NSString *firstName;&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;@property (readonly) NSString *fullName;&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;@property (retain) NSDate *birthday;&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td scope="row"&gt;&lt;pre&gt;@property NSInteger luckyNumber;&lt;span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The declaration makes explicit the memory management semantics for the property.&lt;/p&gt;&lt;p&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAccessorMethods.html#//apple_ref/doc/uid/TP40003539-SW1"&gt;http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAccessorMethods.html#//apple_ref/doc/uid/TP40003539-SW1&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-4544722434274180664?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/4544722434274180664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/property.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/4544722434274180664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/4544722434274180664'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/property.html' title='Declaring Accessor Methods: @property'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-9160581506751369162</id><published>2009-06-12T19:39:00.000-07:00</published><updated>2009-06-12T20:13:36.055-07:00</updated><title type='text'>Lessons from the HelloWorld application</title><content type='html'>Creating the HelloWorld application opened my eyes to several things. Firstly, Objective-C and Cocoa are unlike any other programming language I've ever learned. The syntax is not very straight-forward. That means I'll probably have to spend a few weeks at the very least to learn the basics of Objective-C and Cocoa programming. Secondly, the concept of memory management for the iPhone is something that requires a lot of attention (i.e - is a bitch for the programmer).&lt;br /&gt;&lt;br /&gt;"In general, however, you should try to avoid using &lt;code&gt;autorelease&lt;/code&gt; wherever possible as it’s a more resource intensive operation than &lt;code&gt;release&lt;/code&gt;."&lt;br /&gt;&lt;br /&gt;Apple recommends that iPhone programmers follow these memory management guidelines:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To make sure it is clear when you own an object and when you do not, and what responsibilities you have as an owner, Cocoa sets the following policy:&lt;/p&gt;&lt;ul class="ul"&gt;&lt;li class="li"&gt;&lt;p&gt;You own any object you create.&lt;/p&gt;&lt;p&gt;You “create” an object using a method whose name begins with “alloc” or “new” or contains “copy” (for example, &lt;code&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/occ/clm/NSObject/alloc" target="_top"&gt;alloc&lt;/a&gt;&lt;/code&gt;, &lt;code&gt;&lt;!--a target="_top" --&gt;newObject&lt;!--/a--&gt;&lt;/code&gt;, or &lt;code&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/mutableCopy" target="_top"&gt;mutableCopy&lt;/a&gt;&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;&lt;li class="li"&gt;&lt;p&gt;If you own an object, you are responsible for relinquishing ownership when you have finished with it.&lt;/p&gt;&lt;p&gt;You relinquish ownership of an object by sending it a &lt;code&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html#//apple_ref/occ/intfm/NSObject/release" target="_top"&gt;release&lt;/a&gt;&lt;/code&gt; message or an &lt;code&gt;autorelease&lt;/code&gt; message (autorelease is discussed in more detail in &lt;span class="content_text"&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmObjectOwnership.html#//apple_ref/doc/uid/20000043-1000580"&gt;“Delayed Release”&lt;/a&gt;&lt;/span&gt;). In Cocoa terminology, relinquishing ownership of an object is typically referred to as “releasing” an object. &lt;/p&gt;&lt;/li&gt;&lt;li class="li"&gt;&lt;p&gt;If you do not own an object, you must not release it.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This policy applies both to GUI-based Cocoa applications and to command-line Foundation tools.  &lt;/p&gt;The entire documentation can be found here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html#//apple_ref/doc/uid/10000011"&gt;http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html#//apple_ref/doc/uid/10000011&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-9160581506751369162?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/9160581506751369162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/lessons-from-helloworld-application.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/9160581506751369162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/9160581506751369162'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/lessons-from-helloworld-application.html' title='Lessons from the HelloWorld application'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-2994994457654601974</id><published>2009-06-12T09:05:00.000-07:00</published><updated>2009-06-12T09:11:04.100-07:00</updated><title type='text'>HelloWorld! My first iPhone Application</title><content type='html'>Yesterday, I finally got Mac OSX 10.5 (Leopard) and the iPhone SDK installed on my new MacBook Air.&lt;br /&gt;&lt;br /&gt;Since I've never built an iPhone application before, let alone used XCode or developed in Cocoa or Objective-C, I'm going to start by building the simplest app possible, the "Hello World" application.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhone101/Articles/01_Overview.html#//apple_ref/doc/uid/TP40007514-CH10-SW2"&gt;http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhone101/Articles/01_Overview.html#//apple_ref/doc/uid/TP40007514-CH10-SW2&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-2994994457654601974?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/2994994457654601974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/helloworld-my-first-iphone-application.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/2994994457654601974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/2994994457654601974'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/helloworld-my-first-iphone-application.html' title='HelloWorld! My first iPhone Application'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-4909855646923952362</id><published>2009-06-07T10:16:00.000-07:00</published><updated>2009-06-07T20:14:24.406-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='$$$'/><category scheme='http://www.blogger.com/atom/ns#' term='setback'/><title type='text'>4. Upgrading Mac OSX -  iPhone SDK requires Mac OSX 10.5 (Leopard)</title><content type='html'>&lt;center&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=beepshare-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B000FK88JK&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="width: 120px; height: 240px;" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=beepshare-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B000BR0NPO&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="width: 120px; height: 240px;" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;Apparently, Mac OSX 10.5 (Leopard) is required for the iPhone SDK, which means I'll need to reinstall my OS and spend a few extra bucks to get things going. Currently, I am on Mac OSX 10.4.11 (which isn't supported by the iPhone SDK)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;My Purchase Summary:&lt;/span&gt;&lt;br /&gt;Apple Mac OS X Version 10.5.6 Leopard [5-User Family Pack]: $126.99&lt;br /&gt;Tax: N/A&lt;br /&gt;Shipping: $4.39&lt;br /&gt;Total: $131.38&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;This Purchase: &lt;/span&gt;&lt;span&gt;$131.38&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; | Running Total: &lt;/span&gt;&lt;span&gt;$2954.75 &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-4909855646923952362?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/4909855646923952362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/problems-installing-iphone-sdk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/4909855646923952362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/4909855646923952362'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/problems-installing-iphone-sdk.html' title='4. Upgrading Mac OSX -  iPhone SDK requires Mac OSX 10.5 (Leopard)'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-4179395634233269237</id><published>2009-06-06T23:23:00.000-07:00</published><updated>2009-06-07T20:09:11.076-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='progress'/><title type='text'>3. Reviewing the iPhone Human Interface Guidelines</title><content type='html'>Since it is my goal to eventually get an application published on the Apple Store, I figured it'd be wise to read over what Apple expects from each app in terms of its design and user experience.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/index.html"&gt;http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Time spent: 5 hours&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-4179395634233269237?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/4179395634233269237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/knowing-what-i-need-to-know-before.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/4179395634233269237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/4179395634233269237'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/knowing-what-i-need-to-know-before.html' title='3. Reviewing the iPhone Human Interface Guidelines'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-8472250794297787390</id><published>2009-06-06T23:11:00.000-07:00</published><updated>2009-06-07T20:08:57.436-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='progress'/><title type='text'>2. Installing the iPhone SDK</title><content type='html'>Apple will require you to join the iPhone Developer Program first.&lt;br /&gt;&lt;br /&gt;It's free and easy. Do it!&lt;br /&gt;&lt;br /&gt;http://developer.apple.com/iphone/index.action&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-8472250794297787390?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/8472250794297787390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/getting-iphone-sdk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/8472250794297787390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/8472250794297787390'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/getting-iphone-sdk.html' title='2. Installing the iPhone SDK'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1116854827513485317.post-6784508309974127976</id><published>2009-06-06T22:55:00.000-07:00</published><updated>2009-06-07T22:00:52.775-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='$$$'/><category scheme='http://www.blogger.com/atom/ns#' term='progress'/><title type='text'>1. Purchasing the goods... and getting some frequent flier miles in the process :)</title><content type='html'>&lt;center&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=beepshare-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B001GCTT80&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="width: 120px; height: 240px;" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=beepshare-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B001FA1NZK&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="width: 120px; height: 240px;" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/center&gt;&lt;br /&gt;Today I bought a MacBook Air &lt;span style="font-weight: bold;"&gt;and got an 8GB iPod Touch for free&lt;/span&gt; by taking advantage of Apple's "Back to School" special.&lt;br /&gt;&lt;br /&gt;* Buy a qualifying Mac and iPod with your Apple education discount from May 27, 2009, through September 8, 2009, and receive an online rebate up to $229, except where otherwise required by state law. Terms and conditions apply. Visit www.apple.com/backtoschool for full details. Not all Apple products qualify for education pricing.&lt;br /&gt;&lt;br /&gt;Details: &lt;a href="http://store.apple.com/us/browse/campaigns/back_to_school?cid=WWW-NAUS-BTS20090507-00029"&gt;http://store.apple.com/us/browse/campaigns/back_to_school?cid=WWW-NAUS-BTS20090507-00029&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;On top of that, I got 8000 United Frequent Flier miles.&lt;/span&gt; United is currently offering 3 miles for every 2 dollars spent if you access the Apple store through United's Mileage Plus storefront. If you spend $500 between April 10 2009 and June 21 2009, United will reward with with an addition 500 miles on top of that!&lt;br /&gt;&lt;br /&gt;Here's a link to the United Mileage Plus storefront: &lt;a href="http://links.mponlinemall.com/a/v.x?Token=pjbigcdjnlknmejeealefcebfdhplgeopjjcnpbnheocekhbkmfjblogedgpmgmjoomp"&gt;http://links.mponlinemall.com/a/v.x?Token=pjbigcdjnlknmejeealefcebfdhplgeopjjcnpbnheocekhbkmfjblogedgpmgmjoomp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;My Purchase Summary:&lt;/span&gt;&lt;br /&gt;iPod touch 8GB: $299.00&lt;br /&gt;iPod touch 8GB (mail-in rebate): -$299.00&lt;br /&gt;MacBook Air, 13-inch, Aluminum (1.86 GHz/128GB Solid State Drive): $2,299.00&lt;br /&gt;Apple Mighty Mouse: $49.00&lt;br /&gt;Tax: $238.37&lt;br /&gt;Shipping: Free&lt;br /&gt;Total: $2,823.37&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;This Purchase: &lt;/span&gt;&lt;span&gt;$2,823.37&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; | Running Total: &lt;/span&gt;&lt;span&gt;$2,823.37 &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1116854827513485317-6784508309974127976?l=iphone-crack-addict.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphone-crack-addict.blogspot.com/feeds/6784508309974127976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/purchasing-goods-and-some-frequent.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/6784508309974127976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1116854827513485317/posts/default/6784508309974127976'/><link rel='alternate' type='text/html' href='http://iphone-crack-addict.blogspot.com/2009/06/purchasing-goods-and-some-frequent.html' title='1. Purchasing the goods... and getting some frequent flier miles in the process :)'/><author><name>Chikan</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
