Interface Builder does not save Xib file on Build

After 30-50 minutes of rage and starting the project over, I learned the hard way that just because Interface Builder is part of the Xcode suite, it has no clue when Xcode is building. Thus does not save the .xib file, and thus why I had no UI widgets turning up in the simulator.

I watched a demo video so many times over and over, checking every step is done, and it’s the one he does with the keyboard short-cut, and doesn’t mention, saving. ARGGGG!

WinCE SDK problems in Windows 7

For the last few weeks, my work project has not been building it’s WinCE target on my new Windows 7 PC. Each project would just say “skipping build”,

12>------ Skipped Build: Project: PROJECT_NAME_12 ------
12>
13>------ Skipped Build: Project: PROJECT_NAME_13 ------
13>
========== Build: 0 succeeded or up-to-date, 0 failed, 13 skipped ==========

and if I tried to edit the project properties (or build/clean/rebuild project only), I would get

The operation could not be completed

It then dawned on my to try a new project test, and the SDK was missing from the options:

A bit of focused searching found Windows CE: SDK Doesn’t Show up in Visual Studio 2008 post, and the solution worked for me with my Visual Studio 2005 SDK under Windows 7 also:

  1. Make sure Visual Studio 2005is not running. I also shut down the device emulator manager but you may not be using that
  2. Open a “Visual Studio 2005 Command Prompt” as Administrator. On Windows 7 just right click the short cut and pick the “Run as administrator” option
  3. Enter the following command: msiexec /package <the path to your .msi file>
  4. Install

You need to used the same steps above to uninstall the SDK as well (as compared to the Control Panel’s ‘Programs and Features’ options), otherwise it won’t uninstall correctly.

WordPress 3.0.4 IIS redirect error in Google Webmaster Tools

For the last few months I’ve had a problem with Google Webmaster Tools complaining that I have pages that it can’t fetch.

Previously I had Not Found errors for pages Google had crawled before I got my permalinks sorted after moving hosts. For those issues I placed mod-rewrite rules in my .htaccess like so:

# Fix broken links that Google remembers and tries to follow now and then
RewriteRule ^blog/2007/07/17/topcoder-single-round-match-257/ /blog/2005/08/09/topcoder-single-round-match-257/ [R=301,L]

But for the pages Google currently reports as getting 404’s my web-browser redirects correctly. So I used the Fetch as Googlebot lab tool and got 404’s

HTTP/1.1 404 Not Found
Date: Tue, 25 Jan 2011 18:25:58 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET,PHP/5.2.14
X-Pingback: http://simeonpilgrim.com/blog/xmlrpc.php
Content-Type: text/html; charset=UTF-8
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Tue, 25 Jan 2011 18:25:58 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Refresh: 0;url=http://simeonpilgrim.com/blog/2005/08/04/curse-of-the-azure-bonds-project/
Content-Length: 0

So I can see why the browser works, it’s following the Refresh, to show the 404 page, but the real page is shown, and no-one is the wiser, but Google doesn’t like that.

I started thinking it might be a problem with the ISS mod_rewrite plug-in used, but it has been working for ages. After reading pages about HTML redirecting and started to suspect WordPress, after realizing that the error pages where pages that I had renamed the permalink, so I went digging in the code, and found this:

function wp_redirect($location, $status = 302) {
	global $is_IIS;

	$location = apply_filters('wp_redirect', $location, $status);
	$status = apply_filters('wp_redirect_status', $status, $location);

	if ( !$location ) // allows the wp_redirect filter to cancel a redirect
		return false;

	$location = wp_sanitize_redirect($location);

	if ( $is_IIS ) {
		header("Refresh: 0;url=$location");
	} else {
		if ( php_sapi_name() != 'cgi-fcgi' )
			status_header($status); // This causes problems on IIS and some FastCGI setups
		header("Location: $location", true, $status);
	}
}

so I commented out the ISS check:

	//simeon
	//if ( $is_IIS ) {
	//	header("Refresh: 0;url=$location");
	//} else {
		if ( php_sapi_name() != 'cgi-fcgi' )
			status_header($status); // This causes problems on IIS and some FastCGI setups
		header("Location: $location", true, $status);
	//}

and the page still load for me, so tested with Fetch as Googlebot and now Googlebot is happy!

HTTP/1.1 301 Moved Permanently
Date: Tue, 25 Jan 2011 18:51:18 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET,PHP/5.2.14
X-Pingback: http://simeonpilgrim.com/blog/xmlrpc.php
Content-Type: text/html; charset=UTF-8
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Tue, 25 Jan 2011 18:51:18 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Location: http://simeonpilgrim.com/blog/2005/08/04/curse-of-the-azure-bonds-project/
Content-Length: 0

So not sure what problems WordPress users have on IIS, and hope I’ve not opened a can of worms, but for now this is just another customisation to keep track of.

Blog Customisations

I noticing that a few changes I made to my blog UI had been lost by upgrading theme’s and base WordPress code. Argg, I must remember to merge stuff when upgrading. I previously had my own theme to help handle this as I’d changed a lot of things about the default 2.x theme.

So this is mainly a note for myself, to help the future me locate and fix pet peeves.

To remove the annoying “continue reading” excerpts from Category/Tag views:

	<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
			<div class="entry-summary">
				<?php the_excerpt(); ?>
			</div><!-- .entry-summary -->
	<?php else : ?>
	<?php if ( is_search() ) : // Only display excerpts for archives and search. ?>
			<div class="entry-summary">
				<?php the_excerpt(); ?>
			</div><!-- .entry-summary -->
	<?php else : ?>

and remove all the comment formatting junk that nobody uses and that clutters the Google Webmaster Tools site keywords tool:

		'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>',
		'comment_notes_after'  => '<p class="form-allowed-tags">' . sprintf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s' ), ' <code>' . allowed_tags() . '</code>' ) . '</p>',
		'id_form'              => 'commentform',
		'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>',
		'comment_notes_after'  => '<p class="form-allowed-tags">' . __( 'You may use a subset of HTML tags and attributes' ) . '</p>',
		'id_form'              => 'commentform',

MacBook upgrades

A few months back we upgrade from 1GB to 4GB of memory in the MacBook. Two weeks ago I upgraded from Leopard to Snow Leopard, wow it has a smaller foot print, it also just works better and runs 64bit, I didn’t even know the MacBook was a 64bit CPU. This weekend I upgraded the hard disk from 80GB to a 320GB disk. Wow lots of space again.

Wow tech hardware is so cheap here in the USA, and upgrading the MacBook was so simple, I’m a little shocked I didn’t do it earlier.

Now I just just need to hurry up with an idea and build an iPod/iPhone app.