
registerType('appdoo.DataSources', (function () { function TimeDataSource() {} var __super = setSupertypeFromDomain(TimeDataSource, 'BasicObject', 'Core');

TimeDataSource.prototype.init = function TimeDataSource_init() {
		var self = __super.prototype.init.call(this);
		if (self) {
			setInterval(function () {
				this.callDelegate('dataSourceDidChange', [this]);
			}.bind(this), 1000);
		}
		return self;};
	

	Object.defineProperty(TimeDataSource.prototype, "outlineIconURL", {
		get: function () {
			return this.context.pathForResource('OutlineTimeDataSource.png');
		}});
	

	Object.defineProperty(TimeDataSource.prototype, "name", {
	outlet: true, 
	synthesized: true, 
	enumerable: true, get:function () { return this._name; }, set:function (v) {if (!Object.hasOwnProperty(this, "_name")) Object.defineProperty(this, "_name", { writable: true, configurable: true }); this._name = v; }});
	

	Object.defineProperty(TimeDataSource.prototype, "delegate", {
	synthesized: true, get:function () { return this._delegate; }, set:function (v) {if (!Object.hasOwnProperty(this, "_delegate")) Object.defineProperty(this, "_delegate", { writable: true, configurable: true }); this._delegate = v; }});
	

	Object.defineProperty(TimeDataSource.prototype, "time", {
		get: function () {
			var d = new Date();
			
			return zeroFill(d.getUTCHours()-4,2)+':'+zeroFill(d.getUTCMinutes(),2);
		}});
	
	
TimeDataSource.prototype.initPropertiesFromData = function TimeDataSource_initPropertiesFromData(data) {
try { __super.prototype.initPropertiesFromData.call(this, data); } catch (err) {}
if (data.hasOwnProperty("name")) this.name = data.name;
};

TimeDataSource.prototype.decodeData = function TimeDataSource_decodeData(data) { var decoded;
try { decoded = __super.prototype.decodeData.call(this, data); } catch (err) { console.warn(err); decoded = clone(data); }
return decoded; };

TimeDataSource.prototype.encode = function TimeDataSource_encode() { var encoded;
try { encoded = __super.prototype.encode.call(this); } catch (err) { console.warn(err); encoded = this.context.encodeObject(this); }
return encoded; };

TimeDataSource.prototype.encodeCloned = function TimeDataSource_encodeCloned() { var encoded;
try { encoded = __super.prototype.encodeCloned.call(this); } catch (err) { console.warn(err); encoded = {}; }
return encoded; };

TimeDataSource.prototype.expectedTypeForProperty = function TimeDataSource_expectedTypeForProperty(key) {
	if (key === "outlineIconURL") return "";
	if (key === "name") return "";
	if (key === "delegate") return "";
	if (key === "time") return "";
	if (__super) return __super.prototype.expectedTypeForProperty(key);
};

return TimeDataSource; }()));