<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: NSNumber: What is the point ?</title>
	<atom:link href="http://objcolumnist.com/2009/05/31/nsnumber-what-is-the-point/feed/" rel="self" type="application/rss+xml" />
	<link>http://objcolumnist.com/2009/05/31/nsnumber-what-is-the-point/</link>
	<description>Coding under the Hammer</description>
	<lastBuildDate>Mon, 07 Jun 2010 12:36:06 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: CrisBetewsky</title>
		<link>http://objcolumnist.com/2009/05/31/nsnumber-what-is-the-point/comment-page-1/#comment-26</link>
		<dc:creator>CrisBetewsky</dc:creator>
		<pubDate>Mon, 06 Jul 2009 20:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=58#comment-26</guid>
		<description>It&#039;s a pity that people don&#039;t realize the importance of this information. Thanks for posing it.</description>
		<content:encoded><![CDATA[<p>It&#8217;s a pity that people don&#8217;t realize the importance of this information. Thanks for posing it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Spencer MacDonald</title>
		<link>http://objcolumnist.com/2009/05/31/nsnumber-what-is-the-point/comment-page-1/#comment-23</link>
		<dc:creator>Spencer MacDonald</dc:creator>
		<pubDate>Sat, 04 Jul 2009 11:39:06 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=58#comment-23</guid>
		<description>Hi John,

So if you wrote the following:
&lt;code&gt;[magicObject performSelector:@selector(performMagicWithNumber:) withObject:[NSNumber numberWithInteger:2] afterDelay:1.0];&lt;/code&gt;

As a C function:

&lt;code&gt;performMagicWithNumber(magicObject , 2);&lt;/code&gt;

Obviously you don&#039;t have the delay there, and your acting upon the &quot;magicObject&quot;


I think your confusing event driven programming, with OO programming (Cocoa Programming is both).

In terms of the hand off between objects in OO programming, as soon as you call a method on a object, that method is carried out. Once that method has completed control returns to the object that called that method. This is exactly the same way that functions work in procedural programming.

Classes are simply structs under the hood, and methods are simply functions that can only be called on a single class. OO programming just makes code cleaner and more maintainable.

Most Cocoa applications are also event driven, so when you touch a iPhone&#039;s screen it triggers off a chain of events. But unless the application is threaded, this event has to wait until the current thread is idle until it can be carried out. Things still get queued like in procedural programming, but obviously events can come in in a variety of orders if an application is being driven by the user.</description>
		<content:encoded><![CDATA[<p>Hi John,</p>
<p>So if you wrote the following:<br />
<code>[magicObject performSelector:@selector(performMagicWithNumber:) withObject:[NSNumber numberWithInteger:2] afterDelay:1.0];</code></p>
<p>As a C function:</p>
<p><code>performMagicWithNumber(magicObject , 2);</code></p>
<p>Obviously you don&#8217;t have the delay there, and your acting upon the &#8220;magicObject&#8221;</p>
<p>I think your confusing event driven programming, with OO programming (Cocoa Programming is both).</p>
<p>In terms of the hand off between objects in OO programming, as soon as you call a method on a object, that method is carried out. Once that method has completed control returns to the object that called that method. This is exactly the same way that functions work in procedural programming.</p>
<p>Classes are simply structs under the hood, and methods are simply functions that can only be called on a single class. OO programming just makes code cleaner and more maintainable.</p>
<p>Most Cocoa applications are also event driven, so when you touch a iPhone&#8217;s screen it triggers off a chain of events. But unless the application is threaded, this event has to wait until the current thread is idle until it can be carried out. Things still get queued like in procedural programming, but obviously events can come in in a variety of orders if an application is being driven by the user.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnKallen</title>
		<link>http://objcolumnist.com/2009/05/31/nsnumber-what-is-the-point/comment-page-1/#comment-16</link>
		<dc:creator>JohnKallen</dc:creator>
		<pubDate>Tue, 30 Jun 2009 01:23:02 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=58#comment-16</guid>
		<description>First, thank you so much for posting this topic. It has helped me immensely with a persistence function I am creating. I am a traditional procedural programmer. I&#039;ve been programming for 10+ years, mostly VB. I&#039;m desperately trying to learn OOP but it&#039;s not coming as fast as I hoped. Primarily because many of the posts that I see make assumptions about OOP that may seem obvious to a OOP coder but not so obvious to a procedural programmer. I&#039;ve been reading several books on the subject and I sure eventually the pieces will snap into place- however right now they are all hovering up in the air. 

I am familiar using performSelector calls to call methods, but I don&#039;t understand how NSNumber is involved with that call? Please explain more on that. 
Also, I&#039;m having a lot of difficulty with understanding the hand off from one class to the next. Since, unlike procedural programming where the computer waits for a function to complete before continuing with the next line of code, Objective C just keeps on going regardless if the method(function) has completed.

Thanks in advance for your help!</description>
		<content:encoded><![CDATA[<p>First, thank you so much for posting this topic. It has helped me immensely with a persistence function I am creating. I am a traditional procedural programmer. I&#8217;ve been programming for 10+ years, mostly VB. I&#8217;m desperately trying to learn OOP but it&#8217;s not coming as fast as I hoped. Primarily because many of the posts that I see make assumptions about OOP that may seem obvious to a OOP coder but not so obvious to a procedural programmer. I&#8217;ve been reading several books on the subject and I sure eventually the pieces will snap into place- however right now they are all hovering up in the air. </p>
<p>I am familiar using performSelector calls to call methods, but I don&#8217;t understand how NSNumber is involved with that call? Please explain more on that.<br />
Also, I&#8217;m having a lot of difficulty with understanding the hand off from one class to the next. Since, unlike procedural programming where the computer waits for a function to complete before continuing with the next line of code, Objective C just keeps on going regardless if the method(function) has completed.</p>
<p>Thanks in advance for your help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Spencer MacDonald</title>
		<link>http://objcolumnist.com/2009/05/31/nsnumber-what-is-the-point/comment-page-1/#comment-10</link>
		<dc:creator>Spencer MacDonald</dc:creator>
		<pubDate>Tue, 16 Jun 2009 19:22:16 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=58#comment-10</guid>
		<description>Sure, what area are you particularly interested in ?</description>
		<content:encoded><![CDATA[<p>Sure, what area are you particularly interested in ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GarykPatton</title>
		<link>http://objcolumnist.com/2009/05/31/nsnumber-what-is-the-point/comment-page-1/#comment-9</link>
		<dc:creator>GarykPatton</dc:creator>
		<pubDate>Tue, 16 Jun 2009 10:26:13 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=58#comment-9</guid>
		<description>Hello, can you please post some more information on this topic? I would like to read more.</description>
		<content:encoded><![CDATA[<p>Hello, can you please post some more information on this topic? I would like to read more.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
