Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4fccfe23f6486142b4197d1daac0cf21 > files > 43

Falcon-doc-0.9.6.6-2.fc15.noarch.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Class Table - Class Table</title>
   <link href="faldoc.css" rel="stylesheet" type="text/css"/>
   <link href="tabs.css" rel="stylesheet" type="text/css"/>
</head>
<body class="faldoc_body">
<div class="navitop">
   <div class="tabs">
      <ul>
         <li><a href="./index.html"><span>Main</span></a></li>
         <li><a href="./pages.html"><span>Related pages</span></a></li>
         <li><a href="./groups.html"><span>Groups</span></a></li>
         <li><a href="./funset.html"><span>Function sets</span></a></li>
         <li><a href="./classes.html"><span>Classes</span></a></li>
         <li><a href="./objects.html"><span>Objects</span></a></li>
         <li><a href="./functions.html"><span>All functions</span></a></li>
         <li><a href="./globals.html"><span>Globals</span></a></li>
         
      </ul>
   </div>
</div>
<hr/>

<h1 class="faldoc_title">Class Table</h1>

<p class="faldoc_brief">Home of tabular programming. </p>
<p class="faldoc_funcdecl">
<b>class</b> Table( [heading] )
</p>


   
   <h2 class="faldoc_title">Summary</h2>
   <table class="faldoc_list">
   
      
         <tr><td><a href="#append">append()</a></td><td>Adds a row at the end of the current page in the table. </td></tr>
      
         <tr><td><a href="#back">back()</a></td><td>Returns the last item in the table. </td></tr>
      
         <tr><td><a href="#bidding">bidding()</a></td><td>Performs a bidding between rows. </td></tr>
      
         <tr><td><a href="#choice">choice()</a></td><td>Performs a choice between rows. </td></tr>
      
         <tr><td><a href="#columnData">columnData()</a></td><td>Returns the column data bound with a certain column </td></tr>
      
         <tr><td><a href="#columnPos">columnPos()</a></td><td>Returns the number of a given column name. </td></tr>
      
         <tr><td><a href="#curPage">curPage()</a></td><td>Gets the current table page. </td></tr>
      
         <tr><td><a href="#find">find()</a></td><td>Finds an element in a table. </td></tr>
      
         <tr><td><a href="#first">first()</a></td><td>Returns an iterator to the first element of the table. </td></tr>
      
         <tr><td><a href="#front">front()</a></td><td>Returns the first item in the table. </td></tr>
      
         <tr><td><a href="#get">get()</a></td><td>Gets a row in a table. </td></tr>
      
         <tr><td><a href="#getColData">getColData()</a></td><td>Gets the clumn wide data associated with this table. </td></tr>
      
         <tr><td><a href="#getHeader">getHeader()</a></td><td>Gets the name of one header, or the list of header names. </td></tr>
      
         <tr><td><a href="#getPage">getPage()</a></td><td>Returns a copy of a given page in the table. </td></tr>
      
         <tr><td><a href="#insert">insert()</a></td><td>Insert a row in the table. </td></tr>
      
         <tr><td><a href="#insertColumn">insertColumn()</a></td><td>Inserts a column in a table. </td></tr>
      
         <tr><td><a href="#insertPage">insertPage()</a></td><td>Inserts a new table page. </td></tr>
      
         <tr><td><a href="#last">last()</a></td><td>Returns an iterator to the last element of the table. </td></tr>
      
         <tr><td><a href="#len">len()</a></td><td>Returns the length of the table (the number of rows). </td></tr>
      
         <tr><td><a href="#order">order()</a></td><td>Returns the order of the table (column count). </td></tr>
      
         <tr><td><a href="#pageCount">pageCount()</a></td><td>Gets the number of pages in this table. </td></tr>
      
         <tr><td><a href="#remove">remove()</a></td><td>Remove a row from the table. </td></tr>
      
         <tr><td><a href="#removeColumn">removeColumn()</a></td><td>Removes a column from a table. </td></tr>
      
         <tr><td><a href="#removePage">removePage()</a></td><td>Removes a page. </td></tr>
      
         <tr><td><a href="#resetColumn">resetColumn()</a></td><td>Applies a value on a column, eventually setting one or more rows to a different value. </td></tr>
      
         <tr><td><a href="#set">set()</a></td><td>Changes the value of a whole row. </td></tr>
      
         <tr><td><a href="#setColumn">setColumn()</a></td><td>Change the title or column data of a column. </td></tr>
      
         <tr><td><a href="#setHeader">setHeader()</a></td><td>Sets the header of an empty table. </td></tr>
      
         <tr><td><a href="#setPage">setPage()</a></td><td>Sets current active page. </td></tr>
      
   
   </table>









   <h2 class="faldoc_title">Methods</h2>
   
      <h3 class="faldoc_funcname"><a name="append">append()</a></h3>
      <p class="item_brief">Adds a row at the end of the current page in the table. </p>
      <p class="faldoc_funcdecl">Table.append( element )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">element</td><td class="faldoc_paramdesc">The row to be inserted. </td></tr>
         
         
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_ParamError.html">ParamError</a></td><td class="faldoc_raisedesc"> if <b>element</b> is not an array with the same length of the table order. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method adds the element at the end of the page currently selected in this table. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span>  This method is equivalent to Table.insert with <b>row</b> set as nil. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="back">back()</a></h3>
      <p class="item_brief">Returns the last item in the table. </p>
      <p class="faldoc_funcdecl">Table.back( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The last item in the table. </td></tr>
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the table is empty. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If the table is not empty, it returns the last element (row) in the table. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="bidding">bidding()</a></h3>
      <p class="item_brief">Performs a bidding between rows. </p>
      <p class="faldoc_funcdecl">Table.bidding( column, [offer], [rows] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">column</td><td class="faldoc_paramdesc">Betting column (number or name). </td></tr>
         <tr><td class="faldoc_optparam">offer</td><td class="faldoc_optparamdesc">Offer column (number or name). </td></tr><tr><td class="faldoc_optparam">rows</td><td class="faldoc_optparamdesc">Range of rows in which to perform the bidding. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The winning row, or the corresponding value in the offer column. </td></tr>
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the table or ranges are empty. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method calls iteratively all the items in a determined column of the table, recording their return value, which must be numeric. It is allowed also to have numeric and nil values in the cells in the betting column. Numeric values will be considered as final values and will participate in the final auction, while row having nil values will be excluded. </p>
<p class="faldoc_text"> After the bidding is complete, the row offering the highest value is selected and returned, or if the <b>offer</b> parameter is specified, the corresponding value in the given column will be returned. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span> If the bidding element is a plain function, it will be called as a method of the array, so "self" will be available. In all the other cases, the array will be passed as the last parameter. </p>
<p class="faldoc_text"> A <b>rows</b> range can be specified to limit the bidding to a part smaller part of the table. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="choice">choice()</a></h3>
      <p class="item_brief">Performs a choice between rows. </p>
      <p class="faldoc_funcdecl">Table.choice( func, [offer], [rows] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">func</td><td class="faldoc_paramdesc">Choice function or callable. </td></tr>
         <tr><td class="faldoc_optparam">offer</td><td class="faldoc_optparamdesc">Offer column (number or name). </td></tr><tr><td class="faldoc_optparam">rows</td><td class="faldoc_optparamdesc">Range of rows in which to perform the bidding. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The winning row, or the corresponding value in the offer column. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method sends all the rows in the table as the sole parameter of a function which has to return a numeric value for each row. </p>
<p class="faldoc_text"> After all the rows have been processed, the row for which the called function had the highest value is returned. If the optional parameter <b>offer</b> is specified, then the item specified by that column number or name is returned instead. </p>
<p class="faldoc_text">If two or more rows are equally evaluated by the choice function, only the first one is returned. </p>
<p class="faldoc_text">The evaluation function may return a number lower than 0 to have the row effectively excluded from the evaluation. If all the rows are evaluated to have a value lower than zero, the function returns nil (as if the table was empty). </p>
<p class="faldoc_text">The function may force an immediate selection by returning an out of band item. An out of band nil will force this method to return nil, and an out of band number will force the selection of the current row. </p>
<p class="faldoc_text"> If an <b>offer</b> parameter is specified, then the item in the corresponding column (indicated by a numeric index or by column name) is returned. </p>
<p class="faldoc_text"> A <b>row</b> range can be used to iterate selectively on one part of the table. </p>
<p class="faldoc_text">If the table is empty, or if the given row range is empty, the function returns nil. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span> Except for OOB nil, every return value coming from the choice function will be turned into a floating point numeric value. Non-numeric returns will be evaluated as 0.0. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="columnData">columnData()</a></h3>
      <p class="item_brief">Returns the column data bound with a certain column </p>
      <p class="faldoc_funcdecl">Table.columnData( column, [data] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">column</td><td class="faldoc_paramdesc">The column header name or numeric position. </td></tr>
         <tr><td class="faldoc_optparam">data</td><td class="faldoc_optparamdesc">New data to be stored as column data. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The column data for the given column, or nil is not found. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> If the <b>data</b> parameter is specified, then the value of the given column data is changed. Anyhow, the previous value is returned. </p>
<p class="faldoc_text"> Notice that the column data of an existing column may be nil; to know if a column with a given name exists, use the <a href="./class_Table.html#columnPos">Table.columnPos</a> method. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="columnPos">columnPos()</a></h3>
      <p class="item_brief">Returns the number of a given column name. </p>
      <p class="faldoc_funcdecl">Table.columnPos( column )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">column</td><td class="faldoc_paramdesc">The column header name. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The numeric position of the column or -1 if not found. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="curPage">curPage()</a></h3>
      <p class="item_brief">Gets the current table page. </p>
      <p class="faldoc_funcdecl">Table.curPage( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The currently active table page. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">All the tables are created with at least one page having ID = 0. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="find">find()</a></h3>
      <p class="item_brief">Finds an element in a table. </p>
      <p class="faldoc_funcdecl">Table.find( column, value, [tcol], [dflt] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">column</td><td class="faldoc_paramdesc">The column where to perform the search (either name or 0 based number). </td></tr><tr><td class="faldoc_param">value</td><td class="faldoc_paramdesc">The value to be found. </td></tr>
         <tr><td class="faldoc_optparam">tcol</td><td class="faldoc_optparamdesc">The name of the column to be extracted (target column; either name or 0 based number). </td></tr><tr><td class="faldoc_optparam">dflt</td><td class="faldoc_optparamdesc">A default value to be returned if the row is not found. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">An array (if the column is not specified) or an item. </td></tr>
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_TableError.html">TableError</a></td><td class="faldoc_raisedesc">if the item is not found. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">The returned array is a "table component", and as such, its size cannot be changed; also, it inherits all the table columns, that can be accessed as bindings with the dot accessor and will resolve in one of the element in the array. </p>
<p class="faldoc_text"> In case of success, through the BOM method <a href="./class_Array.html#tabRow">Array.tabRow</a> it is possible to retrieve the table row position of the returned array. </p>
<p class="faldoc_text"> In case of failure, a TableError is raised, unless a <b>dflt</b> parameter is specified. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="first">first()</a></h3>
      <p class="item_brief">Returns an iterator to the first element of the table. </p>
      <p class="faldoc_funcdecl">Table.first( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">An iterator. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Returns an iterator to the first element of the table. If the table is empty, an invalid iterator will be returned, but an insertion on that iterator will succeed and append an item to the table. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="front">front()</a></h3>
      <p class="item_brief">Returns the first item in the table. </p>
      <p class="faldoc_funcdecl">Table.front( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The first item in the table. </td></tr>
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the table is empty. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If the table is not empty, it returns the first element (row) in the table. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="get">get()</a></h3>
      <p class="item_brief">Gets a row in a table. </p>
      <p class="faldoc_funcdecl">Table.get( row, [tcol] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">row</td><td class="faldoc_paramdesc">a Row number. </td></tr>
         <tr><td class="faldoc_optparam">tcol</td><td class="faldoc_optparamdesc">The name of the column to be extracted (target column; either name or 0 based number). </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">An array (if the column is not specified) or an item. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">The returned array is a "table component", and as such, its size cannot be changed; also, it inherits all the table clumns, that can be accessed as bindings with the dot accessor and will resolve in one of the element in the array. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="getColData">getColData()</a></h3>
      <p class="item_brief">Gets the clumn wide data associated with this table. </p>
      <p class="faldoc_funcdecl">Table.getColData( [id] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">id</td><td class="faldoc_optparamdesc">If given, a number indicating the column of which to get the data. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> An item (if <b>id</b> is given) or the vector of ordered column names. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="getHeader">getHeader()</a></h3>
      <p class="item_brief">Gets the name of one header, or the list of header names. </p>
      <p class="faldoc_funcdecl">Table.getHeader( [id] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">id</td><td class="faldoc_optparamdesc">If given, a number indicating the column of which to get the name. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> A string (if <b>id</b> is given) or the vector of ordered column names. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="getPage">getPage()</a></h3>
      <p class="item_brief">Returns a copy of a given page in the table. </p>
      <p class="faldoc_funcdecl">Table.getPage( [pageId] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">pageId</td><td class="faldoc_optparamdesc">The page to be copied (defaults to the current page). </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">An array containing all the rows in the page. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">While the returned item is a copy, and modifying it doesn't cause the change the be reflected on the table, each row returned with it is the actual item stored in the table. So, modifying the Nth element of one of the arrays in the returned one will affect the page. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="insert">insert()</a></h3>
      <p class="item_brief">Insert a row in the table. </p>
      <p class="faldoc_funcdecl">Table.insert( row, element )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">row</td><td class="faldoc_paramdesc">The position where to insert the row. </td></tr><tr><td class="faldoc_param">element</td><td class="faldoc_paramdesc">The row to be inserted. </td></tr>
         
         
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the position is out of range. </td></tr><tr><td class="faldoc_raiseitem"><a href="./class_ParamError.html">ParamError</a></td><td class="faldoc_raisedesc">if the row is not an array with the same length of the table order. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">The element is inserted before the given position. </p>
<p class="faldoc_text"> If <b>pos</b> is greater or equal to the length of the table, the row will be inserted at end (added). If <b>pos</b> is negative, the row will be accessed backward, -1 being the last element (the row will be inserted before the last one). </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="insertColumn">insertColumn()</a></h3>
      <p class="item_brief">Inserts a column in a table. </p>
      <p class="faldoc_funcdecl">Table.insertColumn( column, name, [coldata], [dflt] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">column</td><td class="faldoc_paramdesc">The column name or position where to insert the column. </td></tr><tr><td class="faldoc_param">name</td><td class="faldoc_paramdesc">The name of the new column. </td></tr>
         <tr><td class="faldoc_optparam">coldata</td><td class="faldoc_optparamdesc">The column data for the new column. </td></tr><tr><td class="faldoc_optparam">dflt</td><td class="faldoc_optparamdesc">Default value for the newly inserted columns. </td></tr>
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method creates a new column in the table, inserting or adding a new heading, a new column data and an item in the corresponding column position of each array in the table. </p>
<p class="faldoc_text"> If <b>dflt</b> parameter is specified, that value is used to fill the newly created columns in the table rows, otherwise the new items will be nil. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="insertPage">insertPage()</a></h3>
      <p class="item_brief">Inserts a new table page. </p>
      <p class="faldoc_funcdecl">Table.insertPage( [pageId], [data] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">pageId</td><td class="faldoc_optparamdesc">The position at which to insert the page. </td></tr><tr><td class="faldoc_optparam">data</td><td class="faldoc_optparamdesc">an array of rows (arrays), each of which having length equal to table order. </td></tr>
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> If <b>pos</b> is greater than the number of pages in the table, or not given, the page will be appended at the end. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="last">last()</a></h3>
      <p class="item_brief">Returns an iterator to the last element of the table. </p>
      <p class="faldoc_funcdecl">Table.last( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">An iterator. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Returns an iterator to the last element of the table. If the table is empty, an invalid iterator will be returned, but an insertion on that iterator will succeed and append an item to the table. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="len">len()</a></h3>
      <p class="item_brief">Returns the length of the table (the number of rows). </p>
      <p class="faldoc_funcdecl">Table.len( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The rows in the current page of the table. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Tables may have multiple pages, each of which having the same order (column count), but different length (rows). </p>
<p class="faldoc_text">This method returns the length of the currently active page. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="order">order()</a></h3>
      <p class="item_brief">Returns the order of the table (column count). </p>
      <p class="faldoc_funcdecl">Table.order( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The number of the columns, and of the length of every array in the table. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="pageCount">pageCount()</a></h3>
      <p class="item_brief">Gets the number of pages in this table. </p>
      <p class="faldoc_funcdecl">Table.pageCount( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">Number of pages stored in this table. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="remove">remove()</a></h3>
      <p class="item_brief">Remove a row from the table. </p>
      <p class="faldoc_funcdecl">Table.remove( row )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">row</td><td class="faldoc_paramdesc">The number of the row to be removed. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The removed array. </td></tr>
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the position is out of range. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method removes one of the rows from the table. </p>
<p class="faldoc_text">However, the array still remember the table from which it came from, as the table may have multiple reference to the array. So, the array stays bound with the table, and cannot be modified. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="removeColumn">removeColumn()</a></h3>
      <p class="item_brief">Removes a column from a table. </p>
      <p class="faldoc_funcdecl">Table.removeColumn( column )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">column</td><td class="faldoc_paramdesc">The column name or position to be removed. </td></tr>
         
         
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the column is not found. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method removes column in the table, removing also the item at corresponding position in all the rows of all the pages in this table. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="removePage">removePage()</a></h3>
      <p class="item_brief">Removes a page. </p>
      <p class="faldoc_funcdecl">Table.removePage( pageId )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">pageId</td><td class="faldoc_paramdesc">The page to be removed. </td></tr>
         
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">The table cannot exist without at least one page, and if the deleted page is the current one, the page 0 is selected. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="resetColumn">resetColumn()</a></h3>
      <p class="item_brief">Applies a value on a column, eventually setting one or more rows to a different value. </p>
      <p class="faldoc_funcdecl">Table.resetColumn( column, [resetVal], [row], [value] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">column</td><td class="faldoc_paramdesc">Column name or number where the value must be applied. </td></tr>
         <tr><td class="faldoc_optparam">resetVal</td><td class="faldoc_optparamdesc">The value that must be set to clear the rows (defaults to nil). </td></tr><tr><td class="faldoc_optparam">row</td><td class="faldoc_optparamdesc"> The row (or rows, if a range is given) to be set to <b>value</b>. </td></tr><tr><td class="faldoc_optparam">value</td><td class="faldoc_optparamdesc">The value that must be set in the given row(s) (defaults to true). </td></tr>
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> This method takes a column in the current page and sets all the values in all the rows to <b>resetVal</b>(or nil if not given). </p>
<p class="faldoc_text">Optionally, a single row or a range of rows where to apply a different value can be given. </p>
<p class="faldoc_text">In example, this allows to create a diagonal matrix like the following: </p>
<pre class="faldoc_code">
  x = Table( ["a","b","c"] )
  x.insert( 0, arrayBuffer( 3 ) )
  x.insert( 0, arrayBuffer( 3 ) )
  x.insert( 0, arrayBuffer( 3 ) )

  for i in [0:3]
     x.resetColumn( i, 0, i, 1 )
  end
</pre>
<p class="faldoc_text">Tables are not meant for linear algebra calculus, but it is often useful to clear a whole column, and it can come useful to set just one row in a table to stand out, especially in decision support systems and program logic control, which is what Falcon tables are specifically designed. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="set">set()</a></h3>
      <p class="item_brief">Changes the value of a whole row. </p>
      <p class="faldoc_funcdecl">Table.set( row, element )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">row</td><td class="faldoc_paramdesc">a Row number. </td></tr><tr><td class="faldoc_param">element</td><td class="faldoc_paramdesc">The new data to be placed at the given row. </td></tr>
         
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method changes an existing row placing a completely new value over it. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="setColumn">setColumn()</a></h3>
      <p class="item_brief">Change the title or column data of a column. </p>
      <p class="faldoc_funcdecl">Table.setColumn( column, name, [coldata] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">column</td><td class="faldoc_paramdesc">The number of name of the column to be renamed. </td></tr><tr><td class="faldoc_param">name</td><td class="faldoc_paramdesc">The new name of the column, or nil to let it unchanged. </td></tr>
         <tr><td class="faldoc_optparam">coldata</td><td class="faldoc_optparamdesc">The new column data. </td></tr>
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method changes the column heading in a table. It may be also used to change the column-wide data. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="setHeader">setHeader()</a></h3>
      <p class="item_brief">Sets the header of an empty table. </p>
      <p class="faldoc_funcdecl">Table.setHeader( header )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">header</td><td class="faldoc_paramdesc">An array of strings or future bindings that will be used as table header </td></tr>
         
         
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_CodeError.html">CodeError</a></td><td class="faldoc_raisedesc">if the table has already a valid header. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method allows to set the header of an uninitialized table after its creation. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="setPage">setPage()</a></h3>
      <p class="item_brief">Sets current active page. </p>
      <p class="faldoc_funcdecl">Table.setPage( pageId )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">pageId</td><td class="faldoc_paramdesc">The number of the selected page. </td></tr>
         
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">All the tables are created with at least one page having ID = 0. </p>
</p>
   

<hr/>
<div class="navibottom">
   <center>
      <a href="./index.html">Main</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./pages.html">Related pages</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./groups.html">Groups</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./funset.html">Function sets</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./classes.html">Classes</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./objects.html">Objects</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./functions.html">All functions</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./globals.html">Globals</a>
   </center>
</div>
</div>
<div class="faldoc_signature">Made with <a href="http://www.falconpl.org">faldoc 2.2.0</div>
</body>
</html>