Entries Tagged 'Debugging' ↓
August 31st, 2009 — CSS, Debugging, Web Development, ie6
A Frequent Problem with ie6: The bottom of the text (e.g. g y p) get cut off and make text illegible. This mostly happens with two line breaks and can be fixed by using a larger line-height in css.
To fix the problem we are going to create a class using the internet explorer 6 box hack.
We need to locate the exact area that we are having the problem with. For me the text was being cut off at .description h4 a
* HTML .description h4 a {
line-height: 1.2em;
}
To fix the text cut off issue without the box hack just simply created a css class and adjsut the line-height
p { line-height: 1.2em; }
August 28th, 2009 — CoreData, Debugging, iPhone Apps, iPhone Development
One of my CoreData applications started acting buggy, and was spitting out a huge error dump on app close in the debug console. The errors spitting out didn't tell me anything but CoreData Error 1560 and 1570. Upon inspection I found on google that another layer of errors is stored in the CoreData foundation. On Stack OverFlow found a very useful function but re-wrote it because
![[survey managedObjectContext] save:&error]
was causing an error.
Add this into you applicationWillTerminate function in your Application Delegate
/**
applicationWillTerminate: saves changes in the application's managed object context before the application terminates.
*/
- (void)applicationWillTerminate:(UIApplication *)application {
NSError* error;
if(![[self managedObjectContext] save:&error]) {
NSLog(@"Failed to save to data store: %@", [error localizedDescription]);
NSArray* detailedErrors = [[error userInfo] objectForKey:NSDetailedErrorsKey];
if(detailedErrors != nil && [detailedErrors count] > 0) {
for(NSError* detailedError in detailedErrors) {
NSLog(@" DetailedError: %@", [detailedError userInfo]);
}
}
else {
NSLog(@" %@", [error userInfo]);
}
}
}
The original post can be found here
The cause of Error in my CoreData Application was an Attribute in my xcdatamodel file. An optional field was checked as indexed and not optional. The simple action of unchecking indexed and checking optional fixed a whole mass of errors.
