<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aint that special &#187; Objective C</title>
	<atom:link href="http://duck-wing.com/wp/category/objective-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://duck-wing.com/wp</link>
	<description>Another yummy waste of time</description>
	<lastBuildDate>Mon, 25 Feb 2008 21:36:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Digging for code</title>
		<link>http://duck-wing.com/wp/2006/10/08/digging-for-code/</link>
		<comments>http://duck-wing.com/wp/2006/10/08/digging-for-code/#comments</comments>
		<pubDate>Sun, 08 Oct 2006 14:18:27 +0000</pubDate>
		<dc:creator>Macgiver</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Objective C]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://duck-wing.com/wp/?p=63</guid>
		<description><![CDATA[



Recently, Google labs introduced their new &#8220;Code Search&#8221; tool. This got me to start looking for similar search engines on the web. One of the nice one&#8217;s I&#8217;ve used is &#8220;Programming is hard&#8221; which has some nice formating, but limited languages. While many of the examples are way over my head as a new coder, [...]]]></description>
			<content:encoded><![CDATA[<p>
<img src="http://macgiver.wordpress.com/files/2006/10/GoogleCode.jpg" height="78" width="161" border="1" hspace="4" vspace="4" alt="Temp" />
</p>
<p>
Recently, Google labs introduced their new &#8220;Code Search&#8221; tool. This got me to start looking for similar search engines on the web. One of the nice one&#8217;s I&#8217;ve used is <a href="http://programmingishard.com/">&#8220;Programming is hard&#8221;</a> which has some nice formating, but limited languages. While many of the examples are way over my head as a new coder, these snippets have a lot to teach. I&#8217;t is mind blowing just how efficient an experienced programmer can make a routine.
</p>
<p>
As I said though, there are few good sources for Objective C, Cocoa, or Applescript. ALthough Google <a href="http://www.google.com/codesearch?q=lang%3A+%22cocoa%22&amp;btnG=Search+Code">found over 200 examples</a> for Cocoa related code. Of course there are plenty of <a href="http://www.cs.indiana.edu/classes/c304/oop-intro.html">publicly available sources</a> for learning Objective C, but they are sparse with code examples.
</p>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/Cocoa" rel="tag">Cocoa</a>, <a href="http://www.technorati.com/tag/Objective C" rel="tag">Objective C</a>, <a href="http://www.technorati.com/tag/Programming" rel="tag">Programming</a>, <a href="http://www.technorati.com/tag/Applescript" rel="tag">Applescript</a>, <a href="http://www.technorati.com/tag/Tip" rel="tag">Tip</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://duck-wing.com/wp/2006/10/08/digging-for-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective C #3 &#8211; Structures</title>
		<link>http://duck-wing.com/wp/2006/09/27/objective-c-3-structures/</link>
		<comments>http://duck-wing.com/wp/2006/09/27/objective-c-3-structures/#comments</comments>
		<pubDate>Thu, 28 Sep 2006 01:20:09 +0000</pubDate>
		<dc:creator>Macgiver</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Objective C]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://duck-wing.com/wp/?p=55</guid>
		<description><![CDATA[



It&#8217;s been awhile since I posted about my journey into Objective C and Cocoa programming. It&#8217;s going a lot slower than I had hoped, but I up to page 260 in &#8220;Programming in Objective C&#8221; so at least I&#8217;m not a complete slacker. It doesn&#8217;t help that most of the really basic material is as [...]]]></description>
			<content:encoded><![CDATA[<p>
<img src="http://macgiver.wordpress.com/files/2006/09/objc.jpg" height="176" width="134" border="1" hspace="4" vspace="4" alt="ObjectiveC" />
</p>
<p>
It&#8217;s been awhile since I posted about my journey into <a href="http://en.wikipedia.org/wiki/Objective-C">Objective C</a> and Cocoa programming. It&#8217;s going a lot slower than I had hoped, but I up to page 260 in <a href="http://www.amazon.com/Programming-Objective-C-Stephen-Kochan/dp/0672325861/sr=1-1/qid=1159406057/ref=pd_bbs_1/104-9013676-2704723?ie=UTF8&amp;s=books">&#8220;Programming in Objective C&#8221;</a> so at least I&#8217;m not a complete slacker. It doesn&#8217;t help that most of the really basic material is as exciting as a wet shoelace. But today on my commute to work I read about Functions and Structures. This is pretty darn cool stuff. Functions are really just quick and easy methods, but Structures are where it really gets interesting. A structure is a way to group related variables together and then assign or recall values really quickly. Here is an example from the book:
</p>
<p>
<span style="color:#ff7f00;">struct date<br />
<br />{<br />
<br /></span>
</p>
<p style="text-indent:20pt;color:#ff7f00;">
int month;<br />
<br />int day;<br />
<br />int year;
</p>
<p>
<span style="color:#ff7f00;">}<br />
<br /></span><br />
<br />This bit of code intializes a set of variables named month, day and year which comprise the variable called date.
</p>
<p>
<span style="color:#ff7f00;">struct date today;</span><span style="color:#ffffff;"><br />
<br /></span><br />
<br />Now we have declared a new date named &#8220;today.&#8221; Here&#8217;s the cool part. It&#8217;s really easy to set the day and year of your date as follows:
</p>
<p>
<span style="color:#ff7f00;">today.day= 21<br />
<br />today.year = 2003<br />
<br /></span><br />
<br />That&#8217;s it. Now your date variable contains a day and year that can be recalled and reasigned as needed. The period simply says to access the sub variable &#8220;day&#8221;
</p>
<p>
You can even set the entire date like this
</p>
<p>
<span style="color:#ff7f00;">struct date today = { 7, 2, 2004 };</span>
</p>
<p>
I&#8217;ll try to add some more later this week. The other thing I found pretty interesting is the use of Definitions (#define).
</p>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/Apple" rel="tag">Apple</a>, <a href="http://www.technorati.com/tag/Cocoa" rel="tag">Cocoa</a>, <a href="http://www.technorati.com/tag/Objective C" rel="tag">Objective C</a>, <a href="http://www.technorati.com/tag/Programming" rel="tag">Programming</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://duck-wing.com/wp/2006/09/27/objective-c-3-structures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective C #2 &#8211; Method Arguments</title>
		<link>http://duck-wing.com/wp/2006/08/25/objective-c-2-method-arguments/</link>
		<comments>http://duck-wing.com/wp/2006/08/25/objective-c-2-method-arguments/#comments</comments>
		<pubDate>Sat, 26 Aug 2006 00:08:34 +0000</pubDate>
		<dc:creator>Macgiver</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Objective C]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://duck-wing.com/wp/?p=21</guid>
		<description><![CDATA[I&#8217;m still working through &#8220;Programming in Objective-C&#8221; (Stephen Kochan). Since I commute on the train, I have plenty of time during the day to read. I&#8217;m about a third done. I hope to finish in a couple of weeks. So keep in mind this is all still really new to me. I&#8217;m not trying to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still working through <a href="http://www.amazon.com/exec/obidos/redirect?tag=ws%26link_code=xm2%26camp=2025%26creative=165953%26path=http://www.amazon.com/gp/redirect.html%253fASIN=0672325861%2526tag=ws%2526lcode=xm2%2526cID=2025%2526ccmID=165953%2526location=/o/ASIN/0672325861%25253FSubscriptionId=02ZH6J1W0649DTNS6002">&#8220;Programming in Objective-C&#8221; (Stephen Kochan)</a>. Since I commute on the train, I have plenty of time during the day to read. I&#8217;m about a third done. I hope to finish in a couple of weeks. So keep in mind this is all still really new to me. I&#8217;m not trying to create a tutorial, but rather share my experience learning the language.<br />
This one is very closely related to the previous post. This is about methods that accept arguments. If you break down this line:</p>
<p><em>- (void) setNumber: (int) n<br />
</em><br />
We already know that the beginning declares that the method will not be returning any values (i.e. <em>void</em>). But the colon says that this method will be accepting an argument. The next bracket indicates that the method <em>setNumber</em> will read in an integer. The integer is named &#8220;<em>n</em>.&#8221; Just as a side note, the minus sign in front of <em>(void)</em> indicates that this is an instance method. The other option is the plus sign to indicate a class method.<br />
Here&#8217;s a more complex one:</p>
<p><em>- (void) bounceBack:  (Height *) b;</em></p>
<p>This one is a method that accepts something that is of the type class <em>Height</em> which had been previously declared. The asterisk is what tells us that <em>Height</em> is already a class. The learning curve is getting steeper now.</p>
<p><!-- technorati tags start -->
<p>Technorati Tags: <a href="http://www.technorati.com/tag/Apple" rel="tag">Apple</a>, <a href="http://www.technorati.com/tag/Mac" rel="tag">Mac</a>, <a href="http://www.technorati.com/tag/Objective C" rel="tag">Objective C</a>, <a href="http://www.technorati.com/tag/Programming" rel="tag">Programming</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://duck-wing.com/wp/2006/08/25/objective-c-2-method-arguments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective C #1 &#8211; Return Values</title>
		<link>http://duck-wing.com/wp/2006/08/23/objective-c-1-return-values/</link>
		<comments>http://duck-wing.com/wp/2006/08/23/objective-c-1-return-values/#comments</comments>
		<pubDate>Wed, 23 Aug 2006 02:04:07 +0000</pubDate>
		<dc:creator>Macgiver</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://duck-wing.com/wp/?p=16</guid>
		<description><![CDATA[Recently I began to teach myself Objective C. My final goal is to program in Cocoa for the Mac. The process is slow going, but really interesting. I&#8217;m adding a regular section to highlight some of my thoughts about learning a programming language. The first post is about &#8220;Return Values&#8221;
-(void) setNumerator;
This expression declares a new [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I began to teach myself Objective C. My final goal is to program in Cocoa for the Mac. The process is slow going, but really interesting. I&#8217;m adding a regular section to highlight some of my thoughts about learning a programming language. The first post is about &#8220;Return Values&#8221;</p>
<p><em>-(void) setNumerator;</em></p>
<p>This expression declares a new method that is not expected to return anything (i.e. void)</p>
<p><em>-(double) myNumber;</em></p>
<p>declares a method that should be returning a double precision number</p>
<p><em>-(int) getNumber;</em></p>
<p>should return an integer.</p>
<p>All this is very cool. It makes it pretty easy to see what kind of result should come back when the method is put into action. While it&#8217;s not as direct as Ruby, I&#8217;m getting it. I&#8217;m even more green with Ruby, but I&#8217;ve heard such great things about it, that I had to check it out. I highly recommend <a href="http://poignantguide.net/ruby/">this quirky but entertaining guide</a>.<br />
<!-- technorati tags start -->
<p>Technorati Tags: <a href="http://www.technorati.com/tag/Mac" rel="tag">Mac</a>, <a href="http://www.technorati.com/tag/Programming" rel="tag">Programming</a>, <a href="http://www.technorati.com/tag/Objective C" rel="tag">Objective C</a>, <a href="http://www.technorati.com/tag/Cocoa" rel="tag">Cocoa</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://duck-wing.com/wp/2006/08/23/objective-c-1-return-values/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
