home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / ConversionScripts / TableView.tops < prev    next >
Encoding:
Text File  |  1995-08-26  |  20.9 KB  |  539 lines

  1.  
  2. /***************************************************************************************
  3.                 NXTableView -> NSTableView
  4. ****************************************************************************************/
  5.  
  6. /* Can't do anything about these because they are used other places in the appkit
  7.     - setMode:(int) newMode;
  8.     - (int)mode;
  9.     
  10.     - (void)setAllowsMultipleSelection:(BOOL)flag;
  11.     - (BOOL)allowsMultipleSelection;
  12. */
  13.  
  14.  
  15. replace "[<rec> setColumnHeadingVisible:<noArg>]" with "[<rec> setHeaderView:nil]"
  16.     where "<noArg>" isOneOf {
  17.     "NO",
  18.     "No",
  19.     "0"
  20.     }
  21.  
  22. replacemethod "setColumnHeadingVisible:" with same
  23.     error "TableViewConversion: setColumnHeadingVisible: is obsolete.  To hide the heading use setHeaderView:nil.  To show a heading set the header view to something appropriate (like setHeaderView:[[[NSTableHeaderView alloc] init] autorelease])"
  24.  
  25. replace "[<rec> isColumnHeadingVisible]" with "([<rec> headerView] != nil)"
  26.  
  27. replacemethod "isColumnHeadingVisible" with "headerView"
  28.     warning "TableViewConversion: The column heading is always visible if there is a header view (i.e. if [myTableView headerView] != nil)"
  29.  
  30.  
  31. /* - setIntercell:(const NXSize *)aSize;    - (void)setIntercellSpacing:(NSSize)aSize;
  32. */
  33. replacemethod "setIntercell:<size>" with "setIntercellSpacing:<size>" {
  34.     replace "<rettype>" with "(void)"
  35.     replace "<size_type>" with "(NSSize)"
  36.     replace "<size_arg>" with "*<size_arg>"
  37.     }
  38.     within ("<implementation>") {
  39.     replace "<size_param>->" with "*<size_param>."
  40.     replace "<size_param>" with "&<size_param>"
  41.     }
  42.  
  43.  
  44. /* - getIntercell:(NXSize *)theSize;        - (NSSize)intercellSpacing;
  45. */
  46. replacemethod "getIntercell:<size>" with "intercellSpacing" {
  47.     replace "<rettype>" with "(NSSize)"
  48.     replace "<call>" with "*<size_arg> = <call>"
  49.     replace "<implementation>" with "
  50.     NSSize <size_param>;
  51.     <implementation>"
  52.     }
  53.     within ("<implementation>") {
  54.     replace "<size_param>->" with "*<size_param>."
  55.     replace "<size_param>" with "&<size_param>"
  56.     replace "return self;" with "return <size_param>;" 
  57.     replace "return (self);" with "return (<size_param>);"
  58.     replace "return NULL;" with "return NSZeroSize;"
  59.     replace "return (NULL);" with "return (NSZeroSize);"
  60.     replace "return nil;" with "return NSZeroSize;"
  61.     replace "return (nil);" with "return (NSZeroSize);"
  62.     }
  63.  
  64.  
  65. /* - (BOOL)isGridVisible;            - (BOOL)drawsGrid;
  66.    - (BOOL)doesAllowVectorReordering;        - (BOOL)allowsColumnReordering;
  67.    - (BOOL)doesAllowVectorResizing;        - (BOOL)allowsColumnResizing;
  68.    - (BOOL)doesAllowEmptySel;            - (BOOL)allowsEmptySelection;
  69.    - columnList;                - (NSArray *)tableColumns;
  70. */
  71. replacemethod "<old>" with "<new>"
  72.     where ("<old>", "<new>") isOneOf {
  73.     ("isGridVisible", "drawsGrid")
  74.     ("doesAllowVectorReordering", "allowsColumnReordering")
  75.     ("doesAllowVectorResizing", "allowsColumnResizing")
  76.     ("doesAllowEmptySel", "allowsEmptySelection")
  77.     ("columnList", "tableColumns")
  78.     }
  79.  
  80.  
  81. /* - setGridVisible:(BOOL)flag;            - (void)setDrawsGrid:(BOOL)flag;
  82.    - allowVectorReordering:(BOOL)flag;        - (void)setAllowsColumnReordering:(BOOL)flag;
  83.    - allowVectorResizing:(BOOL) flag;        - (void)setAllowsColumnResizing:(BOOL)flag;
  84.    - allowEmptySel:(BOOL)flag;            - (void)setAllowsEmptySelection:(BOOL)flag;
  85. */
  86. replacemethod "<old>" with "<new>" {
  87.     replace "<rettype>" with "(void)"
  88.     }
  89.     within ("<implementation>") {
  90.     replace "return self;" with "return;"
  91.     replace "return (self);" with "return;"
  92.     }
  93.     where ("<old>", "<new>") isOneOf {
  94.     ("setGridVisible:", "setDrawsGrid:")
  95.     ("allowVectorReordering:", "setAllowsColumnReordering:")
  96.     ("allowVectorResizing:", "setAllowsColumnResizing:")
  97.     ("allowEmptySel:", "setAllowsEmptySelection:")
  98.     }
  99.  
  100.  
  101.  
  102. /* - (unsigned int)columnCount;            - (int)numberOfColumns;
  103.    - (unsigned int)rowCount;            - (int)numberOfRows;
  104.    - (unsigned int)selectedRowCount;        - (int)numberOfSelectedRows;
  105.    - (unsigned int)selectedColumnCount;        - (int)numberOfSelectedColumns;
  106. */
  107. replacemethod "<old>" with "<new>" {
  108.     replace "<rettype>" with "(int)"
  109.     }
  110.     where ("<old>", "<new>") isOneOf {
  111.     ("columnCount", "numberOfColumns")
  112.     ("rowCount", "numberOfRows")
  113.     ("selectedRowCount", "numberOfSelectedRows")
  114.     ("selectedColumnCount", "numberOfSelectedColumns")
  115.     }
  116.  
  117.  
  118. /* - (id <NXTableVectors>)columnAt:(unsigned int)aPosition;
  119. */
  120. replace "[<rec> columnAt:<pos>]" with "[[<rec> tableColumns] objectAtIndex:<pos>]"
  121.  
  122. replacemethod "columnAt:" with same
  123.     error "TableViewConversion: columnAt: is obsolete.  TableView now uses NSTableColumns instead of TableVectors.  To get a table column use [[myTableView tableColumns] objectAtIndex:theIndex]."
  124.  
  125.  
  126. /* - addColumn:identifier withTitle:(const char *)title;
  127. */
  128. replace "[<rec> addColumn:<ident> withTitle:<title>]" with
  129.     "{
  130.     NSTableColumn *myTableColumn = [[NSTableColumn alloc] initWithIdentifier:<ident>];
  131.     [[myTableColumn headerCell] setStringValue:<title>];
  132.     [<rec> addTableColumn:myTableColumn];
  133.     [myTableColumn release];
  134.     }"
  135.  
  136.  
  137.  
  138. /* - addColumn:identifier withFormatter:formatter andTitle:(const char *)title at:(unsigned int) aPosition;
  139. */
  140. replace "[<rec> addColumn:<ident> withFormatter:<formatter> andTitle:<title> at:<pos>]" with
  141.     "{
  142.     NSTableColumn *myTableColumn = [[NSTableColumn alloc] initWithIdentifier:<ident>];
  143.     [[myTableColumn headerCell] setStringValue:<title>];
  144.     [<rec> addTableColumn:myTableColumn];
  145.     [myTableColumn release];
  146.     [<rec> moveColumn:([<rec> numberOfColumns] - 1) toColumn:<pos>];
  147.     }"
  148.     warning "TableViewConversion: Formatters (in this case <formatter>) are obsolete.  Use cells to format data in NSTableView"
  149.  
  150.  
  151.  
  152. /* - addColumn:aColumn at:(unsigned int) aPosition;
  153. */
  154. replace "[<rec> addColumn:<col> at:<pos>]" with "[<rec> addTableColumn:<col>], [<rec> moveColumn:([<rec> numberOfColumns] - 1) toColumn:<pos>]"
  155.  
  156. replacemethod "<sel>" with same
  157.     error "TableViewConversion: <sel> is obsolete.  To add a column create the appropriate NSTableColumn and call addTableColumn:."
  158.     where "<sel>" isOneOf {
  159.     "addColumn:withTitle:",
  160.     "addColumn:withFormatter:andTitle:at:"
  161.     "addColumn:at:"
  162.     }
  163.  
  164.  
  165.  
  166. /* - removeColumnAt:(unsigned int) aPosition;
  167. */
  168. replace "[<rec> removeColumnAt:<pos>]" with "[<rec> removeTableColumn:[[<rec> tableColumns] objectAtIndex:<pos>]]"
  169.  
  170. replacemethod "removeColumnAt:" with same
  171.     error "TableViewConversion: removeColumnAt: is obsolete.  Remove the NSTableColumn using removeTableColumn:"
  172.  
  173.  
  174. /* - (BOOL)moveColumnFrom:(unsigned int)oldPos to:(unsigned int)newPos;        - (void)moveColumn:(int)column toColumn:(int)newIndex;
  175. */
  176. replacemethod "moveColumnFrom:<oldPos> to:<newPos>" with "moveColumn:<oldPos> toColumn:<newPos>" {
  177.     replace "<oldPos_type>" with "(int)"
  178.     replace "<newPos_type>" with "(int)"
  179.     replace "<rettype>" with "(void)"
  180.     }
  181.     within ("<implementation>") {
  182.     replace "return" with same
  183.         error "TableViewConversion: moveColumn:toColumn: does not return a failure status."
  184.     }
  185.  
  186.  
  187. /* - (BOOL)isRowSelected:(unsigned int)row;        - (BOOL)isRowSelected:(int)row;
  188.    - (BOOL)isColumnSelected:(unsigned int)column;    - (BOOL)isColumnSelected:(int)row;
  189. */
  190. replacemethod "<old>" with "same" {
  191.     replace "<myArg_type>" with "(int)"
  192.     }
  193.     where "<old>" isOneOf {
  194.     "isRowSelected:<myArg>"
  195.     "isColumnSelected:<myArg>"
  196.     }
  197.  
  198. /* - setRowSelectionOn:(unsigned int) start :(unsigned int) end to:(BOOL) flag;        - (void)selectRow:(int)row byExtendingSelection:(BOOL)extend;
  199. */
  200. replacemethod "setRowSelectionOn:<start> :<end> to:" with same
  201.     error "TableViewConversion: setRowSelectionOn::to: is obsolete.  Loop through from <start> to <end> setting the selection with selectRow:byExtendingSelection:"
  202.  
  203. /* - setColumnSelectionOn:(unsigned int) start :(unsigned int) end to:(BOOL) flag;    - (void)selectColumn:(int)column byExtendingSelection:(BOOL)extend;
  204. */
  205. replacemethod "setColumnSelectionOn:<start> :<end> to:" with same
  206.     error "TableViewConversion: setColumnSelectionOn::to: is obsolete.  Loop through from <start> to <end> setting the selection with selectColumn:byExtendingSelection:"
  207.  
  208.  
  209. /* - selectRow:(unsigned int)row byExtension:(BOOL)flag;    - (void)selectRow:(int)row byExtendingSelection:(BOOL)extend;
  210.    - selectColumn:(unsigned int)column byExtension:(BOOL)flag;    - (void)selectColumn:(int)column byExtendingSelection:(BOOL)extend;
  211. */
  212. replacemethod "<old>" with "<new>" {
  213.     replace "<rettype>" with "(void)"
  214.     replace "<pos_type>" with "(int)"
  215.     }
  216.     within ("<implementation>") {
  217.     replace "return self;" with "return;"
  218.     replace "return (self);" with "return;"
  219.     }
  220.     where ("<old>", "<new>") isOneOf {
  221.     ("selectRow:<pos> byExtension:", "selectRow:<pos> byExtendingSelection:")
  222.     ("selectColumn:<pos> byExtension:", "selectColumn:<pos> byExtendingSelection:")
  223.     }
  224.  
  225.  
  226. /* - deselectRow:(unsigned int)row;                - (void)deselectRow:(int)row;
  227.    - deselectColumn:(unsigned int)column;            - (void)deselectColumn:(int)column;
  228.    - scrollRowToVisible:(unsigned int)row;            - (void)scrollRowToVisible:(int)row;
  229.    - scrollColumnToVisible:(unsigned int)column;        - (void)scrollColumnToVisible:(int)column;
  230. */
  231. replacemethod "<sel>" with same {
  232.     replace "<rettype>" with "(void)"
  233.     replace "<pos_type>" with "(int)"
  234.     }
  235.     within ("<implementation>") {
  236.     replace "return self;" with "return;"
  237.     replace "return (self);" with "return;"
  238.     }
  239.     where "<sel>" isOneOf {
  240.     "deselectRow:<pos>"
  241.     "deselectColumn:<pos>"
  242.     "scrollRowToVisible:<pos>"
  243.     "scrollColumnToVisible:<pos>"
  244.     }
  245.  
  246.  
  247. /* - (unsigned int)selectedRowAfter:(unsigned int)aRow;
  248. */
  249. replacemethod "selectedRowAfter:" with same
  250.     warning "TableViewConversion: Use selectedRowEnumerator to enumerate the selection."
  251.  
  252.  
  253. /* - (unsigned int)selectedColumnAfter:(unsigned int)aColumn;
  254. */
  255. replacemethod "selectedColumnAfter:" with same
  256.     warning "TableViewConversion: Use selectedColumnEnumerator to enumerate the selection."
  257.  
  258.  
  259. /* - reloadData:sender;            - (void)reloadData;
  260.    - layoutChanged:sender;        - (void)tile;
  261. */
  262. replacemethod "<old>" with "<new>" {
  263.     replace "<rettype>" with "(void)"
  264.     }
  265.     within ("<implementation>") {
  266.     replace "return self;" with "return;"
  267.     replace "return (self);" with "return;"
  268.     }
  269.     where ("<old>", "<new>") isOneOf {
  270.     ("reloadData:", "reloadData")
  271.     ("layoutChanged:", "tile")
  272.     }
  273.  
  274.  
  275.  
  276. /* - columnHeading;                - (NSTableHeaderView *)headerView;
  277. */
  278. replacemethod "columnHeading" with "headerView" {
  279.     replace "<rettype>" with "(NSTableHeaderView *)"
  280.     }
  281.  
  282.  
  283. /* - setColumnHeading:newColumnHeading;        - (void)setHeaderView:(NSTableHeaderView *)headerView;
  284. */
  285. replacemethod "setColumnHeading:<view>" with "setHeaderView:<view>" {
  286.     replace "<rettype>" with "(void)"
  287.     replace "<view_type>" with "(NSTableHeaderView *)"
  288.     }
  289.     within ("<implementation>") {
  290.     replace "return self;" with "return;"
  291.     replace "return (self);" with "return;"
  292.     }
  293.  
  294.  
  295. /* - tableViewDidChangeSelection:aTableView;    NSTableViewSelectionDidChangeNotification
  296. */
  297. replacemethod "tableViewDidChangeSelection:" with same
  298.     warning "TableViewConversion: You should register the NSTableViewSelectionDidChangeNotification"
  299.  
  300. /* - (BOOL)tableViewWillChangeSelection:aTableView;    - (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView;
  301. */
  302. replacemethod "tableViewWillChangeSelection:<tableView>" with "selectionShouldChangeInTableView:<tableView>" {
  303.     replace "<tableView_type>" with "(NSTableView *)"
  304.     }
  305.  
  306.  
  307. /* - tableView:sender movedColumnFrom:(unsigned int) old to:(unsigned int) new;    NSTableViewColumnDidMoveNotification; // @"NSOldColumn", @"NSNewColumn"
  308. */
  309. replacemethod "tableView:movedColumnFrom:to:" with same
  310.     warning "TableViewConversion: You should register the NSTableViewColumnDidMoveNotification.  It is userInfo dictionary contains the keys NSOldColumn and NSNewColumn"
  311.  
  312.  
  313. /* - rowsChangedFrom:(unsigned int)startRow to:(unsigned int)endRow;
  314. */
  315. replacemethod "rowsChangedFrom:to:" with same
  316.     error "TableViewConversion: 'rowsChangedFrom:to:' is obsolete; just setNeedsDisplayInRect: for rectOfRow: for each row that changed"
  317.  
  318. /* - columnsChangedFrom:(unsigned int)startColumn to:(unsigned int)endColumn;
  319. */
  320. replacemethod "columnsChangedFrom:to:" with same
  321.     error "TableViewConversion: 'columnsChangedFrom:to:' is obsolete; just setNeedsDisplayInRect: for rectOfColumn: for each column that changed"
  322.  
  323. /* - (BOOL)dynamicRows;
  324.    - (BOOL)dynamicColumns;
  325.    - rowList;
  326.    - (id <NXTableVectors>) rowAt:(unsigned int) aPosition;
  327.    - addRow:identifier withTitle:(const char *) title;
  328.    - addRow:identifier withFormatter:formatter andTitle:(const char *) title at:(unsigned int) aPosition;
  329.    - addRow:aRow at:(unsigned int) aPosition;
  330.    - removeRowAt:(unsigned int) aPosition;
  331.    - (BOOL) moveRowFrom:(unsigned int) oldPos to:(unsigned int) newPos;
  332.    - tableView:sender movedRowFrom:(unsigned int) old to:(unsigned int) new;
  333.    - rowHeading;
  334.    - setRowHeading:newRowHeading;
  335. */
  336. replacemethod "<sel>" with same
  337.     error "TableViewConversion: <sel> is obsolete.  All rows are dynamic and columns are static.  If a row changes, just cause it to be redisplayed with setNeedsDisplayInRect:"
  338.     where "<sel>" isOneOf {
  339.     "dynamicRows",
  340.     "rowList",
  341.     "dynamicColumns"
  342.     "rowAt:"
  343.     "addRow:withTitle:"
  344.     "addRow:withFormatter:andTitle:at:"
  345.     "addRow:at:"
  346.     "removeRowAt:"
  347.     "moveRowFrom:to:"
  348.     "tableView:movedRowFrom:to:"
  349.     "rowHeading"
  350.     "setRowHeading:"
  351.     }
  352.  
  353. /* - setRowHeadingVisible:(BOOL)flag;
  354.    - (BOOL)isRowHeadingVisible;
  355. */
  356. replacemethod "<sel>" with same
  357.     error "TableViewConversion: <sel> is obsolete.  Rows do not have headings."
  358.     where "<sel>" isOneOf {
  359.     "setRowHeadingVisible:",
  360.     "isRowHeadingVisible"
  361.     }
  362.  
  363.  
  364. /* - sendAction:(SEL) anAction to:anObject forSelectedRows:(BOOL) flag;
  365.    - sendAction:(SEL) anAction to:anObject forSelectedColumns:(BOOL) flag;
  366. */
  367. replacemethod "<sel>" with same
  368.     error "TableViewConversion: <sel> is obsolete."
  369.     where "<sel>" isOneOf {
  370.     "sendAction:to:forSelectedRows:",
  371.     "sendAction:to:forSelectedColumns:"
  372.     }
  373.  
  374.  
  375. /* - formatterAt:(unsigned int) row :(unsigned int) column;
  376.    - editFieldAt:(unsigned int) row :(unsigned int) column;
  377.    - endEditing;
  378. */
  379. replacemethod "<sel>" with same
  380.     error "TableViewConversion: <sel> is obsolete.  TableView now uses cells instead of formatters."
  381.     where "<sel>" isOneOf {
  382.     "formatterAt::",
  383.     "editFieldAt::"
  384.     "endEditing"
  385.     }
  386.  
  387. replace "NXTableView" with "NSTableView"
  388.  
  389.  
  390. /***************************************************************************************
  391.                 NXFormatter
  392. ****************************************************************************************/
  393.  
  394. /* - getValueAt:(unsigned int) row :(unsigned int) column
  395.     withAttributes:(id <NXTableVectors>) rowAttrs
  396.               :(id <NXTableVectors>) columnAttrs
  397.     usePositions:(BOOL) useRowPos :(BOOL) useColumnPos;
  398.  
  399.    - drawFieldAt:(unsigned int) row :(unsigned int) column
  400.     inside:(NXRect *) frame inView:view
  401.     withAttributes:(id <NXTableVectors>) rowAttrs
  402.               :(id <NXTableVectors>) columnAttrs
  403.     usePositions:(BOOL) useRowPos :(BOOL) useColumnPos;
  404.  
  405.    - beginBatching:(id <NXTableVectors>) attrs;
  406.    - resetBatching:(id <NXTableVectors>) attrs;
  407.    - endBatching;
  408. */
  409. replacemethod "<sel>" with same
  410.     error "TableViewConversion: <sel> is obsolete.  TableView now uses cells instead of formatters."
  411.     where "<sel>" isOneOf {
  412.     "getValueAt::withAttributes::usePositions::"
  413.     "drawFieldAt::inside:inView:withAttributes::usePositions::"
  414.     "beginBatching:"
  415.     "resetBatching:"
  416.     "endBatching"
  417.     }
  418.  
  419. replace "NXFormatter" with same
  420.     error "TableViewConversion: TableView now uses cells instead of formatters.  Use an NSCell or subclass to display data in a table view."
  421.  
  422.  
  423. /***************************************************************************************
  424.                 NXImageFormatter
  425. ****************************************************************************************/
  426.  
  427. replace "NXImageFormatter" with same
  428.     error "TableViewConversion: TableView now uses cells instead of formatters.  Use an NSImageCell to display images in a table view."
  429.  
  430.  
  431. /***************************************************************************************
  432.                 NXEditableFormatter
  433. ****************************************************************************************/
  434.  
  435. replace "NXEditableFormatter" with same
  436.     error "TableViewConversion: TableView now uses cells instead of formatters.  Use an NSTextFieldCell to edit text in a table view."
  437.  
  438. /* - (BOOL) formatterWillChangeValueFor:identifier at:(unsigned int) position sender:sender;
  439.    - (BOOL) formatterWillChangeValueFor:identifier at:(unsigned int) position to:aValue sender:sender;
  440.    - formatterDidChangeValueFor:identifier at:(unsigned int) position to:aValue sender:sender;
  441.    - (BOOL) formatterWillChangeValueFor:rowIdentifier :columnIdentifier sender:sender;
  442.    - (BOOL) formatterWillChangeValueFor:rowIdentifier :columnIdentifier to:aValue sender:sender;
  443.    - formatterDidChangeValueFor:rowIdentifier :columnIdentifier to:aValue sender:sender;
  444.    - (BOOL) formatterDidEndEditing:sender endChar:(unsigned short)whyEnd;
  445. */
  446. replacemethod "<sel>" with same
  447.     error "TableViewConversion: <sel> is obsolete.  TableView now uses cells instead of formatters.  Cells can have NSFormatters to format and validate data."
  448.     where "<sel>" isOneOf {
  449.     "formatterWillChangeValueFor:at:sender:"
  450.     "formatterWillChangeValueFor:at:to:sender:"
  451.     "formatterDidChangeValueFor:at:to:sender:"
  452.     "formatterWillChangeValueFor::sender:"
  453.     "formatterWillChangeValueFor::to:sender:"
  454.     "formatterDidChangeValueFor::to:sender:"
  455.     "formatterDidEndEditing:endChar:"
  456.     }
  457.  
  458. /***************************************************************************************
  459.                 NXTextFormatter
  460. ****************************************************************************************/
  461.  
  462. replace "NXTextFormatter" with same
  463.     error "TableViewConversion: TableView now uses cells instead of formatters.  Use an NSTextFieldCell to display text in a table view."
  464.  
  465.  
  466. /***************************************************************************************
  467.                 NXTableVector
  468. ****************************************************************************************/
  469.  
  470. replace "NXTableVector" with same
  471.     error "TableViewConversion: NXTableVector is obsolete.  NSTableView has dynamic rows and static columns.  The columns are NSTableColumn objects."
  472.  
  473.  
  474. /***************************************************************************************
  475.                 NXTableProtocols
  476. ****************************************************************************************/
  477.  
  478. /*
  479.  *  Object(NXTableDataSources)
  480.  */
  481.  
  482. /* - (unsigned int) rowCount;        - (int)numberOfRowsInTableView:(NSTableView *)tableView;
  483. */
  484. replacemethod "rowCount" with "numberOfRowsInTableView:<tableView>" {
  485.     replace "<rettype>" with "(int)"
  486.     replace "<tableView_type>" with "(NSTableView *)"
  487.     replace "<tableView_param>" with "theTableView"
  488.     }
  489.  
  490.  
  491. /* - (unsigned int)columnCount;
  492. */
  493. replacemethod "columnCount" with same
  494.     error "TableViewConversion:  columnCount is obsolete.  Columns are static so the data source will never be asked for the number of columns."
  495.  
  496. /* - getValueFor:identifier at:(unsigned int) aPosition into:aValue;    - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row;
  497. */
  498. replacemethod "getValueFor:<ident> at:<row> into:<value>" with "tableView:<tableView> objectValueForTableColumn:<tableColumn> row:<row>" {
  499.     replace "<rettype>" with "(id)"
  500.     replace "<tableView_type>" with "(NSTableView *)"
  501.     replace "<tableColumn_type>" with "(NSTableColumn *)"
  502.     replace "<row_type>" with "(int)"
  503.     replace "<tableView_param>" with "theTableView"
  504.     replace "<tableColumn_param>" with "theTableColumn"
  505.     replace "<call>" with "<value_arg> = <call>"
  506.     replace "<tableColumn_arg>" with "[<tableView_arg> tableColumnWithIdentifier:<ident_arg>]"
  507.     replace "<implementation>" with "
  508.     id <ident_param> = [theTableColumn identifier];
  509.     NSData *<value_param>;
  510.     <implementation>"
  511.     }
  512.  
  513. /*    - setValueFor:identifier at:(unsigned int) aPosition from:aValue;        - (void)tableView:(NSTableView *)tableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn row:(int)row;
  514. */
  515. replacemethod "setValueFor:<ident> at:<row> from:<value>" with "tableView:<tableView> setObjectValue:<value> forTableColumn:<tableColumn> row:<row>" {
  516.     replace "<rettype>" with "(void)"
  517.     replace "<tableView_type>" with "(NSTableView *)"
  518.     replace "<tableColumn_type>" with "(NSTableColumn *)"
  519.     replace "<row_type>" with "(int)"
  520.     replace "<value_type>" with "(id)"
  521.     replace "<tableView_param>" with "theTableView"
  522.     replace "<tableColumn_param>" with "theTableColumn"
  523.     replace "<call>" with "<value_arg> = <call>"
  524.     replace "<tableColumn_arg>" with "[<tableView_arg> tableColumnWithIdentifier:<ident_arg>]"
  525.     replace "<implementation>" with "
  526.     id <ident_param> = [theTableColumn identifier];
  527.     NSData *<value_param>;
  528.     <implementation>"
  529.     }
  530.  
  531. replacemethod "<sel>" with same
  532.     error "TableViewConversion: <sel> is obsolete.  Columns are static and rows are dynamic.  Rows do not have identifiers.  Use - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row; or - (void)tableView:(NSTableView *)tableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn row:(int)row;"
  533.     where "<sel>" isOneOf {
  534.     "getValueFor::into:"
  535.     "setValueFor::from:"
  536.     }
  537.  
  538.  
  539.