Skip to content

Instantly share code, notes, and snippets.

@orlaqp
Created September 12, 2010 03:40
Show Gist options
  • Save orlaqp/575817 to your computer and use it in GitHub Desktop.
Save orlaqp/575817 to your computer and use it in GitHub Desktop.
- (void)setMenuTarget:(CPMenu)aMenu
{
for (var i=0; i < [[aMenu itemArray] count]; i++)
{
var item = [aMenu itemArray][i];
[item setTarget:self];
if ([item hasSubmenu])
{
[self setMenuTarget:[item submenu]];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment