home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / SourceCode / MiscKit / Source / MiscSwapKit / MiscSwapViewByMatrix.m < prev    next >
Encoding:
Text File  |  1994-03-08  |  1.1 KB  |  41 lines

  1. /* MiscSwapViewByMatrix.m                 
  2.  *
  3.  * This is a SwapView that can handle swapping triggered by objects inside
  4.  * a matrix. Sorry no multiple buttons inside a matrix.
  5.  *
  6.  * For more interface-info see the header file. More in depth information
  7.  * can be found here in the source-code.
  8.  *
  9.  * Written by:         Thomas Engel
  10.  * Created:            24.01.1994 (Copyleft)
  11.  * Last modified:     24.02.1994
  12.  */
  13.  
  14. #import <misckit/misckit.h>
  15.  
  16. @implementation MiscSwapViewByMatrix
  17.  
  18. - swapContentView:sender
  19. {
  20.     // To handle matrix actions properly we have to keep in mind that the
  21.     // sender is not the (button)cell triggering the matrix but the selected
  22.     // object of this matrix. 
  23.     // So all we have to do is change the sender to the selectedCell an
  24.     // leave the rest to our superClass.
  25.     
  26.     return [super swapContentView:[sender selectedCell]];
  27. }
  28.  
  29. @end
  30.  
  31. /*
  32.  * History: 24.02.94 Made it conform to the new swapView methods.
  33.  *
  34.  *            24.01.94 Made it MiscSwap conform.
  35.  *
  36.  *            08.01.94 Derived from the basic swapController to serve the need
  37.  *                     to handle different buttons inside a scrollable matrix.
  38.  *
  39.  *
  40.  * Bugs: Not here!
  41.  */