home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / Tutorial / Cookbook / 23.popup / popup.m < prev    next >
Encoding:
Text File  |  1993-01-18  |  530 b   |  42 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import "popup.h"
  5. #include <appkit/appkit.h>
  6.  
  7. @implementation popup
  8.  
  9. - appDidInit:sender
  10. {
  11.     id    pul;
  12.  
  13.     pul = [PopUpList new];
  14.  
  15.     [pul addItem:"One"];
  16.     [pul addItem:"Two"];
  17.     [pul addItem:"Three"];
  18.     [pul addItem:"Four"];
  19.     [pul addItem:"Five"];
  20.     [pul addItem:"Six"];
  21.  
  22.     NXAttachPopUpList(pulButton, pul);
  23.  
  24.     return self;
  25. }
  26.  
  27. - setPulButton:anObject
  28. {
  29.     pulButton = anObject;
  30.  
  31.     return self;
  32. }
  33.  
  34. - itsPushed:sender
  35. {
  36.     printf("'%s' was selected\n", [[sender selectedCell] title]);
  37.  
  38.     return self;
  39. }
  40.  
  41. @end
  42.