<?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>Doug Diego</title>
	<atom:link href="http://dougdiego.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dougdiego.com</link>
	<description></description>
	<lastBuildDate>Tue, 17 Jan 2012 21:57:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Android App using only half the screen</title>
		<link>http://dougdiego.com/2012/01/17/android-app-using-only-half-the-screen/</link>
		<comments>http://dougdiego.com/2012/01/17/android-app-using-only-half-the-screen/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 21:57:18 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=417</guid>
		<description><![CDATA[When running an Android Application, I found that  it was only using half the screen as in the screenshot here. I had this problem when the android:minSdkVersion was set to 3 in the AndroidManifest.xml For example the following caused the issue: When I set it to something higher than 3, it used the whole screen. [...]]]></description>
			<content:encoded><![CDATA[<p>When running an Android Application, I found that  it was only using half the screen as in the screenshot here.</p>
<p><a href="http://dougdiego.com/wp-content/uploads/2012/01/moto_atrix_half_screen1.png"><img class="alignleft size-medium wp-image-420" title="moto_atrix_half_screen" src="http://dougdiego.com/wp-content/uploads/2012/01/moto_atrix_half_screen1-187x300.png" alt="" width="187" height="300" /></a><br />
I had this problem when the android:minSdkVersion was set to 3 in the AndroidManifest.xml</p>
<p>For example the following caused the issue:</p>
<pre class="brush: java; title: ; notranslate">
&lt;uses-sdk android:minSdkVersion=&quot;3&quot; /&gt;
</pre>
<p>When I set it to something higher than 3, it used the whole screen. For example:</p>
<pre class="brush: java; title: ; notranslate">
&lt;uses-sdk android:minSdkVersion=&quot;8&quot; /&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2012/01/17/android-app-using-only-half-the-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WT411 Celebrity Gossip Android App</title>
		<link>http://dougdiego.com/2011/07/09/wt411-celebrity-gossip-android-app/</link>
		<comments>http://dougdiego.com/2011/07/09/wt411-celebrity-gossip-android-app/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 16:48:03 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=393</guid>
		<description><![CDATA[My first Android App is in the App Store. WT411 Celebrity Gossip. It&#8217;s a mobile app for WT411.]]></description>
			<content:encoded><![CDATA[<p><a href="https://market.android.com/details?id=com.sendme.android.wt411"><img src="http://dougdiego.com/wp-content/uploads/2011/07/icon-300x300.png" alt="" title="WT411" width="200" height="200" class="alignleft size-medium wp-image-403" /></a><br />
My first Android App is in the App Store. <a href="https://market.android.com/details?id=com.sendme.android.wt411">WT411 Celebrity Gossip</a>.  It&#8217;s a mobile app for <a href="http://www.wt411.com/">WT411</a>.</p>
<p><br/><br />
<br/><br />
<br/><br />
<br/><br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2011/07/09/wt411-celebrity-gossip-android-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing the gasket on a front loading GE Washer</title>
		<link>http://dougdiego.com/2011/06/13/replacing-the-gasket-on-a-front-loading-ge-washer/</link>
		<comments>http://dougdiego.com/2011/06/13/replacing-the-gasket-on-a-front-loading-ge-washer/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 12:25:53 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Maintenance and Repair]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=390</guid>
		<description><![CDATA[Recent our front loading GE washer started leaking all over the floor. At first it was not obvious what was causing the leak. Eventually I found that the gasket on the door was torn and water was leaking through it. After searching online, this appeared to be a common problem with front loading GE washers. [...]]]></description>
			<content:encoded><![CDATA[<p>Recent our front loading GE washer started leaking all over the floor.  At first it was not obvious what was causing the leak.  Eventually I found that the gasket on the door was torn and water was leaking through it.</p>
<p>After searching online, this appeared to be a common problem with front loading GE washers.  </p>
<p>Our model number is: WH08X10036  Given this I search for the right part number.  These sites were helpful:</p>
<p><a href="http://searspartsdirect.com">http://searspartsdirect.com</a><br />
<a href="http://appliancepartspros.com">http://appliancepartspros.com</a><br />
<a href="http://repairclinic.com">http://repairclinic.com</a></p>
<p>And I found the part number I needed was: WH08X10036.</p>
<p>I found the part on Amazon: <a href="http://www.amazon.com/gp/product/B004H3XUEE">GE WH08X10036 Gasket for Washer</a></p>
<p>Installing it was not easy.  Luckily I found this helpful video: http://www.appliance-repair-it.com/GE-front-loader-washer.html</p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2011/06/13/replacing-the-gasket-on-a-front-loading-ge-washer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mbuzzy iPhone app</title>
		<link>http://dougdiego.com/2010/12/28/mbuzzy-iphone-app/</link>
		<comments>http://dougdiego.com/2010/12/28/mbuzzy-iphone-app/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 21:00:10 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=378</guid>
		<description><![CDATA[For the past couple of months, I&#8217;ve been working on an iPhone app for the social networking site: mbuzzy.com. It just went live into the App Store. Check it out: mbuzzy.app]]></description>
			<content:encoded><![CDATA[<p><a href="http://itunes.apple.com/app/mbuzzy-find-flirt-connect/id402886148?mt=8"><img src="http://dougdiego.com/wp-content/uploads/2010/12/mzi.wrwsokyz.175x175-75.jpg" alt="mbuzzy iPhone app" title="mbuzzy" width="175" height="175" class="alignleft size-full wp-image-382" /></a></p>
<p>For the past couple of months, I&#8217;ve been working on an iPhone app for the social networking site: <a href="http://mbuzzy.com">mbuzzy.com</a>.  It just went live into the App Store.  Check it out: <a href="http://itunes.apple.com/app/mbuzzy-find-flirt-connect/id402886148?mt=8">mbuzzy.app</a></p>
<p><br/><br />
<br/><br />
<br/><br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/12/28/mbuzzy-iphone-app/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Three20: Uploading an image to a server</title>
		<link>http://dougdiego.com/2010/12/24/three20-uploading-an-image-to-a-server/</link>
		<comments>http://dougdiego.com/2010/12/24/three20-uploading-an-image-to-a-server/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 20:00:44 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Three20]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=373</guid>
		<description><![CDATA[Here&#8217;s an example to upload an image (or any data file) to a server:]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an example to upload an image (or any data file) to a server:</p>
<pre class="brush: cpp; title: ; notranslate">
- (void) uploadMediaForUserId: (NSString*) userId {
	NSMutableDictionary *parameters = [NSMutableDictionary dictionaryWithObjectsAndKeys:
								kAPIVersion, @&quot;v&quot;,
								nil];
	// Media Name
	if( TTIsStringWithAnyText(_mediaName)){
		[parameters setObject:_mediaName forKey:@&quot;n&quot;];
	}

	// Media Description
	if( TTIsStringWithAnyText(_mediaDescription)){
		[parameters setObject:_mediaDescription forKey:@&quot;d&quot;];
	}

	// REST resource, where kMedia: @&quot;/users/%@/media&quot;;
	NSString *resource = [NSString stringWithFormat:kMedia, userId];

	// Create the URL, where kServerURL is something like &quot;http://www.dougdiego.com&quot;
	NSString *url = [kServerURL stringByAppendingFormat:@&quot;%@?%@&quot;, resource, [parameters gtm_httpArgumentsString]];
	// Resulting URL looks like: http://www.dougdiego.com/users/12345/media

	TTURLRequest* request = [TTURLRequest requestWithURL:url  delegate:self];
	request.httpMethod = @&quot;POST&quot;; 

	NSString * imageLocalUrl = [NSString stringWithFormat:@&quot;documents://%@&quot;,_mediaFilename];
	NSData *imageData = UIImageJPEGRepresentation(TTIMAGE(imageLocalUrl), 0.6); 

	// Set the media file with the parameter: file
	[request addFile:imageData mimeType:@&quot;image/jpeg&quot;  fileName:@&quot;file&quot;]; 

	request.cachePolicy = TTURLRequestCachePolicyNoCache;
	request.cacheExpirationAge = TT_CACHE_EXPIRATION_AGE_NEVER;

	TTURLJSONResponse* response = [[TTURLJSONResponse alloc] init];
	request.response = response;
	TT_RELEASE_SAFELY(response);

	[request send];
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/12/24/three20-uploading-an-image-to-a-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Three20: Swipe to delete</title>
		<link>http://dougdiego.com/2010/12/24/three20-swipe-to-delete/</link>
		<comments>http://dougdiego.com/2010/12/24/three20-swipe-to-delete/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 14:00:28 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=368</guid>
		<description><![CDATA[Need to implement Swipe to delete in your Three20 project? In order to do so, I added the 3 following methods to my datasource (TTListDataSource subclass): Note: before adding the numberOfRowsInSection method, I was getting NSInternalInconsistencyException errors.]]></description>
			<content:encoded><![CDATA[<p>Need to implement Swipe to delete in your <a href="http://three20.info/">Three20</a> project?  In order to do so, I added the 3 following methods to my datasource (TTListDataSource subclass):</p>
<pre class="brush: cpp; title: ; notranslate">
- (BOOL) tableView: (UITableView *)tableView canEditRowAtIndexPath:  (NSIndexPath *)indexPath {
	return YES;
}

- (void)tableView:(UITableView *)tableView commitEditingStyle: (UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
	[tableView beginUpdates];
	if (editingStyle == UITableViewCellEditingStyleDelete) {
        // Make sure the row is there to delete
		if([_myModel.messages count] &gt;= indexPath.row){
            // Get the object to delete
			MyObject* myObject = [[_myModel.messages objectAtIndex:indexPath.row] retain];

           	// Remove the object, in my case this makes an API call
            [self removeObjectById: myobject.id];

            // Remove the object from the array
			[_myModel.messages removeObjectAtIndex:indexPath.row];

			// clean up
			TT_RELEASE_SAFELY(myObject);
		}
        // Delete the row from the UITableView
		[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath, nil] withRowAnimation:YES];
	}
	[tableView endUpdates];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
	return [_myModel.messages count];
}
</pre>
<p>Note: before adding the numberOfRowsInSection method, I was getting <strong>NSInternalInconsistencyException</strong>  errors.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/12/24/three20-swipe-to-delete/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Targeting the iPhone 4</title>
		<link>http://dougdiego.com/2010/12/24/targeting-the-iphone-4/</link>
		<comments>http://dougdiego.com/2010/12/24/targeting-the-iphone-4/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 04:44:51 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=360</guid>
		<description><![CDATA[Are you releasing a flashlight app for the iPhone 4 or writing an application that use the capabilities of a certain device? Apple provides a UIKit Dictionary key called UIRequiredDeviceCapabilities for this purpose. Apple define this key as: UIRequiredDeviceCapabilities (Array or Dictionary &#8211; iOS) lets iTunes and the App Store know which device-related features an [...]]]></description>
			<content:encoded><![CDATA[<p>Are you releasing a flashlight app for the iPhone 4 or writing an application that use the capabilities of a certain device?  Apple provides a UIKit Dictionary key called UIRequiredDeviceCapabilities for this purpose.  </p>
<p>Apple define this key as: <em><strong><a href="http://developer.apple.com/library/mac/#documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html">UIRequiredDeviceCapabilities</a></strong> (Array or Dictionary &#8211; iOS) lets iTunes and the App Store know which device-related features an application requires in order to run. iTunes and the mobile App Store use this list to prevent customers from installing applications on a device that does not support the listed capabilities.</em></p>
<p>You set this key in the Info.plist.  Here is an example which tells the App Store that your app requires a camera flash.  You can use this if your app only runs on the iPhone 4:<br />
<a href="http://dougdiego.com/wp-content/uploads/2010/12/Screen-shot-2010-12-23-at-8.31.19-PM.png"><img src="http://dougdiego.com/wp-content/uploads/2010/12/Screen-shot-2010-12-23-at-8.31.19-PM-300x31.png" alt="" title="Screen shot 2010-12-23 at 8.31.19 PM" width="300" height="31" class="alignnone size-medium wp-image-362" /></a></p>
<pre class="brush: cpp; title: ; notranslate">
	&lt;key&gt;UIRequiredDeviceCapabilities&lt;/key&gt;
	&lt;array&gt;
		&lt;string&gt;camera-flash&lt;/string&gt;
	&lt;/array&gt;
</pre>
<p>More: <a href="http://developer.apple.com/library/mac/#documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html">UIKit Keys</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/12/24/targeting-the-iphone-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Custom Fonts with FontLabel</title>
		<link>http://dougdiego.com/2010/12/23/iphone-custom-fonts-with-fontlabel/</link>
		<comments>http://dougdiego.com/2010/12/23/iphone-custom-fonts-with-fontlabel/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 02:52:24 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=353</guid>
		<description><![CDATA[Need to use your own custom font? Or you want to support a certain font that isn&#8217;t on older iPhonts? Check out the project FontLabel. To use FontLabel: 1. Get a copy of the project: https://github.com/zynga/FontLabel.git 2. Add the files to your project: 3. Add a font file to your project. You can find several [...]]]></description>
			<content:encoded><![CDATA[<p>Need to use your own custom font?  Or you want to support a certain font that isn&#8217;t on older iPhonts?  Check out the project <a href="https://github.com/zynga/FontLabel">FontLabel</a>.</p>
<p>To use FontLabel:<br />
1. Get a copy of the project: <a href="https://github.com/zynga/FontLabel.git">https://github.com/zynga/FontLabel.git</a></p>
<p>2. Add the files to your project:<br />
<a href="http://dougdiego.com/wp-content/uploads/2010/12/Screen-shot-2010-12-22-at-6.43.56-PM.png"><img src="http://dougdiego.com/wp-content/uploads/2010/12/Screen-shot-2010-12-22-at-6.43.56-PM.png" alt="" title="Add FontLabel files to your project" width="279" height="206" class="alignnone size-full wp-image-356" /></a></p>
<p>3. Add a font file to your project.   You can find several free fonts here: <a href="http://www.webpagepublicity.com/free-fonts.html">http://www.webpagepublicity.com/free-fonts.html</a></p>
<p>4. In your AppDelegate, add the import:</p>
<pre class="brush: cpp; title: ; notranslate">
#import &quot;FontManager.h&quot;
</pre>
<p>And then load the font file in the didFinishLaunchingWithOptions:</p>
<pre class="brush: cpp; title: ; notranslate">
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
	// Load Custom Fonts
	[[FontManager sharedManager] loadFont:@&quot;FuturaBoldBT&quot;];
}
</pre>
<p>In my example, I used the font &#8220;FuturaBoldBT.ttf</p>
<p>5.  Finally create a FontLabel, which is just a subclass of UILabel:</p>
<pre class="brush: cpp; title: ; notranslate">
-(void) displayMyLabel {
        FontLabel * myLabel = [[FontLabel alloc] initWithFrame:CGRectMake(10, 30, 50, 30)
												fontName:@&quot;FuturaBoldBT&quot; pointSize:26.0f];
	myLabel.textAlignment = UITextAlignmentCenter;
	myLabell.textColor = UIColor.whiteColor;
	[myLabel setBackgroundColor:UIColor.clearColor];
	[self addSubview:myLabel];
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/12/23/iphone-custom-fonts-with-fontlabel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sgx error (background gpu access not permitted)</title>
		<link>http://dougdiego.com/2010/10/01/sgx-error-background-gpu-access-not-permitted/</link>
		<comments>http://dougdiego.com/2010/10/01/sgx-error-background-gpu-access-not-permitted/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 15:45:07 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=344</guid>
		<description><![CDATA[I recently started seeing this error in my Cocos 2d iPhone application running on iOS 4.1: sgx error (background gpu access not permitted): Program received signal: “SIGABRT”. After searching around, I found this thread on the cocos2d forum. I modified my code in the ApplicationDelegate to look like: This solved my problem. I hope it [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started seeing this error in my Cocos 2d iPhone application running on iOS 4.1:<br />
<code><br />
sgx error (background gpu access not permitted):<br />
Program received signal: “SIGABRT”.<br />
</code></p>
<p>After searching around, I found this <a href="http://www.cocos2d-iphone.org/forum/topic/7326">thread</a> on the cocos2d forum.</p>
<p>I modified my code in the ApplicationDelegate to look like:</p>
<pre class="brush: cpp; title: ; notranslate">
- (void)applicationDidEnterBackground:(UIApplication *)application
{
	[[CCDirector sharedDirector] stopAnimation];
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
	[[CCDirector sharedDirector] startAnimation];
}

- (void)applicationWillResignActive:(UIApplication *)application
{
	[[CCDirector sharedDirector] pause];
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
	[[CCDirector sharedDirector] resume];
}
</pre>
<p>This solved my problem. I hope it helps someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/10/01/sgx-error-background-gpu-access-not-permitted/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iTerm crashing on launch</title>
		<link>http://dougdiego.com/2010/04/10/iterm-crashing-on-launch/</link>
		<comments>http://dougdiego.com/2010/04/10/iterm-crashing-on-launch/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 14:16:57 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=334</guid>
		<description><![CDATA[I&#8217;ve recently been using iTerm on the Mac. I was happily using it, until it started crashing on launch. After searching around on the internet, I finally figure out what is wrong. The issue occurred because I was using an external display. When not connected to the external display the app would crash. I found [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently been using <a href="http://iterm.sourceforge.net/">iTerm</a> on the Mac.  I was happily using it, until it started crashing on launch.  After searching around on the internet, I finally figure out what is wrong.  The issue occurred because I was using an external display.  When not connected to the external display the app would crash.</p>
<p>I found details in this bug here: <a href="http://sourceforge.net/tracker/index.php?func=detail&#038;aid=2889711&#038;group_id=67789&#038;atid=518973">http://sourceforge.net/tracker/index.php?func=detail&#038;aid=2889711&#038;group_id=67789&#038;atid=518973</a></p>
<p>There are 2 easy ways to solve this problem.</p>
<p>1. In the normal terminal type:<br />
<code><br />
defaults delete net.sourceforge.iTerm "NSWindow Frame iTerm Window 0"<br />
</code><br />
2. Open ~/Library/Preferences/net.sourceforge.iTerm.plist  and removed the following entry:<br />
<code>NSWindow Frame iTerm Window 0: <a bunch of numbers></code></p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/04/10/iterm-crashing-on-launch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

