 		c.setParent(@)
 		if options.default
 			@setDefaultChild(c)	
+		
 		@children.push c
 	
 	removeChild: (c) ->

			if descendant
				return descendant
				
	getActiveController: ->
		for child in @children
			return child if child.isActive()
	

	# defaultChild		Controller
	#
	
	constructor: (options={}) ->
		@sm = new StateMachine
		
		defaultState = options.defaultState
		
		@sm.addState Controller.STATE_DEACTIVATED, defaultState == Controller.STATE_ACTIVATED ? false : true
		@sm.addState Controller.STATE_ACTIVATED, defaultState == Controller.STATE_ACTIVATED ? true : false
		
		@sm.bind "on_transition", @transition
		@children = []
