ftp.nice.ch/Attic/openStep/developer/bundles/GDBbundle.1.0.s.tgz#/GDBbundle-1.0.s/TextEdit/NSMenuAdditions.m

This is NSMenuAdditions.m in view mode; [Download] [Up]

/* NSMenuAdditions.m created by ovidiu on Sat 29-Mar-1997 */

#import "NSMenuAdditions.h"

@implementation NSMenu (NSMenuAdditions)

- (NSMenuItem*)itemWithSlashedTitle:(NSString*)title
{
    NSArray* path = [title componentsSeparatedByString:@"/"];
    int i, count = [path count];
    NSMenuItem* cell = nil;
    NSMenu* menu = self;

    for (i = 0; i < count; i++) {
        cell = [menu itemWithTitle:[path objectAtIndex:i]];
        if ([cell hasSubmenu])
            menu = [cell target];
        else
            menu = nil;
    }

    return cell;
}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.