home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / next / programm / 5689 < prev    next >
Encoding:
Text File  |  1992-08-18  |  1.4 KB  |  40 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!ede978e
  3. From: ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson)
  4. Subject: Re: Playing with PopUp's
  5. Message-ID: <1992Aug19.053049.14910@monu6.cc.monash.edu.au>
  6. Organization: Monash University, Caulfield Campus
  7. References: <1992Aug19.035329.28491@monu6.cc.monash.edu.au>
  8. Date: Wed, 19 Aug 1992 05:30:49 GMT
  9. Lines: 29
  10.  
  11. ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson) writes:
  12.  
  13. >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.
  14.  
  15. >I have this code.
  16.  
  17. >popUp = [[NXApp employeePanel] popUp];
  18. >if (popUp) {
  19. >   Matrix *popUpMatrix = [[popUp target] itemList]; 
  20. >   [popUp setTitle: [[popUpMatrix findCellWithTag:1] title]];
  21. >}    
  22.  
  23. >This code just has a cosmetic affect it doesn't actually message the target.
  24.  
  25. >Is this how setTitle is suppose to work?
  26.  
  27. Ok the following works for me.
  28.  
  29. Correct me if you know a more efficient way.
  30.  
  31. popUp = [[NXApp employeePanel] popUp];
  32. if (popUp) {
  33.          Matrix *popUpMatrix = [[popUp target] itemList]; 
  34.                                              MenuCell *selectCell = [popUpMatrix findCellWithTag:1]; 
  35.          [popUpMatrix selectCell:selectCell];
  36.                                              [popUpMatrix sendAction]; 
  37.                                         }            
  38.  
  39.  
  40.