Monthly Archives: March 2010

Tomorrow’s April Fools’ Day; Prepare Yourself and Enjoy These Geek Pranks [Reminders]

Tomorrow’s April Fools’ Day, the one day a year that regularly upstanding publications push all sorts of nonsense and pranks are the rule of the day. Aside from offering this as a helpful reminder to take the crazy/exciting/incredible news you hear across the internet tomorrow with a grain of salt, we’d also like to remind you, if you’re the pranking sort, to check out these 10 harmless and awesome geek pranks. Be good, now! More »






How to Whip Your Movie and TV Show Art into Shape for XBMC and Boxee [Media Center]

Media centers like XBMC and Boxee are excellent tools for playing local media on your big screen, but many new (and even experienced) users run into one big stumbling block: How do you get them to correctly identify your media? Here’s how. More »






Understand Your Camera’s Histogram to Take More Balanced Pictures [Photography Tip]

Whether you’ve got a DSLR or you’ve turned your point-and-shoot into a super camera, those fancy features are useless if you don’t understand them. Want to capture a perfectly exposed picture? Learning to use your histogram is a good starting point. More »






Why You Should Never Pay More Than $10 For HDMI Cables [Infographics]

You’ve probably guessed that gold-plated cables for your home theater are entirely unnecessary. Still, there must be some small quality difference for all that price, right? Mint.com‘s blog lays out the answer: No, not at all. More »






Syphir Adds Awesome Advanced Filters to Gmail [Screenshot Tour]

Ever wish you could get even more nit-picky about your Gmail filters? Free Gmail-based webapp Syphir filters messages by arrival time, number of recipients, and whether they “need” replies. It really works, and it might just scratch your last, hard-to-reach inbox itch. More »






Read Files from the Application Bundle

Below are a few lines of code to get you started if you need to open and read a file that is stored in the application bundle. Files could be anything from help text that your application displays to specific content that facilitates testing.

As an example of the later, often times I find it helpful to put json (or xml) content into a file that I know is valid based on a remote server that I will eventually connect with. I add this file to the application bundle and read it into an internal data structure. I can then do various tests with known data, and once that is working, I can then proceed to the networking side of things to connect and retrieve live data.

// Read in and store as string NSString *file = [[NSBundle mainBundle] pathForResource:@"jsonTest" ofType:@"txt"]; NSString *str = [NSString stringWithContentsOfFile:file     encoding:NSUTF8StringEncoding error:NULL]; debug(@"str: %@", str);   // Do something with the test data...   // Read in and store as raw data bytes NSString *file2 = [[NSBundle mainBundle] pathForResource:@"data" ofType:@"txt"]; NSData *data = [NSData dataWithContentsOfFile:file2];

Another SuperDB Validation Tweak

In ManagedObjectAttributeEditor.m, there is this method:

...
#pragma mark -
#pragma mark Alert View Delegate
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == [alertView cancelButtonIndex]) {
[self.managedObject.managedObjectContext rollback];
[self.navigationController popViewControllerAnimated:YES];
}

}

@end

Now, if you say you’re going to fix, and then don’t, the context never gets rolled back. It should really be:

...
#pragma mark -
#pragma mark Alert View Delegate
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
[self.managedObject.managedObjectContext rollback];
if (buttonIndex == [alertView cancelButtonIndex]) {
[self.navigationController popViewControllerAnimated:YES];
}

}

@end

Since we don’t have bindings, the incorrect value shown in the GUI will stay there, we’re just removing it from the context. When they hit Save again, we’ll copy the value back into the context, but if they hit cancel, we won’t leave an invalid value sitting in the unsaved context.

©2008-2010 Jeff LaMarche.
iphonedevelopment.blogspot.com

Postponer Adds ReadItLater Integration to Google Chrome [Downloads]

Chrome only: Google Chrome extension Postponer integrates the popular ReadItLater service directly into Google Chrome, so you can save interesting articles for later reading, and easily retrieve them with a toolbar button. More »






MapQuest 4 Mobile Brings Free Turn-by-Turn, Voice-Guided GPS to iPhone [Downloads]

iPhone: If you’re an iPhone user who’s jealous of Android’s awesome free, turn-by-turn, voice-guided Google Maps Navigation GPS app, here’s some good news: MapQuest just released its own free voice navigation app for the iPhone. More »






Hackintosh Updates Like a Charm to 10.6.3 [Updates]

Good news, Hackintoshers! If you followed our most recent guides to installing Snow Leopard on a PC from start to finish or the updated guide to building a Hackintosh with Snow Leopard, no hacking required, yesterday’s OS X 10.6.3 update should go off without a hitch. More »






WP Like Button Plugin by Free WordPress Templates