<?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>Big Blue Brains</title>
	<atom:link href="http://www.bigbluebrains.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bigbluebrains.com</link>
	<description>Future vision for today&#039;s problems</description>
	<lastBuildDate>Fri, 17 Dec 2010 07:53:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>nCinemaat</title>
		<link>http://www.bigbluebrains.com/index.php/2010/10/01/549/</link>
		<comments>http://www.bigbluebrains.com/index.php/2010/10/01/549/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 22:22:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.bigbluebrains.com/?p=549</guid>
		<description><![CDATA[nCinemaat extends the pure awesomeness offered by Cinemaat.com to Symbian devices ...

Technologies: Nokia Web Runtime (WRT) 1.1]]></description>
			<content:encoded><![CDATA[<div>
<div>
<div>
<div>
<p>nCinemaat extends the pure awesomeness offered by Cinemaat.com to Symbian devices in addition to some cool new features.</p>
<p><strong>Features:</strong></p>
<ul>
<li>You can check out movie theaters playing any movie of your choice.</li>
<li>You can view all movies in any theater in Cairo or Alexandria.</li>
<li>You can view the movie&#8217;s plot, poster and trailer.</li>
</ul>
<p><br/><br />
<strong>Application Link:</strong> <a title="download Cinemaat for blackberry" href="http://www.cinemaat.com/cinema-egypt/apps/nokia/nCinemaat.wgz" target="_blank">http://www.cinemaat.com/apps/nokia/nCinemaat.wgz</a></p>
<p><strong>Technologies:</strong> Nokia Web Runtime (WRT) 1.1</p>
<p><strong>Preview:</strong></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/J17Yq_1Mmx8" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/J17Yq_1Mmx8"></embed></object></p>
<p><strong><br />
</strong></p>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bigbluebrains.com/index.php/2010/10/01/549/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iCinemaat makes it to the first place!</title>
		<link>http://www.bigbluebrains.com/index.php/2010/09/15/icinemaat-makes-it-to-the-first-place/</link>
		<comments>http://www.bigbluebrains.com/index.php/2010/09/15/icinemaat-makes-it-to-the-first-place/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 15:59:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.bigbluebrains.com/?p=539</guid>
		<description><![CDATA[iCinemaat makes it to the top becoming NUMBER ONE!]]></description>
			<content:encoded><![CDATA[<p>iCinemaat makes it to the top becoming NUMBER ONE!</p>
<p><a href="http://www.bigbluebrains.com/wp-content/uploads/2010/09/CinemaatNo1.jpg"><img class="alignnone size-full wp-image-540" title="Cinemaat No 1" src="http://www.bigbluebrains.com/wp-content/uploads/2010/09/CinemaatNo1.jpg" alt="Cinemaat Number One" width="320" height="480" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigbluebrains.com/index.php/2010/09/15/icinemaat-makes-it-to-the-first-place/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Landscape Progress Madness !!!</title>
		<link>http://www.bigbluebrains.com/index.php/2010/09/14/landscape-progress-madness/</link>
		<comments>http://www.bigbluebrains.com/index.php/2010/09/14/landscape-progress-madness/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 22:30:26 +0000</pubDate>
		<dc:creator>mohammady</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[emulator]]></category>
		<category><![CDATA[landscape]]></category>

		<guid isPermaLink="false">http://www.bigbluebrains.com/?p=523</guid>
		<description><![CDATA[java.lang.IllegalArgumentException: View not attached to window manager, This was the first and only error reported for our android client for cinemaat.com, I was reading about the emulator and I tried flipping the phone (Ctrl+F12) ...]]></description>
			<content:encoded><![CDATA[<blockquote>
<p style="text-align: center;"><strong>java.lang.IllegalArgumentException: View not attached to window manager</strong></p>
</blockquote>
<p style="text-align: left;">
<p style="text-align: left;">This was the first and only error reported for our android client for <a href="http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-android" target="_blank">cinemaat.com</a> which now has over 500 downloads. I scratch my head looking at the stack trace trying to reproduce the bug! The exception is thrown at a line that dismisses the progress dialog  indicating that movie data was loaded and the application is ready to be used. No matter how absurd scenarios I try the application is resilient, nothing breaks!! Finally, I was reading about the emulator I tried flipping the phone (Ctrl+F12), ok the UI wasn&#8217;t designed to work on landscape so it looked  ugly!!  I tried doing this a couple of times and finally I can tell when this happens, It happens when you flip the screen while there is a dialog in progress. Ok so the solution came easy for me, the application wasn&#8217;t designed for landscape mode any way so I just disabled that. You can do this by editing your AndroidManifest.xml and slapping a:</p>
<blockquote>
<p style="text-align: center;"><strong>android:screenOrientation=&#8221;portrait&#8221;</strong></p>
</blockquote>
<p style="text-align: left;">on the activities you want to disable the mode on.</p>
<p style="text-align: left;">
<p style="text-align: left;">However, I started thinking, what if I wanted to keep my landscape mode and avoid this bug, so I created a test project to do this and reached the following conclusion:</p>
<ol>
<li>Have a flag to mark loading complete instead of checking on a dialog reference.</li>
<li>override the onSaveInstanceState() method and have it dismiss the dialog if it exists.</li>
<li>In the onCreate() always check for the flag and not for the dialog reference.</li>
</ol>
<p>There is another method that I am yet to try but should work theoretically, registering your activity to listen on configChanges orientation should alter the lifecycle of your activity and remove the destroy-create behavior and instead invoke the onConfigurationChanged() method. I am yet to try this though, will do so then update the post one day.</p>
<p style="text-align: left;">
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.bigbluebrains.com/index.php/2010/09/14/landscape-progress-madness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iCinemaat ranks second on Egypt&#8217;s AppStore</title>
		<link>http://www.bigbluebrains.com/index.php/2010/09/14/icinemaat-ranks-second-on-egypts-appstore/</link>
		<comments>http://www.bigbluebrains.com/index.php/2010/09/14/icinemaat-ranks-second-on-egypts-appstore/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 12:34:54 +0000</pubDate>
		<dc:creator>mohammady</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[AppStore]]></category>
		<category><![CDATA[Egypt]]></category>
		<category><![CDATA[iCinemaat]]></category>
		<category><![CDATA[Rank]]></category>

		<guid isPermaLink="false">http://www.bigbluebrains.com/?p=528</guid>
		<description><![CDATA[iCinemaat ranks second on Egypt's AppStore after 5 days only from it's release!]]></description>
			<content:encoded><![CDATA[<p>iCinemaat ranks second on Egypt&#8217;s AppStore after 5 days only from it&#8217;s release!</p>
<p><a href="http://www.bigbluebrains.com/wp-content/uploads/2010/09/2nd_appstore.jpg"><img class="aligncenter size-medium wp-image-529" title="2nd_appstore" src="http://www.bigbluebrains.com/wp-content/uploads/2010/09/2nd_appstore-200x300.jpg" alt="" width="200" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigbluebrains.com/index.php/2010/09/14/icinemaat-ranks-second-on-egypts-appstore/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to use iChat to chat with your MSN contacts</title>
		<link>http://www.bigbluebrains.com/index.php/2010/08/22/how-to-use-ichat-to-chat-with-your-msn-contacts/</link>
		<comments>http://www.bigbluebrains.com/index.php/2010/08/22/how-to-use-ichat-to-chat-with-your-msn-contacts/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 15:15:30 +0000</pubDate>
		<dc:creator>hamaky</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[gtalk]]></category>
		<category><![CDATA[iChat]]></category>
		<category><![CDATA[jabber]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[msn]]></category>

		<guid isPermaLink="false">http://www.bigbluebrains.com/?p=476</guid>
		<description><![CDATA[If you are an iChat fan like me you would just like this. Thanks to Apple's updates to iChat, now supporting Jabber protocol [support GTalk], you can use iChat to chat with your buddies on MSN, Yahoo, ... etc.]]></description>
			<content:encoded><![CDATA[<p>If you are an iChat fan like me you would just like this. Thanks to Apple&#8217;s updates to iChat, now supporting Jabber protocol [support GTalk], you can use iChat to chat with buddies on MSN, Yahoo, &#8230; etc.</p>
<p>The process is a little tricky, so let&#8217;s start &#8230;</p>
<p><strong>What you need</strong></p>
<p>1.  A GTalk account.</p>
<p>2.  Install Psi &#8211; A cross platform Jabber client and install it - <a href="http://psi-im.org/">http://psi-im.org/</a></p>
<p><strong>Steps</strong></p>
<p>1. Open Psi</p>
<p>2. Add your Google Account</p>
<p>- Select General / Account Setup</p>
<p>- Select Add and enter your account name</p>
<p>- Select your created account and press the modify button</p>
<p>- The account detail window contains 5 tabs [Account / Details / Privacy / Connection / Misc], you will need to<br />
configure the Account and Connection Tabs.</p>
<p>- [Screenshot 1] : Select the Account Tab, enter your gmail email in the Jabber ID and enter your mail password in the password field.</p>
<p>- [Screenshot 2] : Select the Connection Tab, check every box under Advanced. That means &#8220;Use SSL encryption,&#8221; &#8220;Ignore SSL warnings,&#8221; &#8220;Allow Plaintext Login,&#8221; &#8220;Send Keep-alive packets,&#8221; and &#8220;Manually Specify Server Host/Port&#8221;. Enter the following data, Host: &#8220;talk.google.com&#8221; and the Port:&#8221;5223&#8243;</p>
<p>- Now your account is ready, you can right click on the account and select status online.</p>
<p>3. Register your other IM services with a transport server</p>
<p>- Now comes the magic part. Connect your Google Talk account with Psi by right-clicking the account name, then Status, and then Online.</p>
<p>- Now right-click the account name a second time and click Service Discovery. You need to find a Jabber transport server that will bridge the gap between your Google Talk and non-Gtalk chat applications. The server I used for my set up is &#8220;jaim.at&#8221;</p>
<p>- [Screenshot 3]: Enter the server name into the Address field and click Browse. If all works well, you should see a list of available transports</p>
<p>- To set up one of your IM accounts, just right-click the appropriate transport server (AIM, MSN, Yahoo etc.) and select Register. Then just add your username and password, click the Register button, and voila, Psi will ask you to confirm all of your newly transported contacts in your Google Talk account. Once you do, they&#8217;ll all automatically be available through your Google Talk account wherever you go.</p>
<p>4. Now just set up you iChat to use you GTalk account and voila &#8230;</p>

<a href='http://www.bigbluebrains.com/index.php/2010/08/22/how-to-use-ichat-to-chat-with-your-msn-contacts/psi1/' title='psi1'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/psi1-150x150.jpg" class="attachment-thumbnail" alt="psi1" title="psi1" /></a>
<a href='http://www.bigbluebrains.com/index.php/2010/08/22/how-to-use-ichat-to-chat-with-your-msn-contacts/psi2/' title='psi2'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/psi2-150x150.jpg" class="attachment-thumbnail" alt="psi2" title="psi2" /></a>
<a href='http://www.bigbluebrains.com/index.php/2010/08/22/how-to-use-ichat-to-chat-with-your-msn-contacts/psi3/' title='psi3'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/psi3-150x150.jpg" class="attachment-thumbnail" alt="psi3" title="psi3" /></a>

<p>But take care, using a transport server does mean that you&#8217;re trusting your information to a third-party server, which isn&#8217;t always the most fun to do &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigbluebrains.com/index.php/2010/08/22/how-to-use-ichat-to-chat-with-your-msn-contacts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iCinemaat</title>
		<link>http://www.bigbluebrains.com/index.php/2010/08/21/cinemaat-on-iphone/</link>
		<comments>http://www.bigbluebrains.com/index.php/2010/08/21/cinemaat-on-iphone/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 21:31:03 +0000</pubDate>
		<dc:creator>fady</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.bigbluebrains.com/?p=462</guid>
		<description><![CDATA[iCinemaat extends the pure awesomeness offered by Cinemaat.com to iPhone devices ...

Technologies: iOS SDK 4, Objective-C]]></description>
			<content:encoded><![CDATA[<p>Cinemaat on iPhone extends the pure awesomeness offered by Cinemaat.com to iOS devices …</p>
<p><strong>Features:</strong></p>
<ul>
<li>You can check out movie theaters playing any movie of your choice.</li>
<li>You can view all movies in any theater in Cairo or Alexandria (more cities to come in the future).</li>
<li>You can view the movie’s information and trailer.</li>
<li>You can call any movie theater for reservation or inquiries.</li>
</ul>
<p><strong>Technologies:</strong> iOS SDK 4, Objective-C</p>
<p style="text-align: center;"><a href="http://itunes.apple.com/app/icinemaat/id388844958" target="_blank"><br />
<img class="aligncenter" src="http://www.bigbluebrains.com/wp-content/uploads/2010/09/App_Store_Badge_EN.png" alt="iCInemaat on App Store" /></a></p>
<p><strong>Preview:</strong><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/YFJHQ_-x9y4?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/YFJHQ_-x9y4?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>

<a href='http://www.bigbluebrains.com/index.php/2010/08/21/cinemaat-on-iphone/icinemaatscreen0/' title='iCinemaatScreen0'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/iCinemaatScreen0-150x150.png" class="attachment-thumbnail" alt="iCinemaatScreen0" title="iCinemaatScreen0" /></a>
<a href='http://www.bigbluebrains.com/index.php/2010/08/21/cinemaat-on-iphone/icinemaatscreen1/' title='iCinemaatScreen1'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/iCinemaatScreen1-150x150.png" class="attachment-thumbnail" alt="iCinemaatScreen1" title="iCinemaatScreen1" /></a>
<a href='http://www.bigbluebrains.com/index.php/2010/08/21/cinemaat-on-iphone/icinemaatscreen2/' title='iCinemaatScreen2'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/iCinemaatScreen2-150x150.png" class="attachment-thumbnail" alt="iCinemaatScreen2" title="iCinemaatScreen2" /></a>
<a href='http://www.bigbluebrains.com/index.php/2010/08/21/cinemaat-on-iphone/icinemaatscreen3/' title='iCinemaatScreen3'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/iCinemaatScreen3-150x150.png" class="attachment-thumbnail" alt="iCinemaatScreen3" title="iCinemaatScreen3" /></a>
<a href='http://www.bigbluebrains.com/index.php/2010/08/21/cinemaat-on-iphone/icinemaatscreen4/' title='iCinemaatScreen4'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/iCinemaatScreen4-150x150.png" class="attachment-thumbnail" alt="iCinemaatScreen4" title="iCinemaatScreen4" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.bigbluebrains.com/index.php/2010/08/21/cinemaat-on-iphone/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Android Resource Compilation Voodoo</title>
		<link>http://www.bigbluebrains.com/index.php/2010/08/19/android-resource-compilation-voodo/</link>
		<comments>http://www.bigbluebrains.com/index.php/2010/08/19/android-resource-compilation-voodo/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 23:06:57 +0000</pubDate>
		<dc:creator>mohammady</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[aapt]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[No resource found that matches the given name]]></category>
		<category><![CDATA[R cannot be resolved]]></category>
		<category><![CDATA[resource compilation]]></category>

		<guid isPermaLink="false">http://www.bigbluebrains.com/?p=321</guid>
		<description><![CDATA[If these errors look familiar, this might help you !
*error: Error: No resource found that matches the given name (at 'layout_above' with value '@id/text'). Android AAPT Problem

*R cannot be resolved to a variable Java Problem]]></description>
			<content:encoded><![CDATA[<p>I was working on our <a href="http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-android/" target="_blank">android client for cinemaat.com</a> and all of a sudden the main view layout xml was just horrendously bloated so I decided to break up the header and footer into separate layout resources and just include them in the main view.</p>
<p>My first attempt was cutting the header elements, pasting them in a separate file and just add to their container a</p>
<blockquote><p><code>android:layout_above="@id/contentArea"</code></p></blockquote>
<p>and do the same with the footer then add a similar layout_below to it.<br />
This didn&#8217;t work and only the content area and the footer displayed correctly.</p>
<p>My second attempt was to just layout the header, the contentArea below it then the footer below that .. thats when I discovered this bug with the resource compiler!</p>
<p>Let me explain using an example, suppose our page is divided into three sections residing in three layout resources:</p>
<ol>
<li>main.xml</li>
<li>n.xml</li>
<li>o.xml</li>
</ol>
<p>main.xml is obviously the main layout containing a relative layout container that we will use to layout all components in the user view as well as a TextView with id &#8216;text&#8217;.</p>
<blockquote>
<div id="_mcePaste">&lt;RelativeLayout xmlns:android=&#8221;http://schemas.android.com/apk/res/android&#8221;</div>
<div>android:orientation=&#8221;vertical&#8221;</div>
<div>android:layout_width=&#8221;fill_parent&#8221;</div>
<div>android:layout_height=&#8221;fill_parent&#8221;&gt;</div>
<div id="_mcePaste">&lt;TextView android:id=&#8221;@+id/text&#8221;</div>
<div>android:layout_width=&#8221;fill_parent&#8221;</div>
<div>android:layout_height=&#8221;wrap_content&#8221;</div>
<div>android:text=&#8221;m&#8221; /&gt;</div>
<div id="_mcePaste">&lt;include layout=&#8221;@layout/n&#8221; /&gt;</div>
<div id="_mcePaste">&lt;include layout=&#8221;@layout/o&#8221; /&gt;</div>
<div id="_mcePaste">&lt;/RelativeLayout&gt;</div>
</blockquote>
<p>n.xml contains only a TextView with id &#8216;text2&#8242; to be layed out relative to &#8216;text&#8217; (doesn&#8217;t really matter where).</p>
<p>o.xml contains another TextView with id &#8216;text3&#8242; to be layed out relative to &#8216;text&#8217; as well !!</p>
<p>at this point the application is building and everyone is happy!</p>
<p>Suppose for some philosophical reason we decide that &#8216;n&#8217; is such an ugly name for a layout resource and that we would prefer to call it &#8216;a&#8217; instead .. ooh yes !! yes !! &#8216;a&#8217; is such a pretty name !</p>
<p>you select n.xml you hit f2 change the name to a.xml press ok, you find a couple of errors but you just ignore them as you know &#8216;n&#8217; is still referenced in main and that you should see errors before you change it to reference &#8216;a&#8217; instead so you go ahead and do that, you press save and you build your project .. ok .. you still see 2 errors !! Thats weird !! You go ahead and fuss and curse eclipse and just do another rebuild .. oh those eclipse guys .. how many times have such minor inconveniences caused your heart to skip a beat .. but it all goes away with just another clean .. right ? right ? .. Naaah .. not this time !! you still see 2 errors:</p>
<ol>
<li>error: Error: No resource found that matches the given name (at &#8216;layout_above&#8217; with value &#8216;@id/text&#8217;).<span style="white-space: pre;"> </span>a.xml<span style="white-space: pre;"> </span>/layout-trouble/res/layout<span style="white-space: pre;"> </span>line 2<span style="white-space: pre;"> </span>Android AAPT Problem</li>
<li>R cannot be resolved to a variable<span style="white-space: pre;"> </span>Test.java<span style="white-space: pre;"> </span>/layout-trouble/src/com/bigbluebrains/test<span style="white-space: pre;"> </span>line 11<span style="white-space: pre;"> </span>Java Problem</li>
</ol>
<p>Basically the resource compiler cannot find the TextView called &#8216;text&#8217; that we reference in a.xml ! so it doesn&#8217;t compile the R class which causes the second error&#8230; but the TextView is there !! I haven&#8217;t change anything except for the name and reference .. I swear !!</p>
<p>Well .. I believe you ! but ! Turns out the resource compiler adds ids via the @+id/ notation in the order he reads files .. which is the alphabetical order ! thats why it worked at the beginning but not after we&#8217;ve renamed the referencing file to precede the TextView it references in the order of parsing.</p>
<p>My solution at the end was add a prefix to all layout resources that depend on a single element and just order the dependencies alphabetically, so in my case I ended up with:</p>
<ol>
<li>a_header.xml</li>
<li>b_content.xml</li>
<li>c_footer.xml</li>
</ol>
<p>I tried adding an ids file in values and just predefine the ids I use so that they would be available preparsing but I wasn&#8217;t able to define an Id without the @+id notation.</p>
<p>Download the example eclipse project <a href="http://www.bigbluebrains.com/extras/layout-trouble.rar">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigbluebrains.com/index.php/2010/08/19/android-resource-compilation-voodo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhone TopSongs Sample Code &#8211; Memory Leak Fix</title>
		<link>http://www.bigbluebrains.com/index.php/2010/08/16/iphone-topsongs-sample-code-memory-leak-fix/</link>
		<comments>http://www.bigbluebrains.com/index.php/2010/08/16/iphone-topsongs-sample-code-memory-leak-fix/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 00:25:30 +0000</pubDate>
		<dc:creator>fady</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Memory Leaks]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://www.bigbluebrains.com/?p=414</guid>
		<description><![CDATA[How to fix the memory leak in apple sample code (TopSongs) for iphone?]]></description>
			<content:encoded><![CDATA[<p>There is a well known memory leak in apple <a href="http://developer.apple.com/iphone/library/samplecode/TopSongs/Introduction/Intro.html" target="_blank"> TopSongs sample code.</a> There is a lot of people <a href="http://stackoverflow.com/questions/2405098/apples-sample-app-topsongs-has-26-leaks-ugh" target="_blank">referring</a> to it all over the internet.</p>
<p>It is tricky to fix the memory leak. Here is how to fix it. There are two memory leaks in the TopSongs Sample Code:<br />
1. xmlParserCtxtPtr leak.<br />
2. currentString leak.</p>
<div class="wp-caption aligncenter" style="width: 490px"><img title="First Memory Leak" src="/wp-content/uploads/2010/08/firstmemoeryleak.jpg" alt="First Memory Leak" width="480" height="339" /><p class="wp-caption-text">First Memory Leak</p></div>
<p>The first one is very simple. The root cause for this bug is that the context variable is set to null in connectionDidFinishLoading event before calling:</p>
<pre class="brush: csharp">// Release resources used only in this thread.
xmlFreeParserCtxt(context);</pre>
<p>in the main method in iTunesRSSImporter.m. So what you are actually doing is calling xmlFreeParserCtxt to a null object!!. The problem is that objective-c is cool with that :@:@:@</p>
<pre class="brush: csharp">- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
    // Signal the context that parsing is complete by passing "1" as the last parameter.
    xmlParseChunk(context, NULL, 0, 1);
	context = NULL; //FIX1: comment this line so that the context will be released.
    // Set the condition which ends the run loop.
    done = YES;
}</pre>
<div class="wp-caption aligncenter" style="width: 490px"><img class="  " title="Second Memory Leak" src="/wp-content/uploads/2010/08/secondmemoryleak.jpg" alt="Second Memory Leak" width="480" height="339" /><p class="wp-caption-text">Second Memory Leak</p></div>
<p>After fixing this issue, I found that there are some leaks for NSPlaceholderString. I tracked the root cause of this issue to the following code:</p>
<pre class="brush: csharp">if ([cache count] &gt;= cacheSize) {
    // evict least recently used (LRU) item from cache
    NSUInteger oldestAccessCount = UINT_MAX;
    NSString *key = nil, *keyOfOldestCacheNode = nil;
    for (key in cache) {
        CacheNode *tmpNode = [cache objectForKey:key];
        if (tmpNode.accessCounter &lt; oldestAccessCount) {
            oldestAccessCount = tmpNode.accessCounter;
            [keyOfOldestCacheNode release];
            keyOfOldestCacheNode = [key retain];
        }
    }
    // retain the cache node for reuse
    cacheNode = [[cache objectForKey:keyOfOldestCacheNode] retain];
    // remove from the cache
    [cache removeObjectForKey:keyOfOldestCacheNode];
	[keyOfOldestCacheNode release]; //FIX2: release this code to fix the leak.
} else {
    // create a new cache node
    cacheNode = [[CacheNode alloc] init];
}</pre>
<p>The problem should be clear now. It is trying to retain key in keyOfOldestCacheNode without releasing it. So to fix it we have to release it <img src='http://www.bigbluebrains.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="wp-caption aligncenter" style="width: 490px"><img title="No Memory Leak" src="/wp-content/uploads/2010/08/noleaks.jpg" alt="No Memory Leak" width="480" height="339" /><p class="wp-caption-text">No Memory Leak</p></div>
<p>Here is the profiling result after applying the 2 fixes.</p>
<p>You can download a fixed version from <a href="/wp-content/uploads/2010/08/TopSongs_Fixed.zip">here.</a></p>
<p><script type="text/javascript">
     SyntaxHighlighter.all();
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigbluebrains.com/index.php/2010/08/16/iphone-topsongs-sample-code-memory-leak-fix/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cinemaat BlackBerry</title>
		<link>http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-blackberry/</link>
		<comments>http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-blackberry/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 01:02:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.bigbluebrains.com/?p=386</guid>
		<description><![CDATA[Cinemaat on BlackBerry extends the pure awesomeness offered by Cinemaat.com to BlackBerry devices ...

Technologies: BlackBerry SDK 5]]></description>
			<content:encoded><![CDATA[<p>Cinemaat on BlackBerry extends the pure awesomeness offered by Cinemaat.com to BlackBerry devices &#8230;</p>
<p><strong>Features:</strong></p>
<ul>
<li>You can check out movie theaters playing any movie of your choice.</li>
<li>You can view all movies in any theater in Cairo or Alexandria (more cities to come in the future).</li>
<li>You can view the movie&#8217;s information and trailer.</li>
<li>You can call any movie theater for reservation or inquiries.</li>
</ul>
<p><br/><br />
<strong>OTA Link:</strong> <a title="download Cinemaat for blackberry" href="http://www.cinemaat.com/cinema-egypt/apps/blackberry/CinemaatBB.jad" target="_blank">http://www.cinemaat.com/apps/blackberry/CinemaatBB.jad<br />
</a><br />
<strong>Technologies: </strong>Blackberry SDK 5</p>
<p><strong>Preview:</strong></p>

<a href='http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-blackberry/9700-01/' title='9700-01'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/9700-01-150x150.jpg" class="attachment-thumbnail" alt="9700-01" title="9700-01" /></a>
<a href='http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-blackberry/9700-02/' title='9700-02'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/9700-02-150x150.jpg" class="attachment-thumbnail" alt="9700-02" title="9700-02" /></a>
<a href='http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-blackberry/9700-03/' title='9700-03'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/9700-03-150x150.jpg" class="attachment-thumbnail" alt="9700-03" title="9700-03" /></a>
<a href='http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-blackberry/9700-04/' title='9700-04'><img width="150" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/9700-04-150x150.jpg" class="attachment-thumbnail" alt="9700-04" title="9700-04" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-blackberry/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cinemaat Android</title>
		<link>http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-android/</link>
		<comments>http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-android/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 00:12:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.bigbluebrains.com/?p=338</guid>
		<description><![CDATA[Cinemaat on Android extends the pure awesomeness offered by Cinemaat.com to Android devices ...

Technologies: Android SDK 2.2]]></description>
			<content:encoded><![CDATA[<div>
<p>Cinemaat on android extends the pure awesomeness offered by Cinemaat.com to Android devices in addition to some cool new features.</p>
<p><strong>Features:</strong></p>
<ul>
<li>You can check out movie theaters playing any movie of your choice.</li>
<li>You can view all movies in any theater in Cairo or Alexandria (more cities to come in the future).</li>
<li>You can view the movie&#8217;s plot, poster, imdb page and trailer.</li>
<li>You can call any movie theater for reservation or inquiries.</li>
</ul>
<p><strong>Technologies: </strong>Android SDK 2.2</p>
<p><strong>Market Link: </strong>market://search?q=pname:com.bigbluebrains.cinemaat</p>
<p><strong>QR code &#8211; scan to install:</strong></p>
<p><a href="http://www.bigbluebrains.com/wp-content/uploads/2010/08/747957-1281279836708.png"><img title="Cinemaat Android QR Code" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/747957-1281279836708.png" alt="" width="164" height="164" /></a></p>
<p><strong>Preview:</strong></p>

<a href='http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-android/cinemaat_android_1/' title='cinemaat_android_1'><img width="100" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/cinemaat_android_1.jpg" class="attachment-thumbnail" alt="cinemaat_android_1" title="cinemaat_android_1" /></a>
<a href='http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-android/cinemaat_android_2/' title='cinemaat_android_2'><img width="100" height="150" src="http://www.bigbluebrains.com/wp-content/uploads/2010/08/cinemaat_android_2.jpg" class="attachment-thumbnail" alt="cinemaat_android_2" title="cinemaat_android_2" /></a>

<div style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/2wTYNSjCh4c&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/2wTYNSjCh4c&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
</div>
<p>You can also get it here:</p>
<div id="app371" class="appbrain-app"><a style="font-size: 11px; color: #555; font-family: Arial, sans-serif;" href="http://www.appbrain.com/app/com.bigbluebrains.cinemaat">Cinemaat for Android on AppBrain</a></div>
<p><script src="http://www.appbrain.com/api/api.nocache.js" type="text/javascript"></script></p>
<p>Now available on SlideMe as well <a href="http://slideme.org/en/application/cinemaat">here</a>:</p>
<p>http://slideme.org/en/application/cinemaat</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigbluebrains.com/index.php/2010/08/13/cinemaat-android/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

