objective c - NSMenu Not connecting method of another class -


   -(void)rightmousedown:(nsevent *)theevent   {       cvcont = [[collectionviweitemsubclass alloc] init ];       nsmenu * m = [[nsmenu alloc] init];       //[cvcont openinfinder];----perfectly working------       [self settarget:cvcont];       [m additemwithtitle:@"show in finder" action:@selector(openinfinder) keyequivalent:@""];// not working-----       [nsmenu popupcontextmenu:m withevent:theevent forview:self];   } 

i subclassed button , calling method class collectionviweitemsubclass . if calling working. method not connected via nsmenu. below code method class collectionviewitemsubclass

-(void)openinfinder { nsstring *savedvalue = [[nsuserdefaults standarduserdefaults]                         stringforkey:@"filepath"]; [[nsworkspace sharedworkspace] selectfile:savedvalue infileviewerrootedatpath:nil]; 

}


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -