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

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -