Frameworks/AIUtilities Framework/Source/AIMenuAdditions.m
branchadium-1.5.11
changeset 6016 325e2ab3406f
parent 4897 5ea3bd51010d
equal deleted inserted replaced
6014:fcb71cb71a3d 6016:325e2ab3406f
    48     [self addItem:theMenuItem];
    48     [self addItem:theMenuItem];
    49     
    49     
    50     return [theMenuItem autorelease];
    50     return [theMenuItem autorelease];
    51 }
    51 }
    52 
    52 
    53 
       
    54 - (void)removeAllItems
       
    55 {
       
    56 	NSInteger count = [self numberOfItems];
       
    57 	while (count--) {
       
    58 		[self removeItemAtIndex:0];
       
    59 	}
       
    60 }
       
    61 
       
    62 - (void)removeAllItemsButFirst
    53 - (void)removeAllItemsButFirst
    63 {
    54 {
    64 	NSInteger count = [self numberOfItems];
    55 	NSInteger count = [self numberOfItems];
    65 	if (count > 1) {
    56 	if (count > 1) {
    66 		while (--count) {
    57 		while (--count) {