 
 	idsKeys = Object.keys ids
 
+	if filename is 'view'
+		code += "setImmediate(function(){\n"
+	code += "for (var _id in ids){\n"
+	code += "	ids[_id].ready(); ids[_id].onReady.disconnectAll();\n"
+	code += "}\n"
+	if filename is 'view'
+		code += "});\n"
+
 	code += "var mainItem;\n"
 	for elem in elems
 		if elem.type is OBJECT

			elem.unshift "'this'"
		else if id is 'this'
			elem[0] = "'this'"
		else if id is 'view' or ids.hasOwnProperty(id)
			continue
		else
			binding[i] = elem.join '.'

	code += stringObjectChildren obj
	code += stringAttributes obj
	code += stringFunctions obj
	code += "});\n"
	code

module.exports = (file, filename) ->
