// prototype.js is loaded var Controller = new Class.create(); //prototype syntax Controller.prototype = { initialize: function(){ //constructor this.viewstate = {'mainview':'products.tpl', 'header':'logo.tpl'}; this.update_viewstate(); }, update_viewstate: function(transport, json){ //this.viewstate.concat(json); @@ alert(dump(this.viewstate)); // just returns a not defined!! } }; var myController = new Controller;