<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
> 
<channel>
	<title>Appcelerator Developer Center Q&amp;A Tag Feed (appendrow)</title> 
	<atom:link href="http://developer.appcelerator.com/questions/feed/tag/appendrow" rel="self" type="application/rss+xml" /> 
	<link>http://developer.appcelerator.com/questions/feed/tag/appendrow</link> 
	<description>Appcelerator Developer Center Q&amp;A feed for the tag: "appendrow"</description> 
	<lastBuildDate>Thu, 23 May 2013 14:54:23 -0700</lastBuildDate> 
	<pubDate>Thu, 23 May 2013 14:54:23 -0700</pubDate>
	<copyright>Copyright (c) 2008-2013 by Appcelerator Inc.</copyright>
	<webMaster>info@appcelerator.com</webMaster>
	<generator>Appcelerator Developer Center</generator>
	<ttl>5</ttl>
	<language>en</language>
	<item>
		<title>Error using appendRow()</title> 
		<link>http://developer.appcelerator.com/question/147546/error-using-appendrow</link>
		<pubDate>Mon, 28 Jan 2013 19:20:58 -0800</pubDate>
		<dc:creator>John Gauchat</dc:creator> 
				<category><![CDATA[error]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/147546/error-using-appendrow</guid>
		<description><![CDATA[Hi guys. I'm getting a random error when I try to use appendRow() to create or add more rows to a table. I get the error in the simulator, didn't try on a device. 

~~~
2013-01-28 19:05:59.154 MyApplication[5447:207] *** Assertion failure in -[_UITableViewUpdateSupport _computeRowUpdates], /SourceCache/UIKit_Sim/UIKit-1912.3/UITableViewSupport.m:386
~~~

It's completely random, some times the rows are created and some times I get an empty table. The error is shown after I print something in the console, otherwise I get the empty table and no error at all.

I use the same code to create the table or append rows later, so I need to use appendRow() to not have to repeat code.

The code is elaborated so I can come up with an example. First, I'd like to know if someone has seen this error before.

Titanium 2.1.4 (the version 3 doesn't work on my Mac)
Snow Leopard

Thanks
JD]]></description>
		<content:encoded><![CDATA[<p>Hi guys. I'm getting a random error when I try to use appendRow() to create or add more rows to a table. I get the error in the simulator, didn't try on a device. 
<pre class="javascript codeblock"><span class="nu0">2013</span><span class="sy0">-</span>01<span class="sy0">-</span><span class="nu0">28</span> <span class="nu0">19</span><span class="sy0">:</span>05<span class="sy0">:</span><span class="nu0">59.154</span> MyApplication<span class="br0">&#91;</span><span class="nu0">5447</span><span class="sy0">:</span><span class="nu0">207</span><span class="br0">&#93;</span> <span class="sy0">***</span> Assertion failure <span class="kw1">in</span> <span class="sy0">-</span><span class="br0">&#91;</span>_UITableViewUpdateSupport _computeRowUpdates<span class="br0">&#93;</span><span class="sy0">,</span> <span class="sy0">/</span>SourceCache<span class="sy0">/</span>UIKit_Sim<span class="sy0">/</span>UIKit<span class="sy0">-</span><span class="nu0">1912.3</span><span class="sy0">/</span>UITableViewSupport.<span class="me1">m</span><span class="sy0">:</span><span class="nu0">386</span></pre>
It's completely random, some times the rows are created and some times I get an empty table. The error is shown after I print something in the console, otherwise I get the empty table and no error at all.</p>

<p>I use the same code to create the table or append rows later, so I need to use appendRow() to not have to repeat code.</p>

<p>The code is elaborated so I can come up with an example. First, I'd like to know if someone has seen this error before.</p>

<p>Titanium 2.1.4 (the version 3 doesn't work on my Mac)
Snow Leopard</p>

<p>Thanks
JD</p>
]]></content:encoded>
	</item>
	<item>
		<title>dynamic adding of tableviewrows into sections</title> 
		<link>http://developer.appcelerator.com/question/145983/dynamic-adding-of-tableviewrows-into-sections</link>
		<pubDate>Thu, 20 Dec 2012 04:22:07 -0800</pubDate>
		<dc:creator>Rainer Schleevoigt</dc:creator> 
				<category><![CDATA[appendrow]]></category> 
				<category><![CDATA[tableviewsection]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/145983/dynamic-adding-of-tableviewrows-into-sections</guid>
		<description><![CDATA[Hi,
in my project I want to insert and update rows in sections.

Constructor:
~~~
var self = require('/modules/l2g').create(title);
self.mytableview = Ti.UI.createTableView({});
self.add(self.mytableview);
self.favchannelsection = require('/modules/parts/section').create('Kanäle');
self.favvideossection = require('/modules/parts/section').create('Videos');
self.recentsvideossection = require('/modules/parts/section').create('Videos');
self.mytableview.setData([self.favchannelsection,self.favvideossection,self.recentsvideossection]);
~~~

Updater/inserter:
~~~
Ti.App.addEventListener('favs_changed', function(data) {
	var rows = [];
	var favs = data.favs;
	var length = favs.length;
	for (var i = 0; i &lt; length; i++) {
		rows[i] = Ti.UI.createTableViewRow({
				backgroundColor : '#fff',
				hasChild : true,
				kanal : favs[i]
		});
		self.favchannelsection.add(rows[i]);
	}
));
~~~

But the section leaves empty. In documentation I found the suggestion to use appendRow() as add(). If I use appendRow(), then an error appears:

~~~
Script Error = 'undefined' is not a function (evaluating 'self.favchannelsection.appendRow(rows[i])') at mylecture2go.js (line 39).
~~~

I have no ideas.

Rainer]]></description>
		<content:encoded><![CDATA[<p>Hi,
in my project I want to insert and update rows in sections.</p>

<p>Constructor:<pre class="javascript codeblock"><span class="kw2">var</span> self <span class="sy0">=</span> require<span class="br0">&#40;</span><span class="st0">'/modules/l2g'</span><span class="br0">&#41;</span>.<span class="me1">create</span><span class="br0">&#40;</span>title<span class="br0">&#41;</span><span class="sy0">;</span>
self.<span class="me1">mytableview</span> <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createTableView</span><span class="br0">&#40;</span><span class="br0">&#123;</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
self.<span class="me1">add</span><span class="br0">&#40;</span>self.<span class="me1">mytableview</span><span class="br0">&#41;</span><span class="sy0">;</span>
self.<span class="me1">favchannelsection</span> <span class="sy0">=</span> require<span class="br0">&#40;</span><span class="st0">'/modules/parts/section'</span><span class="br0">&#41;</span>.<span class="me1">create</span><span class="br0">&#40;</span><span class="st0">'Kanäle'</span><span class="br0">&#41;</span><span class="sy0">;</span>
self.<span class="me1">favvideossection</span> <span class="sy0">=</span> require<span class="br0">&#40;</span><span class="st0">'/modules/parts/section'</span><span class="br0">&#41;</span>.<span class="me1">create</span><span class="br0">&#40;</span><span class="st0">'Videos'</span><span class="br0">&#41;</span><span class="sy0">;</span>
self.<span class="me1">recentsvideossection</span> <span class="sy0">=</span> require<span class="br0">&#40;</span><span class="st0">'/modules/parts/section'</span><span class="br0">&#41;</span>.<span class="me1">create</span><span class="br0">&#40;</span><span class="st0">'Videos'</span><span class="br0">&#41;</span><span class="sy0">;</span>
self.<span class="me1">mytableview</span>.<span class="me1">setData</span><span class="br0">&#40;</span><span class="br0">&#91;</span>self.<span class="me1">favchannelsection</span><span class="sy0">,</span>self.<span class="me1">favvideossection</span><span class="sy0">,</span>self.<span class="me1">recentsvideossection</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre>
Updater/inserter:<pre class="javascript codeblock">Ti.<span class="me1">App</span>.<span class="me1">addEventListener</span><span class="br0">&#40;</span><span class="st0">'favs_changed'</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>data<span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="kw2">var</span> rows <span class="sy0">=</span> <span class="br0">&#91;</span><span class="br0">&#93;</span><span class="sy0">;</span>
    <span class="kw2">var</span> favs <span class="sy0">=</span> data.<span class="me1">favs</span><span class="sy0">;</span>
    <span class="kw2">var</span> length <span class="sy0">=</span> favs.<span class="me1">length</span><span class="sy0">;</span>
    <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span> i <span class="sy0">&lt;</span> length<span class="sy0">;</span> i<span class="sy0">++</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
        rows<span class="br0">&#91;</span>i<span class="br0">&#93;</span> <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createTableViewRow</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
                backgroundColor <span class="sy0">:</span> <span class="st0">'#fff'</span><span class="sy0">,</span>
                hasChild <span class="sy0">:</span> <span class="kw2">true</span><span class="sy0">,</span>
                kanal <span class="sy0">:</span> favs<span class="br0">&#91;</span>i<span class="br0">&#93;</span>
        <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
        self.<span class="me1">favchannelsection</span>.<span class="me1">add</span><span class="br0">&#40;</span>rows<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="br0">&#125;</span>
<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre>
But the section leaves empty. In documentation I found the suggestion to use appendRow() as add(). If I use appendRow(), then an error appears:
<pre class="javascript codeblock">Script Error <span class="sy0">=</span> <span class="st0">'undefined'</span> <span class="kw1">is</span> not a <span class="kw2">function</span> <span class="br0">&#40;</span>evaluating <span class="st0">'self.favchannelsection.appendRow(rows[i])'</span><span class="br0">&#41;</span> at mylecture2go.<span class="me1">js</span> <span class="br0">&#40;</span>line <span class="nu0">39</span><span class="br0">&#41;</span>.</pre>
I have no ideas.</p>

<p>Rainer</p>
]]></content:encoded>
	</item>
	<item>
		<title>Add Rows to TableView</title> 
		<link>http://developer.appcelerator.com/question/117334/add-rows-to-tableview</link>
		<pubDate>Wed, 16 Mar 2011 08:25:43 -0700</pubDate>
		<dc:creator>Joe iEntry</dc:creator> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<category><![CDATA[add]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/117334/add-rows-to-tableview</guid>
		<description><![CDATA[One can initially add multiple rows to a table via the setData method. However, in order to append rows to the table it appears you must use the appendRow method. (Note: using the add method will not work because it does not accept arrays.)

Is there any way to append multiple rows (or multiple table sections) to a TableView that already has data in it by adding them all at once instead of doing it iteratively using appendRow?

Titanium v1.2.2, Android SDK 1.6, Screen WVGA854]]></description>
		<content:encoded><![CDATA[<p>One can initially add multiple rows to a table via the setData method. However, in order to append rows to the table it appears you must use the appendRow method. (Note: using the add method will not work because it does not accept arrays.)</p>

<p>Is there any way to append multiple rows (or multiple table sections) to a TableView that already has data in it by adding them all at once instead of doing it iteratively using appendRow?</p>

<p>Titanium v1.2.2, Android SDK 1.6, Screen WVGA854</p>
]]></content:encoded>
	</item>
	<item>
		<title>appending rows to tableview from sqlite (pagination)</title> 
		<link>http://developer.appcelerator.com/question/144049/appending-rows-to-tableview-from-sqlite-pagination</link>
		<pubDate>Sat, 27 Oct 2012 08:20:18 -0700</pubDate>
		<dc:creator>adrian harris</dc:creator> 
				<category><![CDATA[sqlite]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<category><![CDATA[pagination]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/144049/appending-rows-to-tableview-from-sqlite-pagination</guid>
		<description><![CDATA[i'm trying to add a &quot;view more rows&quot; from an sqlite db - i had working code when i pulled from an online mysql (via json) so ive tried to amend it 

i've got so far that i get the view more but clicking seems to get the next 8 records but only shows the last 2 added rows in the tableview and doesnt add another view more at the end - ive looked at this code all day and i'm obviously got too far into a mix &amp; match code and cant see where i'm going wrong

~~~
var win = Ti.UI.currentWindow;

var page = 1; 
var page_size = 8;  
var more_index = 0;

var categoryArray = [];

var tableView = Ti.UI.createTableView({
	top:0,
	left:0,
	right:0,
	zIndex:10,
	backgroundColor:'transparent',
	separatorColor:'#ccc'
});

win.add(tableView);

	

function addRow(buses){

	Ti.API.info('Adding row for : '+buses.direction);	

	var row = Ti.UI.createTableViewRow({height:'auto',hasChild:false,selectedBackgroundColor:'#4eaaf0'}); 	

	var title_label = Ti.UI.createLabel({
		text:buses.direction,
		left:4,
		top:4,
		height:'auto',
		font:{fontFamily:'Helvetica Neue',fontSize:16,fontWeight:'bold'},
		color:'#fff',
		right:0,
		textAlign:'left',
		touchEnabled:false
	});
	
	row.add(title_label);
	row.id = buses.id;
	row.className = 'buses';
	tableView.appendRow(row);

}



function getBuses(page){

	var db = Titanium.Database.open('bus');
	var dbrows = db.execute('select * FROM bus LIMIT 0,'+page_size);
	while (dbrows.isValidRow()) {
	    categoryArray.push({
	    	id:dbrows.fieldByName('id'),
			direction:dbrows.fieldByName('direction'),
	    }); 


	    dbrows.next();
	}
	dbrows.close();
	db.close();
		var buses = categoryArray; 


		Ti.API.info(buses);
		
		Ti.API.info('there are '+buses.length);

		for(var i in buses){
			if(i){
				addRow(buses[i]);
			}
		Ti.API.info('i: '+i);

		if(i == page_size-1){
		
				
			var more_row = Ti.UI.createTableViewRow({height:'auto',hasChild:true,selectedBackgroundColor:'#4eaaf0'}); 	
			var title_label = Ti.UI.createLabel({
				text:'View more ... ',
				left:10,
				top:12,
				height:20,
				font:{fontFamily:'Helvetica Neue',fontSize:16,fontWeight:'normal'},
				color:'#fff',
				right:0,
				textAlign:'left',
				touchEnabled:false
			});
			more_row.add(title_label);
			more_row.id = 'MORE'; 
			
			tableView.appendRow(more_row);

		} 

		if(page &gt; 0 &amp;&amp; more_index!=0){
			tableView.deleteRow(more_index);
		}
		

	};

}



tableView.addEventListener('click',function(e){
	
	Ti.API.info('You clicked the tableView : '+e.rowData.id);  
	
	if(e.rowData.id=='MORE'){

		more_index = e.index;
		page_size+=8;
		getBuses(page);
		
	
	} else {

//link to stuff....
		
		
	}
	
});



getBuses(page);

~~~]]></description>
		<content:encoded><![CDATA[<p>i'm trying to add a &quot;view more rows&quot; from an sqlite db - i had working code when i pulled from an online mysql (via json) so ive tried to amend it</p>

<p>i've got so far that i get the view more but clicking seems to get the next 8 records but only shows the last 2 added rows in the tableview and doesnt add another view more at the end - ive looked at this code all day and i'm obviously got too far into a mix &amp; match code and cant see where i'm going wrong
<pre class="javascript codeblock"><span class="kw2">var</span> win <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">currentWindow</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">var</span> page <span class="sy0">=</span> <span class="nu0">1</span><span class="sy0">;</span> 
<span class="kw2">var</span> page_size <span class="sy0">=</span> <span class="nu0">8</span><span class="sy0">;</span>  
<span class="kw2">var</span> more_index <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">var</span> categoryArray <span class="sy0">=</span> <span class="br0">&#91;</span><span class="br0">&#93;</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">var</span> tableView <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createTableView</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
    top<span class="sy0">:</span><span class="nu0">0</span><span class="sy0">,</span>
    left<span class="sy0">:</span><span class="nu0">0</span><span class="sy0">,</span>
    right<span class="sy0">:</span><span class="nu0">0</span><span class="sy0">,</span>
    zIndex<span class="sy0">:</span><span class="nu0">10</span><span class="sy0">,</span>
    backgroundColor<span class="sy0">:</span><span class="st0">'transparent'</span><span class="sy0">,</span>
    separatorColor<span class="sy0">:</span><span class="st0">'#ccc'</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
win.<span class="me1">add</span><span class="br0">&#40;</span>tableView<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
&nbsp;
&nbsp;
<span class="kw2">function</span> addRow<span class="br0">&#40;</span>buses<span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp;
    Ti.<span class="me1">API</span>.<span class="me1">info</span><span class="br0">&#40;</span><span class="st0">'Adding row for : '</span><span class="sy0">+</span>buses.<span class="me1">direction</span><span class="br0">&#41;</span><span class="sy0">;</span>   
&nbsp;
    <span class="kw2">var</span> row <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createTableViewRow</span><span class="br0">&#40;</span><span class="br0">&#123;</span>height<span class="sy0">:</span><span class="st0">'auto'</span><span class="sy0">,</span>hasChild<span class="sy0">:</span><span class="kw2">false</span><span class="sy0">,</span>selectedBackgroundColor<span class="sy0">:</span><span class="st0">'#4eaaf0'</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>   
&nbsp;
    <span class="kw2">var</span> title_label <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createLabel</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
        text<span class="sy0">:</span>buses.<span class="me1">direction</span><span class="sy0">,</span>
        left<span class="sy0">:</span><span class="nu0">4</span><span class="sy0">,</span>
        top<span class="sy0">:</span><span class="nu0">4</span><span class="sy0">,</span>
        height<span class="sy0">:</span><span class="st0">'auto'</span><span class="sy0">,</span>
        font<span class="sy0">:</span><span class="br0">&#123;</span>fontFamily<span class="sy0">:</span><span class="st0">'Helvetica Neue'</span><span class="sy0">,</span>fontSize<span class="sy0">:</span><span class="nu0">16</span><span class="sy0">,</span>fontWeight<span class="sy0">:</span><span class="st0">'bold'</span><span class="br0">&#125;</span><span class="sy0">,</span>
        color<span class="sy0">:</span><span class="st0">'#fff'</span><span class="sy0">,</span>
        right<span class="sy0">:</span><span class="nu0">0</span><span class="sy0">,</span>
        textAlign<span class="sy0">:</span><span class="st0">'left'</span><span class="sy0">,</span>
        touchEnabled<span class="sy0">:</span><span class="kw2">false</span>
    <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
    row.<span class="me1">add</span><span class="br0">&#40;</span>title_label<span class="br0">&#41;</span><span class="sy0">;</span>
    row.<span class="me1">id</span> <span class="sy0">=</span> buses.<span class="me1">id</span><span class="sy0">;</span>
    row.<span class="me1">className</span> <span class="sy0">=</span> <span class="st0">'buses'</span><span class="sy0">;</span>
    tableView.<span class="me1">appendRow</span><span class="br0">&#40;</span>row<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="br0">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
<span class="kw2">function</span> getBuses<span class="br0">&#40;</span>page<span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp;
    <span class="kw2">var</span> db <span class="sy0">=</span> Titanium.<span class="me1">Database</span>.<span class="kw3">open</span><span class="br0">&#40;</span><span class="st0">'bus'</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="kw2">var</span> dbrows <span class="sy0">=</span> db.<span class="me1">execute</span><span class="br0">&#40;</span><span class="st0">'select * FROM bus LIMIT 0,'</span><span class="sy0">+</span>page_size<span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="kw1">while</span> <span class="br0">&#40;</span>dbrows.<span class="me1">isValidRow</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
        categoryArray.<span class="me1">push</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
            id<span class="sy0">:</span>dbrows.<span class="me1">fieldByName</span><span class="br0">&#40;</span><span class="st0">'id'</span><span class="br0">&#41;</span><span class="sy0">,</span>
            direction<span class="sy0">:</span>dbrows.<span class="me1">fieldByName</span><span class="br0">&#40;</span><span class="st0">'direction'</span><span class="br0">&#41;</span><span class="sy0">,</span>
        <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span> 
&nbsp;
&nbsp;
        dbrows.<span class="me1">next</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="br0">&#125;</span>
    dbrows.<span class="kw3">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    db.<span class="kw3">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
        <span class="kw2">var</span> buses <span class="sy0">=</span> categoryArray<span class="sy0">;</span> 
&nbsp;
&nbsp;
        Ti.<span class="me1">API</span>.<span class="me1">info</span><span class="br0">&#40;</span>buses<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
        Ti.<span class="me1">API</span>.<span class="me1">info</span><span class="br0">&#40;</span><span class="st0">'there are '</span><span class="sy0">+</span>buses.<span class="me1">length</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
        <span class="kw1">for</span><span class="br0">&#40;</span><span class="kw2">var</span> i <span class="kw1">in</span> buses<span class="br0">&#41;</span><span class="br0">&#123;</span>
            <span class="kw1">if</span><span class="br0">&#40;</span>i<span class="br0">&#41;</span><span class="br0">&#123;</span>
                addRow<span class="br0">&#40;</span>buses<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span>
            <span class="br0">&#125;</span>
        Ti.<span class="me1">API</span>.<span class="me1">info</span><span class="br0">&#40;</span><span class="st0">'i: '</span><span class="sy0">+</span>i<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
        <span class="kw1">if</span><span class="br0">&#40;</span>i <span class="sy0">==</span> page_size<span class="sy0">-</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp;
&nbsp;
            <span class="kw2">var</span> more_row <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createTableViewRow</span><span class="br0">&#40;</span><span class="br0">&#123;</span>height<span class="sy0">:</span><span class="st0">'auto'</span><span class="sy0">,</span>hasChild<span class="sy0">:</span><span class="kw2">true</span><span class="sy0">,</span>selectedBackgroundColor<span class="sy0">:</span><span class="st0">'#4eaaf0'</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>   
            <span class="kw2">var</span> title_label <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createLabel</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
                text<span class="sy0">:</span><span class="st0">'View more ... '</span><span class="sy0">,</span>
                left<span class="sy0">:</span><span class="nu0">10</span><span class="sy0">,</span>
                top<span class="sy0">:</span><span class="nu0">12</span><span class="sy0">,</span>
                height<span class="sy0">:</span><span class="nu0">20</span><span class="sy0">,</span>
                font<span class="sy0">:</span><span class="br0">&#123;</span>fontFamily<span class="sy0">:</span><span class="st0">'Helvetica Neue'</span><span class="sy0">,</span>fontSize<span class="sy0">:</span><span class="nu0">16</span><span class="sy0">,</span>fontWeight<span class="sy0">:</span><span class="st0">'normal'</span><span class="br0">&#125;</span><span class="sy0">,</span>
                color<span class="sy0">:</span><span class="st0">'#fff'</span><span class="sy0">,</span>
                right<span class="sy0">:</span><span class="nu0">0</span><span class="sy0">,</span>
                textAlign<span class="sy0">:</span><span class="st0">'left'</span><span class="sy0">,</span>
                touchEnabled<span class="sy0">:</span><span class="kw2">false</span>
            <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
            more_row.<span class="me1">add</span><span class="br0">&#40;</span>title_label<span class="br0">&#41;</span><span class="sy0">;</span>
            more_row.<span class="me1">id</span> <span class="sy0">=</span> <span class="st0">'MORE'</span><span class="sy0">;</span> 
&nbsp;
            tableView.<span class="me1">appendRow</span><span class="br0">&#40;</span>more_row<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
        <span class="br0">&#125;</span> 
&nbsp;
        <span class="kw1">if</span><span class="br0">&#40;</span>page <span class="sy0">&gt;</span> <span class="nu0">0</span> <span class="sy0">&amp;&amp;</span> more_index<span class="sy0">!=</span><span class="nu0">0</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
            tableView.<span class="me1">deleteRow</span><span class="br0">&#40;</span>more_index<span class="br0">&#41;</span><span class="sy0">;</span>
        <span class="br0">&#125;</span>
&nbsp;
&nbsp;
    <span class="br0">&#125;</span><span class="sy0">;</span>
&nbsp;
<span class="br0">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
tableView.<span class="me1">addEventListener</span><span class="br0">&#40;</span><span class="st0">'click'</span><span class="sy0">,</span><span class="kw2">function</span><span class="br0">&#40;</span>e<span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp;
    Ti.<span class="me1">API</span>.<span class="me1">info</span><span class="br0">&#40;</span><span class="st0">'You clicked the tableView : '</span><span class="sy0">+</span>e.<span class="me1">rowData</span>.<span class="me1">id</span><span class="br0">&#41;</span><span class="sy0">;</span>  
&nbsp;
    <span class="kw1">if</span><span class="br0">&#40;</span>e.<span class="me1">rowData</span>.<span class="me1">id</span><span class="sy0">==</span><span class="st0">'MORE'</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp;
        more_index <span class="sy0">=</span> e.<span class="me1">index</span><span class="sy0">;</span>
        page_size<span class="sy0">+=</span><span class="nu0">8</span><span class="sy0">;</span>
        getBuses<span class="br0">&#40;</span>page<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
&nbsp;
    <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span>
&nbsp;
<span class="co1">//link to stuff....</span>
&nbsp;
&nbsp;
    <span class="br0">&#125;</span>
&nbsp;
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
&nbsp;
&nbsp;
getBuses<span class="br0">&#40;</span>page<span class="br0">&#41;</span><span class="sy0">;</span></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>Random crash when using appendRow</title> 
		<link>http://developer.appcelerator.com/question/59001/random-crash-when-using-appendrow</link>
		<pubDate>Tue, 07 Sep 2010 14:05:47 -0700</pubDate>
		<dc:creator>Vinh Bui</dc:creator> 
				<category><![CDATA[iphone]]></category> 
				<category><![CDATA[crash]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/59001/random-crash-when-using-appendrow</guid>
		<description><![CDATA[I have this issue with 1.4.0 and 1.4.1 (from nightly) on iPhone.

Very frequently, the emulator and device will crash when calling appendRow. This happens maybe 1 out of 5 times.  Has anyone else experienced this?  It seems there is a race condition on appendRow as the rowcount is off - either that or something is being garbage collected.  Ideas?

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.  The number of rows contained in an existing section after the update (0) must be equal to the number of rows contained in that section before the update (0), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted).'

Our application flow:
1) Open new &quot;selector&quot; window to select something to add to the &quot;main&quot; windows table
2) Fire event in &quot;selector&quot; window to pass selected row back to the &quot;main&quot; window
3) Event in main window updates the table using appendRow 
4) Close the &quot;selector&quot; window]]></description>
		<content:encoded><![CDATA[<p>I have this issue with 1.4.0 and 1.4.1 (from nightly) on iPhone.</p>

<p>Very frequently, the emulator and device will crash when calling appendRow. This happens maybe 1 out of 5 times.  Has anyone else experienced this?  It seems there is a race condition on appendRow as the rowcount is off - either that or something is being garbage collected.  Ideas?</p>

<p>*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.  The number of rows contained in an existing section after the update (0) must be equal to the number of rows contained in that section before the update (0), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted).'</p>

<p>Our application flow:
1) Open new &quot;selector&quot; window to select something to add to the &quot;main&quot; windows table
2) Fire event in &quot;selector&quot; window to pass selected row back to the &quot;main&quot; window
3) Event in main window updates the table using appendRow 
4) Close the &quot;selector&quot; window</p>
]]></content:encoded>
	</item>
	<item>
		<title>Tableview inserRowAfter or appendRow with animation from UP issue.</title> 
		<link>http://developer.appcelerator.com/question/131550/tableview-inserrowafter-or-appendrow-with-animation-from-up-issue</link>
		<pubDate>Thu, 02 Feb 2012 07:32:21 -0800</pubDate>
		<dc:creator>Leonardo Amigoni</dc:creator> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/131550/tableview-inserrowafter-or-appendrow-with-animation-from-up-issue</guid>
		<description><![CDATA[If you insert or append a row at the bottom of a table and you animate from the UP, to simulate an accordion. The animation messes up. Try it out with the code below. 

It doesn't mess up if you add it to any other row. 

Does anyone know a workaround for this? 

~~~
var win = Ti.UI.createWindow({});

var tableData  = [
	{title:'Insert Row Above (no anim)', header:'Section 0'},
	{title:'Row2'},
	{title:'Insert Row Below - 1', name:'3'},
];

var tableView = Ti.UI.createTableView({
		backgroundColor: 'white',	
		separatorColor: '#d3d3d3',
		data:tableData
	});
	
tableView.addEventListener('click', function(e)
{
	var row = Ti.UI.createTableViewRow({
		backgroundColor: 'red',
		width: '`100%',
		height: 150,
	});
	
	tableView.appendRow(row,{animationStyle:Titanium.UI.iPhone.RowAnimationStyle.DOWN});
	
});

win.add(tableView);
win.open()
~~~]]></description>
		<content:encoded><![CDATA[<p>If you insert or append a row at the bottom of a table and you animate from the UP, to simulate an accordion. The animation messes up. Try it out with the code below.</p>

<p>It doesn't mess up if you add it to any other row.</p>

<p>Does anyone know a workaround for this? 
<pre class="javascript codeblock"><span class="kw2">var</span> win <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createWindow</span><span class="br0">&#40;</span><span class="br0">&#123;</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">var</span> tableData  <span class="sy0">=</span> <span class="br0">&#91;</span>
    <span class="br0">&#123;</span>title<span class="sy0">:</span><span class="st0">'Insert Row Above (no anim)'</span><span class="sy0">,</span> header<span class="sy0">:</span><span class="st0">'Section 0'</span><span class="br0">&#125;</span><span class="sy0">,</span>
    <span class="br0">&#123;</span>title<span class="sy0">:</span><span class="st0">'Row2'</span><span class="br0">&#125;</span><span class="sy0">,</span>
    <span class="br0">&#123;</span>title<span class="sy0">:</span><span class="st0">'Insert Row Below - 1'</span><span class="sy0">,</span> <span class="kw3">name</span><span class="sy0">:</span><span class="st0">'3'</span><span class="br0">&#125;</span><span class="sy0">,</span>
<span class="br0">&#93;</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">var</span> tableView <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createTableView</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
        backgroundColor<span class="sy0">:</span> <span class="st0">'white'</span><span class="sy0">,</span>   
        separatorColor<span class="sy0">:</span> <span class="st0">'#d3d3d3'</span><span class="sy0">,</span>
        data<span class="sy0">:</span>tableData
    <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
tableView.<span class="me1">addEventListener</span><span class="br0">&#40;</span><span class="st0">'click'</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>e<span class="br0">&#41;</span>
<span class="br0">&#123;</span>
    <span class="kw2">var</span> row <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createTableViewRow</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
        backgroundColor<span class="sy0">:</span> <span class="st0">'red'</span><span class="sy0">,</span>
        width<span class="sy0">:</span> <span class="st0">'`100%'</span><span class="sy0">,</span>
        height<span class="sy0">:</span> <span class="nu0">150</span><span class="sy0">,</span>
    <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
    tableView.<span class="me1">appendRow</span><span class="br0">&#40;</span>row<span class="sy0">,</span><span class="br0">&#123;</span>animationStyle<span class="sy0">:</span>Titanium.<span class="me1">UI</span>.<span class="me1">iPhone</span>.<span class="me1">RowAnimationStyle</span>.<span class="me1">DOWN</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
win.<span class="me1">add</span><span class="br0">&#40;</span>tableView<span class="br0">&#41;</span><span class="sy0">;</span>
win.<span class="kw3">open</span><span class="br0">&#40;</span><span class="br0">&#41;</span></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>append row with xhr content</title> 
		<link>http://developer.appcelerator.com/question/129462/append-row-with-xhr-content</link>
		<pubDate>Wed, 14 Dec 2011 14:14:34 -0800</pubDate>
		<dc:creator>Marco Payumo</dc:creator> 
				<category><![CDATA[xhr]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<category><![CDATA[dynamic table view]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/129462/append-row-with-xhr-content</guid>
		<description><![CDATA[Hi all,  

I'm trying to add Youtube content to a tableview after the user updates by scrolling.  I'm just not sure how to pull the xml content afterwards with the appendRow function.

The first 5 show up, then if the user scrolls the tableview up, it is supposed to add the next 5 on the list, and so on.  I'm not sure what I'm supposed to put on the load function.

here's the snippet of interest:
~~~
			// simulate loading
			for(var c = lastRow; c &lt; lastRow + 5 || c &lt;items.length; c++) {
				tableView.appendRow({
					title:'add content'
				}, {
					animationStyle : Titanium.UI.iPhone.RowAnimationStyle.NONE
				});
			}
			lastRow += 5;
~~~

here's the full code:

[http://pastebin.com/3bGzHmGD](http://pastebin.com/3bGzHmGD)]]></description>
		<content:encoded><![CDATA[<p>Hi all,</p>

<p>I'm trying to add Youtube content to a tableview after the user updates by scrolling.  I'm just not sure how to pull the xml content afterwards with the appendRow function.</p>

<p>The first 5 show up, then if the user scrolls the tableview up, it is supposed to add the next 5 on the list, and so on.  I'm not sure what I'm supposed to put on the load function.</p>

<p>here's the snippet of interest:<pre class="javascript codeblock"><span class="co1">// simulate loading</span>
            <span class="kw1">for</span><span class="br0">&#40;</span><span class="kw2">var</span> c <span class="sy0">=</span> lastRow<span class="sy0">;</span> c <span class="sy0">&lt;</span> lastRow <span class="sy0">+</span> <span class="nu0">5</span> <span class="sy0">||</span> c <span class="sy0">&lt;</span>items.<span class="me1">length</span><span class="sy0">;</span> c<span class="sy0">++</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
                tableView.<span class="me1">appendRow</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
                    title<span class="sy0">:</span><span class="st0">'add content'</span>
                <span class="br0">&#125;</span><span class="sy0">,</span> <span class="br0">&#123;</span>
                    animationStyle <span class="sy0">:</span> Titanium.<span class="me1">UI</span>.<span class="me1">iPhone</span>.<span class="me1">RowAnimationStyle</span>.<span class="me1">NONE</span>
                <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
            <span class="br0">&#125;</span>
            lastRow <span class="sy0">+=</span> <span class="nu0">5</span><span class="sy0">;</span></pre>
here's the full code:</p>

<p><a href="http://pastebin.com/3bGzHmGD">http://pastebin.com/3bGzHmGD</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>add TableviewRow on the fly without appendRow</title> 
		<link>http://developer.appcelerator.com/question/121860/add-tableviewrow-on-the-fly-without-appendrow</link>
		<pubDate>Thu, 30 Jun 2011 10:41:27 -0700</pubDate>
		<dc:creator>Jean-Philippe Boily</dc:creator> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[mobile]]></category> 
				<category><![CDATA[tableviewrow]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<category><![CDATA[1.7]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/121860/add-tableviewrow-on-the-fly-without-appendrow</guid>
		<description><![CDATA[Hi! Is there any other way to add rows on the fly to a tableview, besides using appendRow (crashing in 1.7 and 1.7.1)?


Thanks!]]></description>
		<content:encoded><![CDATA[<p>Hi! Is there any other way to add rows on the fly to a tableview, besides using appendRow (crashing in 1.7 and 1.7.1)?</p>

<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>tableView setData and appendRow bug [SDK 1.7.0]</title> 
		<link>http://developer.appcelerator.com/question/121669/tableview-setdata-and-appendrow-bug-sdk-170</link>
		<pubDate>Mon, 27 Jun 2011 09:47:13 -0700</pubDate>
		<dc:creator>Mutasim Karim</dc:creator> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<category><![CDATA[setdata]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/121669/tableview-setdata-and-appendrow-bug-sdk-170</guid>
		<description><![CDATA[tableView data isn't being assigned to the tableView when appendRow is used, this worked fine in 1.6.3, but not in 1.7.0

I've stripped down the code here:

http://pastie.org/2129868


TiMob SDK: 1.6.3/1.7.0 | iOS: 4.3 (iPhone) | TiStudio: 1.0.1]]></description>
		<content:encoded><![CDATA[<p>tableView data isn't being assigned to the tableView when appendRow is used, this worked fine in 1.6.3, but not in 1.7.0</p>

<p>I've stripped down the code here:</p>

<p>http://pastie.org/2129868</p>

<p>TiMob SDK: 1.6.3/1.7.0 | iOS: 4.3 (iPhone) | TiStudio: 1.0.1</p>
]]></content:encoded>
	</item>
	<item>
		<title>1.7.0.RC1 TableView appendRow crash</title> 
		<link>http://developer.appcelerator.com/question/119973/170rc1-tableview-appendrow-crash</link>
		<pubDate>Fri, 20 May 2011 11:47:55 -0700</pubDate>
		<dc:creator>David Wilson</dc:creator> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[mobile]]></category> 
				<category><![CDATA[ipad]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/119973/170rc1-tableview-appendrow-crash</guid>
		<description><![CDATA[In iPad simulator, this message appears at run time after compiling the following test case with 1.7.0.RC1.  Works fine showing a 4 row table with correct section header when built with 1.6x.

If the loop size is reduced to create and append only two rows, only the last one will appear in the tableview.

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (1), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted).'

~~~
mainWindow = Ti.UI.createWindow({backgroundColor:'#ddd'});

var rowIndex = 0;
var row; 
        
var hoursTableView = Ti.UI.createTableView({
            right: 20, width: 325,
            top: 135, height: 210,
            style: Ti.UI.iPhone.TableViewStyle.GROUPED
});
        
while (rowIndex &lt; 4) {
        
            row = Ti.UI.createTableViewRow({
                  className: 'hoursRow', 
            });

            if (rowIndex == 0) {
               row.header = 'Hours';
            };
                        
            row.add(Ti.UI.createLabel({
                left: 5, width: 150,
                text: 'Hours ' + rowIndex
            }));
            
            hoursTableView.appendRow(row);
            rowIndex = rowIndex + 1;
}
mainWindow.add(hoursTableView);
        
mainWindow.open({ animated: false });
~~~]]></description>
		<content:encoded><![CDATA[<p>In iPad simulator, this message appears at run time after compiling the following test case with 1.7.0.RC1.  Works fine showing a 4 row table with correct section header when built with 1.6x.</p>

<p>If the loop size is reduced to create and append only two rows, only the last one will appear in the tableview.</p>

<p>*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (1), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted).'
<pre class="javascript codeblock">mainWindow <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createWindow</span><span class="br0">&#40;</span><span class="br0">&#123;</span>backgroundColor<span class="sy0">:</span><span class="st0">'#ddd'</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">var</span> rowIndex <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span>
<span class="kw2">var</span> row<span class="sy0">;</span> 
&nbsp;
<span class="kw2">var</span> hoursTableView <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createTableView</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
            right<span class="sy0">:</span> <span class="nu0">20</span><span class="sy0">,</span> width<span class="sy0">:</span> <span class="nu0">325</span><span class="sy0">,</span>
            top<span class="sy0">:</span> <span class="nu0">135</span><span class="sy0">,</span> height<span class="sy0">:</span> <span class="nu0">210</span><span class="sy0">,</span>
            style<span class="sy0">:</span> Ti.<span class="me1">UI</span>.<span class="me1">iPhone</span>.<span class="me1">TableViewStyle</span>.<span class="me1">GROUPED</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="kw1">while</span> <span class="br0">&#40;</span>rowIndex <span class="sy0">&lt;</span> <span class="nu0">4</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
&nbsp;
            row <span class="sy0">=</span> Ti.<span class="me1">UI</span>.<span class="me1">createTableViewRow</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
                  className<span class="sy0">:</span> <span class="st0">'hoursRow'</span><span class="sy0">,</span> 
            <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
            <span class="kw1">if</span> <span class="br0">&#40;</span>rowIndex <span class="sy0">==</span> <span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
               row.<span class="me1">header</span> <span class="sy0">=</span> <span class="st0">'Hours'</span><span class="sy0">;</span>
            <span class="br0">&#125;</span><span class="sy0">;</span>
&nbsp;
            row.<span class="me1">add</span><span class="br0">&#40;</span>Ti.<span class="me1">UI</span>.<span class="me1">createLabel</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
                left<span class="sy0">:</span> <span class="nu0">5</span><span class="sy0">,</span> width<span class="sy0">:</span> <span class="nu0">150</span><span class="sy0">,</span>
                text<span class="sy0">:</span> <span class="st0">'Hours '</span> <span class="sy0">+</span> rowIndex
            <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
            hoursTableView.<span class="me1">appendRow</span><span class="br0">&#40;</span>row<span class="br0">&#41;</span><span class="sy0">;</span>
            rowIndex <span class="sy0">=</span> rowIndex <span class="sy0">+</span> <span class="nu0">1</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
mainWindow.<span class="me1">add</span><span class="br0">&#40;</span>hoursTableView<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
mainWindow.<span class="kw3">open</span><span class="br0">&#40;</span><span class="br0">&#123;</span> animated<span class="sy0">:</span> <span class="kw2">false</span> <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>Cosmetic glitch on TableView when adding rows dynamically via appendRow</title> 
		<link>http://developer.appcelerator.com/question/117814/cosmetic-glitch-on-tableview-when-adding-rows-dynamically-via-appendrow</link>
		<pubDate>Mon, 28 Mar 2011 02:01:03 -0700</pubDate>
		<dc:creator>Dhaya Benmessaoud</dc:creator> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<category><![CDATA[ios]]></category> 
				<category><![CDATA[glitch]]></category> 
				<category><![CDATA[tableviewstyle.grouped]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/117814/cosmetic-glitch-on-tableview-when-adding-rows-dynamically-via-appendrow</guid>
		<description><![CDATA[Hi,

I'm using a TableView component with a Titanium.UI.iPhone.TableViewStyle.GROUPED style on iOS in the following (simplified) scenario :

- I have initially a single row in my TableView component
- When I click on my row it appends another one
- It is limited to three rows

&gt;  

The problem is, when I append rows my way, the highlighted shape is not updated the way it should be. You'll have a better understanding by watching these screenshots.

- [One row](http://cl.ly/1r1o1D1N3w1Z2X2p432Y)
- [Three rows](http://cl.ly/3T1M0n3s1x3G2p0h1x2D)
- [The highlight glitch](http://cl.ly/2O1q1d19081n1q0H0U2P)

&gt;  

I'm achieving this with this code : [Gist](https://gist.github.com/7cdcdfbd2929177e8504)

Do you have any idea on how to redraw the grouped TableView component so that the highlighted shape on a row fills it completely and not based on it's first form ?]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>

<p>I'm using a TableView component with a Titanium.UI.iPhone.TableViewStyle.GROUPED style on iOS in the following (simplified) scenario :</p>

<ul>
<li>I have initially a single row in my TableView component</li>
<li>When I click on my row it appends another one</li>
<li>It is limited to three rows</li>
</ul>

<p>&gt;</p>

<p>The problem is, when I append rows my way, the highlighted shape is not updated the way it should be. You'll have a better understanding by watching these screenshots.</p>

<ul>
<li><a href="http://cl.ly/1r1o1D1N3w1Z2X2p432Y">One row</a></li>
<li><a href="http://cl.ly/3T1M0n3s1x3G2p0h1x2D">Three rows</a></li>
<li><a href="http://cl.ly/2O1q1d19081n1q0H0U2P">The highlight glitch</a></li>
</ul>

<p>&gt;</p>

<p>I'm achieving this with this code : <a href="https://gist.github.com/7cdcdfbd2929177e8504">Gist</a></p>

<p>Do you have any idea on how to redraw the grouped TableView component so that the highlighted shape on a row fills it completely and not based on it's first form ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Possible to appendRow to the top of a tableView instead of the bottom?</title> 
		<link>http://developer.appcelerator.com/question/117129/possible-to-appendrow-to-the-top-of-a-tableview-instead-of-the-bottom</link>
		<pubDate>Fri, 11 Mar 2011 19:09:19 -0800</pubDate>
		<dc:creator>Jeremy Fox</dc:creator> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[iphone]]></category> 
				<category><![CDATA[row]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<category><![CDATA[refresh]]></category> 
				<category><![CDATA[top]]></category> 
				<category><![CDATA[order]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/117129/possible-to-appendrow-to-the-top-of-a-tableview-instead-of-the-bottom</guid>
		<description><![CDATA[I have just implemented the Pull To Refresh feature in my app. The only problem I am seeing is that the new appended rows using `tableView.appendRow(row)` are showing up at the bottom on the tableView. I need them to append to the top of the tableView. Is this possible?

If anyone knows if this is possible please let me know. It really wouldn't make sense to append new rows to the bottom of my tableView. I have it set up so that when the tableView initially loads it pulls the most recent posts from the database and orders them with the most recent post at the top and descends from there.

Any help is greatly appreciated!]]></description>
		<content:encoded><![CDATA[<p>I have just implemented the Pull To Refresh feature in my app. The only problem I am seeing is that the new appended rows using <code class="codeblock codeblock-inline">tableView.appendRow(row)</code> are showing up at the bottom on the tableView. I need them to append to the top of the tableView. Is this possible?</p>

<p>If anyone knows if this is possible please let me know. It really wouldn't make sense to append new rows to the bottom of my tableView. I have it set up so that when the tableView initially loads it pulls the most recent posts from the database and orders them with the most recent post at the top and descends from there.</p>

<p>Any help is greatly appreciated!</p>
]]></content:encoded>
	</item>
	<item>
		<title>TableView and AppendRow displays nothing when table has one row?</title> 
		<link>http://developer.appcelerator.com/question/76221/tableview-and-appendrow-displays-nothing-when-table-has-one-row</link>
		<pubDate>Wed, 03 Nov 2010 11:09:09 -0700</pubDate>
		<dc:creator>Brian Hogan</dc:creator> 
				<category><![CDATA[android]]></category> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/76221/tableview-and-appendrow-displays-nothing-when-table-has-one-row</guid>
		<description><![CDATA[I have this code in a window:
~~~
// table view
var tview = Titanium.UI.createTableView({
  top: 50
});

// add table view to the window
Titanium.UI.currentWindow.add(tview);

tview.appendRow({hasChild:true,title: &quot;test row&quot;});  
~~~

Using Android 1.6 in the emulator, Titanium 1.2.1 + SDK 1.4.1.1 on my Mac, the above code does not render a table.

However, if I add another row

~~~
tview.appendRow({hasChild:true,title: &quot;another row&quot;});  
~~~

BOTH rows show up. Been stuck on this for 2 days. Is this a known bug? Should I not be appending rows this way? Would appreciate any suggestions.]]></description>
		<content:encoded><![CDATA[<p>I have this code in a window:<pre class="javascript codeblock"><span class="co1">// table view</span>
<span class="kw2">var</span> tview <span class="sy0">=</span> Titanium.<span class="me1">UI</span>.<span class="me1">createTableView</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
  top<span class="sy0">:</span> <span class="nu0">50</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// add table view to the window</span>
Titanium.<span class="me1">UI</span>.<span class="me1">currentWindow</span>.<span class="me1">add</span><span class="br0">&#40;</span>tview<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
tview.<span class="me1">appendRow</span><span class="br0">&#40;</span><span class="br0">&#123;</span>hasChild<span class="sy0">:</span><span class="kw2">true</span><span class="sy0">,</span>title<span class="sy0">:</span> <span class="st0">&quot;test row&quot;</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre>
Using Android 1.6 in the emulator, Titanium 1.2.1 + SDK 1.4.1.1 on my Mac, the above code does not render a table.</p>

<p>However, if I add another row
<pre class="javascript codeblock">tview.<span class="me1">appendRow</span><span class="br0">&#40;</span><span class="br0">&#123;</span>hasChild<span class="sy0">:</span><span class="kw2">true</span><span class="sy0">,</span>title<span class="sy0">:</span> <span class="st0">&quot;another row&quot;</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre>
BOTH rows show up. Been stuck on this for 2 days. Is this a known bug? Should I not be appending rows this way? Would appreciate any suggestions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>appendRow and setData Problem</title> 
		<link>http://developer.appcelerator.com/question/54091/appendrow-and-setdata-problem</link>
		<pubDate>Thu, 19 Aug 2010 06:36:54 -0700</pubDate>
		<dc:creator>Abraham Vivas</dc:creator> 
				<category><![CDATA[android]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<category><![CDATA[setdata]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/54091/appendrow-and-setdata-problem</guid>
		<description><![CDATA[I am using the method setData to load more content in a table view. If there is more content to load I create a tableViewRow that when click calls the function to load more. Currently I am simply pushing the data to the array and then setting the data using the setData(array) method. The problem I am seeing is that when I do this in Android, the tableview scrolls all the way to the top and I do not want this behavior. I then attempted to use appendRow for every single row (which I know reduces performance as it is called so many times), but I found out that every time a row is appended the tableview also scrolls to the top. Is there a way to prevent this behavior so that when the next rows are loaded, they are simply appended to the previous rows? 


###Update
This works on iPhone without the scrolling to the top. Any ideas?]]></description>
		<content:encoded><![CDATA[<p>I am using the method setData to load more content in a table view. If there is more content to load I create a tableViewRow that when click calls the function to load more. Currently I am simply pushing the data to the array and then setting the data using the setData(array) method. The problem I am seeing is that when I do this in Android, the tableview scrolls all the way to the top and I do not want this behavior. I then attempted to use appendRow for every single row (which I know reduces performance as it is called so many times), but I found out that every time a row is appended the tableview also scrolls to the top. Is there a way to prevent this behavior so that when the next rows are loaded, they are simply appended to the previous rows?</p>

<h3>Update</h3>

<p>This works on iPhone without the scrolling to the top. Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>append a row with a custom function</title> 
		<link>http://developer.appcelerator.com/question/19671/append-a-row-with-a-custom-function</link>
		<pubDate>Fri, 23 Apr 2010 20:34:29 -0700</pubDate>
		<dc:creator>Kelly Redd</dc:creator> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/19671/append-a-row-with-a-custom-function</guid>
		<description><![CDATA[I have a function called addRow(data,i) that runs when my app loads and populates a tableview. all is well. i want to use this same function to append a new row to the table but it's not doing anything. 

any ideas? I can see the data returned in the console but nothing is appended.

~~~
projTable.addEventListener('click',function(e)
{
  var xhr2 = Titanium.Network.createHTTPClient();
  xhr2.onload = function()
  {
    var d = JSON.parse(this.responseText);
    Ti.API.info(d); // verify data is returned
    data = addRow(d,4);
    projTable.appendRow(data);
  };
				
xhr2.open('GET','http://get_remote_array.php');
xhr2.send();
});
~~~]]></description>
		<content:encoded><![CDATA[<p>I have a function called addRow(data,i) that runs when my app loads and populates a tableview. all is well. i want to use this same function to append a new row to the table but it's not doing anything.</p>

<p>any ideas? I can see the data returned in the console but nothing is appended.
<pre class="javascript codeblock">projTable.<span class="me1">addEventListener</span><span class="br0">&#40;</span><span class="st0">'click'</span><span class="sy0">,</span><span class="kw2">function</span><span class="br0">&#40;</span>e<span class="br0">&#41;</span>
<span class="br0">&#123;</span>
  <span class="kw2">var</span> xhr2 <span class="sy0">=</span> Titanium.<span class="me1">Network</span>.<span class="me1">createHTTPClient</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
  xhr2.<span class="kw3">onload</span> <span class="sy0">=</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="kw2">var</span> d <span class="sy0">=</span> JSON.<span class="me1">parse</span><span class="br0">&#40;</span><span class="kw1">this</span>.<span class="me1">responseText</span><span class="br0">&#41;</span><span class="sy0">;</span>
    Ti.<span class="me1">API</span>.<span class="me1">info</span><span class="br0">&#40;</span>d<span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// verify data is returned</span>
    data <span class="sy0">=</span> addRow<span class="br0">&#40;</span>d<span class="sy0">,</span><span class="nu0">4</span><span class="br0">&#41;</span><span class="sy0">;</span>
    projTable.<span class="me1">appendRow</span><span class="br0">&#40;</span>data<span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span><span class="sy0">;</span>
&nbsp;
xhr2.<span class="kw3">open</span><span class="br0">&#40;</span><span class="st0">'GET'</span><span class="sy0">,</span><span class="st0">'http://get_remote_array.php'</span><span class="br0">&#41;</span><span class="sy0">;</span>
xhr2.<span class="me1">send</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>TableView - add row dynamically</title> 
		<link>http://developer.appcelerator.com/question/4621/tableview---add-row-dynamically</link>
		<pubDate>Sat, 20 Mar 2010 08:07:36 -0700</pubDate>
		<dc:creator>Anh Tuan Kieu</dc:creator> 
				<category><![CDATA[android]]></category> 
				<category><![CDATA[1.0]]></category> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[appendrow]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/4621/tableview---add-row-dynamically</guid>
		<description><![CDATA[Hi all,
I have an Android application that can dynamically load data from a webservice and append it to a tableView. That works in 0.8.x without any problem.

I'm doing the migration of my app to 1.0 and I have found some problem with appendRow method. It seems not to work after the tableView is added (initialized) to the current window. Here is the prototype of my code that no longer works in 1.0:

[http://pastie.org/878557](http://pastie.org/878557)]]></description>
		<content:encoded><![CDATA[<p>Hi all,
I have an Android application that can dynamically load data from a webservice and append it to a tableView. That works in 0.8.x without any problem.</p>

<p>I'm doing the migration of my app to 1.0 and I have found some problem with appendRow method. It seems not to work after the tableView is added (initialized) to the current window. Here is the prototype of my code that no longer works in 1.0:</p>

<p><a href="http://pastie.org/878557">http://pastie.org/878557</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>