コード例 #1
0
void ElementDataGridRow::SetDataSource(const Rocket::Core::String& data_source_name)
{
	if (data_source)
		data_source->DetachListener(this);

	if (ParseDataSource(data_source, data_table, data_source_name))
	{
		data_source->AttachListener(this);
		RefreshRows();
	}
}
コード例 #2
0
// If a new data source has been set on the control, this will attach to it and build the initial
// options.
void ElementFormControlDataSelect::OnUpdate()
{
	if (!initialised)
	{
		initialised = true;

		if (ParseDataSource(data_source, data_table, GetAttribute< Rocket::Core::String >("source", "")))
		{
			data_source->AttachListener(this);
			BuildOptions();
		}
	}
}