 		
 		if alert.runModal() == NSAlertFirstButtonReturn {
 			sourceFileTextView.string = String.stringInBundle(name: "SourceDemo")
-			update()
+			updateDocumentsAndUserInterface()
 		}
 	}
 }

		
		if let basePath = basePath {
			if let string = prog.lazyfileString(basePath: basePath, error: &error) {
				sourceFileTextView.string = string
				update()
			}
			
			if let error = error {

		self.exportButton.enabled = enabled
	}
	
	override var representedObject: AnyObject? {
		didSet {
			// Update the view, if already loaded.
		}
	}
	
	func updateDocumentsAndUserInterface() {
		
		updateDocuments()
		updateUserInterface()
	}
	
	func updateDocuments() {
		
		analyzer.platform = Platform(rawValue: platformSegControl.selectedSegment)
		
		if let sourceString = sourceFileTextView.string {
			analyzer.inputString = sourceString
		}
		
		analyzer.process()
	}
	
	func updateUserInterface() {
		
		sourceFileTextView.setUpForDisplayingSourceCode()
		mainGeneratedCodeTextView.setUpForDisplayingSourceCode()
