<?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: Adventures in Objective-C &#8211; Part 1</title>
	<atom:link href="http://lonelocust.com/2009/05/11/1194/feed/" rel="self" type="application/rss+xml" />
	<link>http://lonelocust.com/2009/05/11/1194/</link>
	<description>Every swarm starts with one...</description>
	<lastBuildDate>Tue, 17 Aug 2010 06:35:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Anshu Singh</title>
		<link>http://lonelocust.com/2009/05/11/1194/comment-page-1/#comment-12890</link>
		<dc:creator>Anshu Singh</dc:creator>
		<pubDate>Mon, 05 Jul 2010 13:09:10 +0000</pubDate>
		<guid isPermaLink="false">http://lonelocust.com/2009/05/11/1194/#comment-12890</guid>
		<description>superb article.. brings out my emotions too. Coming from a C background, when I tried to get beyond the helloWorld in Obj-C by adding a function that needed two parameter, I remained in the mud of &quot;named parameters&quot; in function arguments for one week before I could properly get my head wrapped around (the insanity?) the convention. And two months later, it still befuddles me from time to time while debugging. Sigh!!</description>
		<content:encoded><![CDATA[<p>superb article.. brings out my emotions too. Coming from a C background, when I tried to get beyond the helloWorld in Obj-C by adding a function that needed two parameter, I remained in the mud of &#8220;named parameters&#8221; in function arguments for one week before I could properly get my head wrapped around (the insanity?) the convention. And two months later, it still befuddles me from time to time while debugging. Sigh!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gridman</title>
		<link>http://lonelocust.com/2009/05/11/1194/comment-page-1/#comment-12369</link>
		<dc:creator>Gridman</dc:creator>
		<pubDate>Wed, 27 May 2009 22:24:53 +0000</pubDate>
		<guid isPermaLink="false">http://lonelocust.com/2009/05/11/1194/#comment-12369</guid>
		<description>Before that comment comes back to haunt me I ought to delete it.  :-)

Totally missed on that one.  The small amount of work I&#039;ve previously done in Cocoa Objective-C was entirely with KVB - Key-Value Binding - and I&#039;d not touched KVC/KVO.

Just got around to watching the Stanford video that covered that topic and, while I completely missed the distinction between KVC/KVO and KVB, I was at least right that KVB does not exist in Cocoa Touch.

Through reflection in Java you can manage KVC.  Not sure about KVO - never had any call to use it.  I&#039;ve never had much use for KVC in Java, except when being handed unknown-typed objects.  I guess to remains to be seen when it will be handy in Objective-C.</description>
		<content:encoded><![CDATA[<p>Before that comment comes back to haunt me I ought to delete it.  <img src='http://lonelocust.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Totally missed on that one.  The small amount of work I&#8217;ve previously done in Cocoa Objective-C was entirely with KVB &#8211; Key-Value Binding &#8211; and I&#8217;d not touched KVC/KVO.</p>
<p>Just got around to watching the Stanford video that covered that topic and, while I completely missed the distinction between KVC/KVO and KVB, I was at least right that KVB does not exist in Cocoa Touch.</p>
<p>Through reflection in Java you can manage KVC.  Not sure about KVO &#8211; never had any call to use it.  I&#8217;ve never had much use for KVC in Java, except when being handed unknown-typed objects.  I guess to remains to be seen when it will be handy in Objective-C.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gridman</title>
		<link>http://lonelocust.com/2009/05/11/1194/comment-page-1/#comment-12354</link>
		<dc:creator>Gridman</dc:creator>
		<pubDate>Wed, 13 May 2009 20:02:23 +0000</pubDate>
		<guid isPermaLink="false">http://lonelocust.com/2009/05/11/1194/#comment-12354</guid>
		<description>I&#039;m not sure about the implementation of KVC&#039;s, but I suspect they&#039;re much like @property generated getters and setters - they probably generate an unseen method that&#039;s called, so it may be that it is doing the proper encapsulation &quot;under the hood&quot; as it were.

Seems like (and my study of Cocoa on the Mac is hazy) that KVC isn&#039;t implemented (or at least not in the same fashion) for CocoaTouch.

If I recall correctly, under an NSSlider, you could assign a binding between the value property of the slider to an ivar on the controller class and get direct updates between one to the other.

A UISlider, on the other hand along with the other UIControls (unless I&#039;m missing something) doesn&#039;t allow you to bind between properties of the control and properties on the controller.  It only allows you to bind the control object itself to an ivar representation of the same control class property on the controller.   

Subtle difference, I suppose...

It seems like I read somewhere that the xib files are actually being used to instantiate the property classes in the controller that are designated IBOutlets, so it&#039;s not so much a binding between two objects, but actually using an alternate mechanism to instantiate the object.  (Or perhaps it just sets the pointer to the same address?)</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure about the implementation of KVC&#8217;s, but I suspect they&#8217;re much like @property generated getters and setters &#8211; they probably generate an unseen method that&#8217;s called, so it may be that it is doing the proper encapsulation &#8220;under the hood&#8221; as it were.</p>
<p>Seems like (and my study of Cocoa on the Mac is hazy) that KVC isn&#8217;t implemented (or at least not in the same fashion) for CocoaTouch.</p>
<p>If I recall correctly, under an NSSlider, you could assign a binding between the value property of the slider to an ivar on the controller class and get direct updates between one to the other.</p>
<p>A UISlider, on the other hand along with the other UIControls (unless I&#8217;m missing something) doesn&#8217;t allow you to bind between properties of the control and properties on the controller.  It only allows you to bind the control object itself to an ivar representation of the same control class property on the controller.   </p>
<p>Subtle difference, I suppose&#8230;</p>
<p>It seems like I read somewhere that the xib files are actually being used to instantiate the property classes in the controller that are designated IBOutlets, so it&#8217;s not so much a binding between two objects, but actually using an alternate mechanism to instantiate the object.  (Or perhaps it just sets the pointer to the same address?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: One-Ten</title>
		<link>http://lonelocust.com/2009/05/11/1194/comment-page-1/#comment-12353</link>
		<dc:creator>One-Ten</dc:creator>
		<pubDate>Wed, 13 May 2009 06:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://lonelocust.com/2009/05/11/1194/#comment-12353</guid>
		<description>The other thing that I&#039;ve found to be a big difference is the lack of modifiers for Objective-C.  You can miss a method out of the interface, but it can still be accessed by anything that knows, or guesses, at its name.  And KVC can go deeper still, getting at your ivars directly.  Whilst this may be very useful in practice, it seems to break encapsulation, and I&#039;d have imagined it would ultimately cause more problems... It seems odd.

I&#039;m following Stanford U&#039;s class, though I&#039;m only just beginning assignment 3.  Look forward to that post.</description>
		<content:encoded><![CDATA[<p>The other thing that I&#8217;ve found to be a big difference is the lack of modifiers for Objective-C.  You can miss a method out of the interface, but it can still be accessed by anything that knows, or guesses, at its name.  And KVC can go deeper still, getting at your ivars directly.  Whilst this may be very useful in practice, it seems to break encapsulation, and I&#8217;d have imagined it would ultimately cause more problems&#8230; It seems odd.</p>
<p>I&#8217;m following Stanford U&#8217;s class, though I&#8217;m only just beginning assignment 3.  Look forward to that post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gridman</title>
		<link>http://lonelocust.com/2009/05/11/1194/comment-page-1/#comment-12352</link>
		<dc:creator>Gridman</dc:creator>
		<pubDate>Wed, 13 May 2009 00:31:47 +0000</pubDate>
		<guid isPermaLink="false">http://lonelocust.com/2009/05/11/1194/#comment-12352</guid>
		<description>I&#039;m doing little more than &quot;exercises&quot; myself at the moment, but I&#039;ve got a simplistic (but not so simplistic it doesn&#039;t have challenges) target iPhone program I&#039;m working on.

It&#039;s got tab controllers, navigation controllers, data entry, custom modeled objects... and so far, I&#039;ve only completed about 50% of it, and, more tellingly, I&#039;ve restarted it from scratch about 3 times.  :-)

So, I&#039;m far from familiar with Objective-C, and more than willing to admit I&#039;m biased, through familiarity, towards Java&#039;s syntax.

Helpful as Xcode is with syntax assist, I&#039;m going to give the node to Eclipse, for putting more information at your fingertips.  That&#039;s also playing a factor in my ease (or stumbling around) in picking up Objective-C.

That reminds me, I should talk a bit about Stanford U&#039;s iPhone class.  Time for a post.</description>
		<content:encoded><![CDATA[<p>I&#8217;m doing little more than &#8220;exercises&#8221; myself at the moment, but I&#8217;ve got a simplistic (but not so simplistic it doesn&#8217;t have challenges) target iPhone program I&#8217;m working on.</p>
<p>It&#8217;s got tab controllers, navigation controllers, data entry, custom modeled objects&#8230; and so far, I&#8217;ve only completed about 50% of it, and, more tellingly, I&#8217;ve restarted it from scratch about 3 times.  <img src='http://lonelocust.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So, I&#8217;m far from familiar with Objective-C, and more than willing to admit I&#8217;m biased, through familiarity, towards Java&#8217;s syntax.</p>
<p>Helpful as Xcode is with syntax assist, I&#8217;m going to give the node to Eclipse, for putting more information at your fingertips.  That&#8217;s also playing a factor in my ease (or stumbling around) in picking up Objective-C.</p>
<p>That reminds me, I should talk a bit about Stanford U&#8217;s iPhone class.  Time for a post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: One-Ten</title>
		<link>http://lonelocust.com/2009/05/11/1194/comment-page-1/#comment-12350</link>
		<dc:creator>One-Ten</dc:creator>
		<pubDate>Tue, 12 May 2009 12:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://lonelocust.com/2009/05/11/1194/#comment-12350</guid>
		<description>Whilst I haven&#039;t your experience with Java, I have learned it first and so it&#039;s also my point of reference in coming to C and Objective-C.

At first the syntax difference with both C and Java threw me (I always used &lt;em&gt;this&lt;/em&gt; in Java but it has to be &lt;em&gt;self&lt;/em&gt; in Objective-C, the square brackets, the + and -, the nil, the YES/NO) but there are some things I really like, and messages and selectors are one of them.  This is mostly because I think categories are cool, and informal protocols much more flexible than interfaces (and I like how you can implement the equivalent of an interface by making a formal protocol).  Dividing the business of &quot;calling a method&quot; into its components makes sense to me.

On the other hand, some of the (mostly version 2.0) stuff does seem irritatingly inconsistent.  For example, the dot notation.  It wouldn&#039;t be so bad if I wasn&#039;t used to it in Java, but to have something so similar yet unexpectedly different is quite off-putting. Especially when getters, as you say, are named the same as ivars, but the setters aren&#039;t and yet the only way to differentiate them in the dot notation is the context. Also, though properties are a neat way of simplifying the definition of getters and setters, it does seem to make it all a bit more opaque.  

Incidentally, I learned getters and setters as accessors and mutators for some reason, only to find them collectively referred to as accessors later on.  I guess this is one thing that everyone does differently...

I&#039;ve got used to the square brackets now.  I like the way there are class and instance methods (rather than the static business in Java) and that classes are objects.  And I don&#039;t find myself slower, partly because I never got to be that fast at Java and partly because I find Xcode to be quite helpful in a number of ways including helping me be a lazy coder!  I also like interface builder generally, so overall I&#039;m preferring it to Java so far.

Of course, I haven&#039;t actually done anything but exercises with it yet, so the real test will be in the application.</description>
		<content:encoded><![CDATA[<p>Whilst I haven&#8217;t your experience with Java, I have learned it first and so it&#8217;s also my point of reference in coming to C and Objective-C.</p>
<p>At first the syntax difference with both C and Java threw me (I always used <em>this</em> in Java but it has to be <em>self</em> in Objective-C, the square brackets, the + and -, the nil, the YES/NO) but there are some things I really like, and messages and selectors are one of them.  This is mostly because I think categories are cool, and informal protocols much more flexible than interfaces (and I like how you can implement the equivalent of an interface by making a formal protocol).  Dividing the business of &#8220;calling a method&#8221; into its components makes sense to me.</p>
<p>On the other hand, some of the (mostly version 2.0) stuff does seem irritatingly inconsistent.  For example, the dot notation.  It wouldn&#8217;t be so bad if I wasn&#8217;t used to it in Java, but to have something so similar yet unexpectedly different is quite off-putting. Especially when getters, as you say, are named the same as ivars, but the setters aren&#8217;t and yet the only way to differentiate them in the dot notation is the context. Also, though properties are a neat way of simplifying the definition of getters and setters, it does seem to make it all a bit more opaque.  </p>
<p>Incidentally, I learned getters and setters as accessors and mutators for some reason, only to find them collectively referred to as accessors later on.  I guess this is one thing that everyone does differently&#8230;</p>
<p>I&#8217;ve got used to the square brackets now.  I like the way there are class and instance methods (rather than the static business in Java) and that classes are objects.  And I don&#8217;t find myself slower, partly because I never got to be that fast at Java and partly because I find Xcode to be quite helpful in a number of ways including helping me be a lazy coder!  I also like interface builder generally, so overall I&#8217;m preferring it to Java so far.</p>
<p>Of course, I haven&#8217;t actually done anything but exercises with it yet, so the real test will be in the application.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
