<?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>Kickass Labs &#187; MonoTouch</title>
	<atom:link href="http://www.kickasslabs.com/category/monotouch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kickasslabs.com</link>
	<description>We &#9829; code.</description>
	<lastBuildDate>Sun, 04 Jul 2010 03:00:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Quick Hits: Becareful when returning inc&#8217;ed vars</title>
		<link>http://www.kickasslabs.com/2010/05/01/quick-hits-becareful-when-returning-inced-vars/</link>
		<comments>http://www.kickasslabs.com/2010/05/01/quick-hits-becareful-when-returning-inced-vars/#comments</comments>
		<pubDate>Sat, 01 May 2010 05:01:44 +0000</pubDate>
		<dc:creator>abel</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Quick Hits]]></category>
		<category><![CDATA[gotcha]]></category>
		<category><![CDATA[noob]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=473</guid>
		<description><![CDATA[I noticed this in some MonoTouch code that I wrote recently, but I think it makes sense across other languages as well.  Let&#8217;s say you write a method that returns an incremented variable like this:
private int MyAwesomeFunction(int pVar)
{
// coding magic
  return pVar++;
}
&#8230;where pVar = 10, the returned value will NOT be 11!  The returned [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed this in some MonoTouch code that I wrote recently, but I think it makes sense across other languages as well.  Let&#8217;s say you write a method that returns an incremented variable like this:</p>
<p><span style="color: #0000ff;">private int</span> MyAwesomeFunction(int pVar)<br />
{<br />
<span style="color: #008000;">// coding magic</span><br />
<span style="color: #008000;"> <span style="color: #0000ff;"> return</span></span> pVar++;<br />
}</p>
<p>&#8230;where pVar = 10, the returned value will NOT be 11!  The returned value will still be 10.  If you want to return an incremented value for pVar, do the following:</p>
<p><code><span style="color: #0000ff;">private  int</span> MyAwesomeFunction(int pVar)<br />
{<br />
<span style="color: #008000;">//  coding magic</span></code><br />
<code> <span style="color: #0000ff;">return <span style="color: #000000;">++</span></span>pVar; <span style="color: #008000;">// or </span></code><span style="color: #008000;"><code>return   pVar+1</code></span>;<br />
<code>}</code></p>
<p>Just a case of postfix vs prefix.  In the previous example, the variable never gets incremented because the postfix operator would get evaluated after the line is processed, but that never happens because we&#8217;re returning the pVar.  By flipping to a prefix operator, we guarantee that we evaluate the opperator against the variable before we return it.</p>
<p>It&#8217;s also worth mentioning that being a little verbose here is also good.  Explicitly stating that you&#8217;re adding 1 to the variable (as displayed in the commented code) is the same number of characters and we eliminate the confusion over what&#8217;s getting returned.</p>
<p>Happy Coding!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2010%2F05%2F01%2Fquick-hits-becareful-when-returning-inced-vars%2F&amp;linkname=Quick%20Hits%3A%20Becareful%20when%20returning%20inc%26%238217%3Bed%20vars"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2010/05/01/quick-hits-becareful-when-returning-inced-vars/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The 5 stages of 3.3.1</title>
		<link>http://www.kickasslabs.com/2010/04/11/the-5-stages-of-3-3-1/</link>
		<comments>http://www.kickasslabs.com/2010/04/11/the-5-stages-of-3-3-1/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 04:32:36 +0000</pubDate>
		<dc:creator>abel</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[331]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=449</guid>
		<description><![CDATA[Developers have been up in arms on the news broken by Daring Fireball and TechCrunch.  The reported change in the iPhone developer agreement definitely stops Flash developers from creating iPhone apps using the new tools available CS5, but the sword Apple used also cuts into the heart of the MonoTouch, Appcelerator, Unity 3D, Corona, &#38; [...]]]></description>
			<content:encoded><![CDATA[<p>Developers have been up in arms on the news broken by <a href="http://daringfireball.net/2010/04/iphone_agreement_bans_flash_compiler" target="_blank">Daring Fireball</a> and <a href="http://techcrunch.com/2010/04/08/adobe-flash-apple-sdk/" target="_blank">TechCrunch</a>.  The reported change in the iPhone developer agreement definitely <a href="http://theflashblog.com/?p=1888" target="_blank">stops Flash developers from creating iPhone apps</a> using the new tools available CS5, but the sword Apple used also cuts into the heart of the <a href="http://monotouch.net/" target="_blank">MonoTouch</a>, <a href="http://www.appcelerator.com/" target="_blank">Appcelerator</a>, <a href="http://unity3d.com/" target="_blank">Unity 3D</a>, <a href="http://anscamobile.com/corona/" target="_blank">Corona</a>, &amp; <a href="http://phonegap.com/" target="_blank">PhoneGap</a> communities.  Being a member of the MonoTouch community, I&#8217;m directly affected by this reported change.  Easily said, I&#8217;ve gone through the <a href="http://en.wikipedia.org/wiki/K%C3%BCbler-Ross_model" target="_blank">5 stages of grief</a> over the news:</p>
<p><span id="more-449"></span></p>
<h3>1] Denial</h3>
<p>It doesn&#8217;t really say that, does it?  I mean, they  must not realize what this will do to other projects not related to Adobe.  I&#8217;m sure they won&#8217;t enforce it.</p>
<h3>2] Anger</h3>
<p>Are you F*%#ING SERIOUS RIGHT NOW!?  Don&#8217;t they realize that some EA games use Lua!?  Are they going take those apps out of the store?  Don&#8217;t give me that &#8220;quality of apps&#8221; crap!  There are TONS of horrible apps written in native Objective-C!  &#8220;<a href="http://www.taoeffect.com/blog/2010/04/steve-jobs-response-on-section-3-3-1/" target="_blank">Crappy devs will make crappy apps regardless of how many layers there are &amp; it doesn’t make sense to limit source-to-source conversion</a>.&#8221;  This is creativity stifling!  Apple&#8217;s going to lose so many apps they&#8217;ll repeal this decision with the QUICKNESS!  I&#8217;m just going to bang out the best apps ever and we&#8217;ll see if Apple tries to take them out of the store.  I DOUBT THEY WILL!  What happened to the approval process!?  Shouldn&#8217;t that be enough!?  Don&#8217;t they understand how error prone manual memory management is!?  FURY!!!</p>
<h3>3] Bargaining</h3>
<p>Maybe we can team up with other developers and convince Apple to change this.  We can show them of the talent that&#8217;ll jump ship.  I mean, we&#8217;re not like those &#8220;sexy app&#8221; guys, right?</p>
<h3>4] Depression</h3>
<p>It&#8217;s over man!  It&#8217;s GAME OVER! Damn it!  I wasted all this time! What will become of my projects!?  I&#8217;m tossing out my iPhone &amp; I&#8217;m definitely not buying an iPad now.  It&#8217;ll just be too painful of a reminder that my app is available on it**.  Nothing to see here except a teary-eyed developer <img src='http://www.kickasslabs.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<h3>5] Acceptance</h3>
<p>This sucks likes crazy, but I&#8217;ve still got time.  I&#8217;ll make updates to <a href="http://www.touchplaybook.com" target="_blank">Touch Playbook</a> for as long as I can.  MonoTouch is talking about giving developers the ability to create Droid apps and that will kick ass!  Windows Phone 7 is right around the corner and since my app is already written in C#, the port should be very easy.  The HP Slate runs Windows 7 and obviously Silverlight so there&#8217;s another port right there.  I&#8217;ll get started on that this weekend!  If it wasn&#8217;t for MonoTouch, I wouldn&#8217;t have gotten as far along as I did with Touch Playbook.  I don&#8217;t regret a moment.</p>
<h3>Conclusion</h3>
<p>I don&#8217;t know what the future of MonoTouch and iPhone development is.  Rather, I don&#8217;t want to admit what I fear the future is.  I&#8217;d love for a miracle to take place where the reported language is altered in 3.3.1 to allow MonoTouch and other quality iPhone development solutions.  However, if that doesn&#8217;t happen, MonoTouch still definitely rocks!  For the time being, it feels good to be in the final stage.  I don&#8217;t like being so angsty. <img src='http://www.kickasslabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Update</h3>
<p>I do, however, remain hopeful.  I&#8217;ve signed the developer driven Tiny Petition <a href="http://tinypetition.com/NoBanFromTOSChange" target="_blank">against Apple&#8217;s reported TOS change and you can too</a>.  You might ask &#8220;Abel, isn&#8217;t this the barganing step?  Did you relapse?&#8221; and I would reply &#8220;Not exactly&#8221;.  In the bargaining step my thoughts came from desperation in the wake of anger.  Right now, signing the petition springs from hope and a desire to stand with my fellow MonoTouch devs and other devs effected by this.  This time the motivation is less about me and more about the community.</p>
<p>**I&#8217;ve already taken a stab at learning Objective-C and would rather use my time on other languages.  I don&#8217;t see myself taking up the effort again.  Life&#8217;s too short and I really like languages like C# &amp; Ruby.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2010%2F04%2F11%2Fthe-5-stages-of-3-3-1%2F&amp;linkname=The%205%20stages%20of%203.3.1"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2010/04/11/the-5-stages-of-3-3-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Quick Hits: Localization strings in Monotouch</title>
		<link>http://www.kickasslabs.com/2010/02/21/quick-hits-localization-strings-in-monotouch/</link>
		<comments>http://www.kickasslabs.com/2010/02/21/quick-hits-localization-strings-in-monotouch/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 22:31:05 +0000</pubDate>
		<dc:creator>abel</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[localization]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=439</guid>
		<description><![CDATA[It&#8217;s pretty straight forward.  Check out this post:
Internationalising my app
&#8230;and make sure the folders you use follow this format &#8220;[Language Abbreviation].lproj&#8221; as commenter #4 points out  
If you miss one of the major languages, your app will default to English.  As of this post, the iPhone OS supports the following languages:
English (U.S), English [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s pretty straight forward.  Check out this post:</p>
<p><a href="http://forums.monotouch.net/yaf_postsm1381.aspx" target="_blank">Internationalising my app</a></p>
<p>&#8230;and make sure the folders you use follow this format &#8220;[Language Abbreviation].lpro<span style="text-decoration: underline;"><strong>j</strong></span>&#8221; as commenter #4 points out <img src='http://www.kickasslabs.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>If you miss one of the major languages, your app will default to English.  As of this post, the iPhone OS supports the following languages:</p>
<p>English (U.S), English (UK), French (France),  German, Traditional Chinese, Simplified Chinese, Dutch, Italian,  Spanish, Portuguese (Brazil), Portuguese (Portugal), Danish, Swedish,  Finnish, Norwegian, Korean, Japanese, Russian, Polish, Turkish,  Ukrainian, Arabic, Thai, Czech, Greek, Hebrew, Indonesian, Malay,  Romanian, Slovak, and Croatian</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2010%2F02%2F21%2Fquick-hits-localization-strings-in-monotouch%2F&amp;linkname=Quick%20Hits%3A%20Localization%20strings%20in%20Monotouch"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2010/02/21/quick-hits-localization-strings-in-monotouch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I LOVE MonoTouch</title>
		<link>http://www.kickasslabs.com/2010/01/24/i-love-monotouch/</link>
		<comments>http://www.kickasslabs.com/2010/01/24/i-love-monotouch/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 22:42:47 +0000</pubDate>
		<dc:creator>abel</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[noob]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=415</guid>
		<description><![CDATA[Don't get me wrong, XCode is great...in it's own way...but as a .Net dev coming to the iPhone platform, MonoTouch rocks my world!
For the other devs in my shoes looking to play with MonoTouch, here are some things to keep in mind:]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t get me wrong, XCode is great&#8230;in it&#8217;s own way&#8230;but as a .Net dev coming to the iPhone platform, <a href="http://monotouch.net/" target="_blank">MonoTouch</a> rocks my world!</p>
<p>For the other devs in my shoes looking to play with <a href="http://monotouch.net/" target="_blank">MonoTouch</a>, here are some things to keep in mind:<span id="more-415"></span></p>
<ul>
<li>If you want to subclass something like UIView, UIImageView, or any class that&#8217;s originally an Objective-C class &amp; use your new class in your  XIB, you need to&#8230;
<ul>
<li>Make sure your constructor includes IntPtr constructor.</li>
<li>Sometimes you&#8217;ll need to register your classes like this:
<pre>[MonoTouch.Foundation.Register("MyAwesomeView")]
public class MyAwesomeView : UIView
{
   public MyAwesomeView (IntPtr handle) : base(handle)
   {
      Initialize ();
   }
   //My awesome code here!
}
</pre>
</li>
<li>If you simply type in the name of your custom subclassed view into IB without declaring it in code first, sometimes you get a &#8220;partial class&#8221; in the view controller&#8217;s xib code-behind file (MySensationalViewController.xib.designer.cs).  If that happens, you <strong>DON&#8217;T</strong> need to register your class, but you <strong>DO</strong> need to set your class definition to &#8216;partial&#8217;.  Here&#8217;s an example:
<pre>public partial class MyFantasticView : UIView
{
   public MyFantasticView  (IntPtr handle) : base(handle)
   {
      Initialize ();
   }
   //Your awesome code here!
}</pre>
</li>
</ul>
</li>
<li>Much like Visual Studio, you get awesome debugging tools so make sure to get familiar with &#8220;watches&#8221; (While at  break point: View -&gt; Debug Windows -&gt; Watch) and the &#8220;Expression Evaluator&#8221; (While at  break point: Run -&gt; Expression Evaluator).</li>
<li>There are also helpful tools such as a &#8220;Reg-Ex Toolkit&#8221; and an &#8220;Add-in&#8221; manager that can be hooked into repositories for even more functionality&#8230;as more repositories become available <img src='http://www.kickasslabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p>When you have a friendly, yet powerful IDE to work with, developing software becomes enjoyable.  I&#8217;ll definitely be using this IDE to create my first iPhone app submission to the AppStore.  As I learn more about MonoTouch, I&#8217;ll make sure to post my findings here.  In the meanwhile, those of you looking to get more info about MonoTouch should checkout <a href="http://monotouch.net/" target="_blank">its homepage</a>.  The MonoTouch site has a ton of tutorials, documentation, and multiple ways to plug into the MT community.  At a glance, you might scoff at the asking price of $399 for a yearly license, but when you consider how much faster you&#8217;ll be able to put together quality apps, it might be worth it for you.   I know it is for me.</p>
<p>Happy Coding!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2010%2F01%2F24%2Fi-love-monotouch%2F&amp;linkname=I%20LOVE%20MonoTouch"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2010/01/24/i-love-monotouch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
