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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -