/**
 * Weird issue 2:
 * If insert is called twice, weird issue 1 is not a problem.
 * Uncomment the two following lines to test. 
 * Make sure weird issue 1 is commented just to isolate the
 * issue.
 */
//$iter = $listStore->insert(2, array('Crisscott Pencils', 18, .99));
//$iter = $listStore->insert(3, array('Crisscott Pens', 18, .99));
// Create a veiw to show the list.
$view = new GtkTreeView();
$view->set_model($listStore);
// Create columns for each type of data.
$column = new GtkTreeViewColumn();
$column->set_title('Product Name');
$view->insert_column($column, 0);
// Create a renderer for the column.
$cell_renderer = new GtkCellRendererText();
$column->pack_start($cell_renderer, true);
$column->set_attributes($cell_renderer, 'text', 0);
// Create columns for each type of data.
$column = new GtkTreeViewColumn();
$column->set_title('Inventory');
$view->insert_column($column, 1);
// Create a renderer for the column.
$cell_renderer = new GtkCellRendererText();
$column->pack_start($cell_renderer, true);
$column->set_attributes($cell_renderer, 'text', 1);
// Create columns for each type of data.
$column = new GtkTreeViewColumn();
$column->set_title('Price');