define("chy/event/_proto", [
	"dojo/_base/declare",
	"dijit/registry",
	"dojo/on"
], function(declare, reg, on){

	return declare("chy.event._proto", null, {

		formManager: null,
		params: [],
			
		init: function(params, formManager){
			console.log("init event ", params, formManager);
			this.params = params;
			this.formManager = formManager;
			var _this = this;
			var target = reg.byId(formManager.id+'-'+params.question_id);
			if(typeof target != 'undefined'){
				on(target,'change',function(e){
					_this.eventAction(e,_this);
				});
			}
		},
		
		eventAction: function(e){
			console.log("_proto event action", e);
		}
	});
});