home *** CD-ROM | disk | FTP | other *** search
Wrap
Newsgroups: comp.sys.next.programmer Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!ede978e From: ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson) Subject: Re: Playing with PopUp's Message-ID: <1992Aug19.053049.14910@monu6.cc.monash.edu.au> Organization: Monash University, Caulfield Campus References: <1992Aug19.035329.28491@monu6.cc.monash.edu.au> Date: Wed, 19 Aug 1992 05:30:49 GMT Lines: 29 ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson) writes: >I wish to set the title of my popUp and this is working properly but for one thing. I basically just want to select an item programatically but also have its action sent to its target. Currently the action is not sent. >I have this code. >popUp = [[NXApp employeePanel] popUp]; >if (popUp) { > Matrix *popUpMatrix = [[popUp target] itemList]; > [popUp setTitle: [[popUpMatrix findCellWithTag:1] title]]; >} >This code just has a cosmetic affect it doesn't actually message the target. >Is this how setTitle is suppose to work? Ok the following works for me. Correct me if you know a more efficient way. popUp = [[NXApp employeePanel] popUp]; if (popUp) { Matrix *popUpMatrix = [[popUp target] itemList]; MenuCell *selectCell = [popUpMatrix findCellWithTag:1]; [popUpMatrix selectCell:selectCell]; [popUpMatrix sendAction]; }