All pastes #614005 Raw Edit

Mine

public php v1 · immutable
·published 2007-07-11 08:56 UTC
rendered paste body
	private function init_widget() {		if(!isset($this->options['data_columns'])) {			throw new Exception("No data columns for GTKComboBoxEntry");		}				$my_arguments = array();				foreach($this->options['data_columns'] as $data_column) {			switch($data_column['type']) {				case 'string':					$my_arguments[] = Gtk::TYPE_STRING;					break;				default:					throw new Exception('Type: ' . $data_column['type'] . ' not allowed');					break;			}		}				$this->list_store = new GTKListStore($my_arguments);				$this->renderer = new GtkCellRendererText();				$this->widget = new GTKComboBoxEntry();				$this->widget->set_text_column(0);				$this->pack_start($this->renderer);				$this->load_data();	}