
module.exports = new Class
({
	Extends: Htk.Field
	,Tag: 'htk-text'
	,Properties:
	{
		/**
		 * Format that applies to the value.
		 */
		format:
		{
			type: String
			,set: function (x)
			{
				this._format = _(x);
				this._putFieldValue (this._value);
			}
			,get: function ()
			{
				return this._format;
			}
		}
	}
	
	,_format: null

	,render: function ()
	{
		this._node = this.createTextNode ('');
	}

	,_putFieldValue: function (value)
	{
		this._node.nodeValue = Vn.Value.format (value, this._format);
	}
});
