583UIAlertViews additional Buttons

UIAlertView *alert = [[UIAlertView alloc]
	 message:@"Do you really want to?"
	 otherButtonTitles:@"OK", nil];
The intuively unobvious thing is, that otherButtonTitles requires a nil-terminated, comma-seperated list(?) of NSStrings. Although you can add (any number?) of additional buttons, it gets silly after about 3. Another thing to note is that in the case of two buttons, they get displayed side by side, whereas one button or more than two are shown vertically stacked.

214NSMutableArray: setObject vs. setValue

Following situation Using TouchXML to parse XML data, works without problem on example XML files, but crahes on mine. Problem Empty values in my data set. (sometimes <place>somePlace</place>, sometimes <place></place>)
/* CXMLDocument setup & parsing omitted */
NSString *e = [[resultElement childAtIndex:counter] stringValue];
NSString *k = [[resultElement childAtIndex:counter] name];

[blogItem setObject:e forKey:k];
// crashes when e is empty. Displays a (null), is nil
Solution 1 Check for empty e, replace nil with empty string
// check if element is empty
if ( nil == e ) {	// ...or the less elegant (0 == [e length])
	e = @"";
[blogItem setObject:e forKey:k];
Solution 2 Use setValue instead of setObject, as setObject crashes and burns when it encounters nil, whereas setValue specifically deals only with strings and handles nil gracefully.
[blogItem setValue:e forKey:k];