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 »
Monthly Archives: March 2010
Tomorrow’s April Fools’ Day; Prepare Yourself and Enjoy These Geek Pranks [Reminders]
How to Whip Your Movie and TV Show Art into Shape for XBMC and Boxee [Media Center]
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]
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.
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 »
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 »







