Hi,

Out of interest, have you tried doing this:

- (NSMenuItem*)itemWithTag:(NSInteger)tag searchSubmenus:(BOOL)searchSubmenus 
depthFirst:(BOOL)depthFirst
{
NSMenuItem*     item;                           //*****
NSArray*                myArray;                        //*****
NSMenuItem*     subitem;                                //***** 

   if(!depthFirst) {
       id               item = [self itemWithTag:tag];

       if(item)
           return item;
   }

   if(searchSubmenus) 
        {
        myArray = [self itemArray];                     //******
       for( item in myArray]) 
        {
           if([item hasSubmenu])
                 {
                subitem = [[item submenu] itemWithTag:tag 
searchSubmenus:searchSubmenus depthFirst:depthFirst];

               if(subitem)
                   return subitem;
                 }
       }
   }

   return [self itemWithTag:tag];
}

I doubt it will make any difference, but I've had problems with definining 
variable in the for/in statement before.

Cheers
Dave


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to