- MenuRef carbonMenu = [self menuRef];
-
- if (carbonMenu) {
- SetMenuItemIndent(carbonMenu, index, indentLevel);
+ if ([[self itemAtIndex:index] respondsToSelector:@selector(setIndentationLevel:)]) {
+ [[self itemAtIndex:index] setIndentationLevel:indentLevel];
+ } else {
+ MenuRef carbonMenu = [self menuRef];
+ if (carbonMenu) {
+ SetMenuItemIndent(carbonMenu, index + 1, indentLevel);
+ }