 	code += stringFunctions obj
 	code
 
-module.exports = (file) ->
+stringViewObjectFull = (obj) ->
+	if obj.type is CODE
+		return obj.body
+
+	assert obj.type is OBJECT, "stringObjectFull: type must be an object"
+
+	code = stringObjectHead obj
+	code += "setImmediate(function(){\n"
+	code += stringObjectChildren obj
+	code += stringAttributes obj
+	code += stringFunctions obj
+	code += "});"
+	code
+
+module.exports = (file, filename) ->
 	elems = parser file
 	ids = {}
 
-	code = ''
+	code = 'var ids = {};\n'
 	for elem in elems
-		code += stringObjectFull elem
+		if filename is 'view'
+			code += stringViewObjectFull elem
+		else
+			code += stringObjectFull elem
 
 	idsKeys = Object.keys ids
 

		if typeof elem is 'string'
			elem = elem.replace ///'///g, '\\\''
			text += "'#{elem}'"
		else
			text += repeatString('[', elem.length-1)
			text += "#{elem[0]}"
			elem.shift()
			for id, i in elem
				text += ", '#{id}']"

	"[#{text}]"

stringObject = (obj) ->
	assert obj.type is OBJECT, "stringObject: type must be an object"

	if getByType(obj.body, ID).length > 0

	for signal in signals
		r += "#{obj.id}.createSignal('#{utils.addSlashes(signal)}')\n"

	r

stringObjectChildren = (obj) ->
	assert obj.type is OBJECT, "stringObject: type must be an object"

	r = ""

	for child in getByType(obj.body, OBJECT)
		r += stringObject child

