Commit 5577cc4d authored by Aral Balkan's avatar Aral Balkan
Browse files

Cleaned up the log messages during the setup process. Progress towards #60.

parent b6ee350e
......@@ -103,21 +103,21 @@ class MainWindowController: NSWindowController
func fadeOutMainWindow(notification: NSNotification)
{
println("Fading out main window")
println("ℹ️ Fading out main window. (\(self))\n")
showDisabled()
}
func fadeInMainWindow(notification: NSNotification)
{
println("Fading in main window")
println("ℹ️ Fading in main window. (\(self))\n")
showEnabled()
}
func showEnabled()
{
println("Showing main window in enabled state (removing shade)")
println("ℹ️ Showing main window in enabled state (removing shade). (\(self))\n")
let animation:CATransition = CATransition()
animation.type = kCATransitionFade
......@@ -132,7 +132,7 @@ class MainWindowController: NSWindowController
func showDisabled()
{
println("Showing main window in disabled state (with shade)")
println("ℹ️ Showing main window in disabled state (with shade). (\(self))\n")
let animation:CATransition = CATransition()
animation.type = kCATransitionFade
......
......@@ -38,7 +38,7 @@ class MessageSplitViewController: NSSplitViewController
func addNotificationHandlers()
{
println("\(self): adding notification handlers.")
// println("\(self): adding notification handlers.")
//
// MARK: - .SendMessage
......@@ -203,7 +203,7 @@ class MessageSplitViewController: NSSplitViewController
func removeNotificationHandlers()
{
println("\(self): removing notification handlers")
// println("\(self): removing notification handlers")
sendMessageNotificationHandler?.remove()
sendMessageNotificationHandler = nil
......
......@@ -252,7 +252,7 @@ public class Node: NSObject, WebSocketDelegate
if text.containsString("ns:started")
{
println("📡 \t\tNode.js web socket is ready. Connecting…")
println("📡 \t\tNode.js web socket is ready. Connecting…\n")
self.socket = WebSocket(url: NSURL(string: "ws://localhost:42001")!)
self.socket!.delegate = self
self.socket!.connect()
......@@ -299,7 +299,7 @@ public class Node: NSObject, WebSocketDelegate
public func websocketDidConnect()
{
println("📡 \t\tConnected.")
println("📡 \t\tConnected.\n")
self.delegate?.nodeIsReady(self)
post(NodeNotification.named(.NodeIsReady), from: self)
......@@ -365,7 +365,7 @@ public class Node: NSObject, WebSocketDelegate
// println("About to broadcast pulse event: \(json[0])")
let pulseEventType = json[0]["type"].string
println("📡 📃 \tPulse event received: \(pulseEventType)")
println("📡 📃 \tPulse event received: \(pulseEventType) (\(self))\n")
broadcastPulseEvent(json[0])
}
......
......@@ -263,7 +263,7 @@ class ProfileImageComponentViewController: NSViewController, NSComboBoxDataSourc
self.faces = features as! [CIFaceFeature]
println("Features: \(features)")
println("ℹ️ Features: \(features) (\(self))\n")
// TODO: Handle this in conjunction with the control panel.
/*
......@@ -437,7 +437,7 @@ class ProfileImageComponentViewController: NSViewController, NSComboBoxDataSourc
let faceZoomFactor = min(faceHorizontalZoomFactor, faceVerticalZoomFactor)
println("\(self): Face zoom factor: \(faceZoomFactor)")
println("ℹ️ Face zoom factor: \(faceZoomFactor) (\(self))\n")
let centerOfFace = NSMakePoint((faceX + faceWidth/2), (faceY + faceHeight/2))
......
......@@ -139,10 +139,10 @@ class SetupMessageViewController: NSViewController
}
override func animationDidStop(anim: CAAnimation!, finished flag: Bool)
{
println("Animation did stop: \(anim). Finished? \(flag)")
}
// override func animationDidStop(anim: CAAnimation!, finished flag: Bool)
// {
// println("Animation did stop: \(anim). Finished? \(flag)")
// }
func show()
......@@ -163,7 +163,7 @@ class SetupMessageViewController: NSViewController
// If an accessibility hint (e.g., an instruction to press a certain keyboard shortcut) exists, add it to the message to be spoken.
if let accessibilityHint = self.accessibilityHint
{
println("Adding accessibility hint: \(self.accessibilityHint)")
println("♿️ Adding accessibility hint: \(self.accessibilityHint) (\(self))\n")
messageToRead = messageToRead.stringByAppendingString(accessibilityHint)
}
......
......@@ -124,7 +124,7 @@ struct SetupData
if let accountDetailsReadError = accountDetailsReadError
{
println("Could not load profile details. Assuming you haven’t completed the setup process yet. (\(self)\n")
println("ℹ️ Could not load profile details. Assuming you haven’t completed the setup process yet. (\(self))\n")
return false
}
else
......
......@@ -80,9 +80,8 @@ class SetupPrereleaseProgramWelcomeAndCodeViewController: NSViewController {
}
}
override func viewDidAppear() {
println("******************************************************************************************")
override func viewDidAppear()
{
self.view.window?.makeFirstResponder(self.invitationCode)
}
}
......@@ -191,6 +191,8 @@ class SetupStepOneViewController: SetupStepViewController
override func persistData()
{
println("ℹ️ Persisting profile data for Step One of the Setup process. (\(self))\n")
SetupData.accountHandle = nameTextField.stringValue
}
......@@ -214,7 +216,7 @@ class SetupStepOneViewController: SetupStepViewController
nameTextFieldCopyForMeasurements.sizeToFit()
var textFieldCopyWidth = NSWidth(nameTextFieldCopyForMeasurements.frame).doubleValue
println("Text field copy width: \(textFieldCopyWidth)")
// println("Text field copy width: \(textFieldCopyWidth)")
// Set the minimum width.
if textFieldCopyWidth < self.minimumWidthOfAccountTextField
......@@ -224,7 +226,7 @@ class SetupStepOneViewController: SetupStepViewController
nameTextFieldWidthConstraint.constant = CGFloat(textFieldCopyWidth)
println("nameTextFieldWidthConstraint.constant: \(nameTextFieldWidthConstraint.constant)")
// println("nameTextFieldWidthConstraint.constant: \(nameTextFieldWidthConstraint.constant)")
// Revert to only showing the tip while the user is typing.
self.delegate?.showTip()
......@@ -297,7 +299,7 @@ class SetupStepOneViewController: SetupStepViewController
{
// Success
let handleIsAvailable = response["handleIsAvailable"].boolValue
println("Retrieved response from Waystone. handleIsAvailable: \(handleIsAvailable)")
println("Retrieved response from Waystone. handleIsAvailable: \(handleIsAvailable) (\(self))\n")
// Save it in the current state
self.handleIsAvailable = handleIsAvailable
......
......@@ -49,8 +49,7 @@ class SetupStepTwoViewController: SetupStepViewController
override func persistData()
{
println("\(self): persisting data…")
println("ℹ️ Persisting profile data for Step Two of the Setup process. (\(self))\n")
// Persist data in the global SetupData struct.
SetupData.displayName = self.personNameTextField.stringValue
......@@ -119,10 +118,10 @@ class SetupStepTwoViewController: SetupStepViewController
//
override func done()
{
println("\(self): About to run done animations.")
// println("\(self): About to run done animations.")
animateFormWhenDoneEditing()
{
println("\(self): Done animation is complete. Calling done() on my delegate.")
// println("\(self): Done animation is complete. Calling done() on my delegate.")
self.delegate?.done()
}
}
......@@ -192,7 +191,8 @@ class SetupStepTwoViewController: SetupStepViewController
/* with */ notification in
self.personName = self.personNameTextField.stringValue
println("Updating person name to: \(self.personName)")
// println("Updating person name to: \(self.personName)")
// Save it in the Setup model
SetupData.displayName = self.personName
......@@ -205,7 +205,8 @@ class SetupStepTwoViewController: SetupStepViewController
/* with */ notification in
self.bio = self.bioTextField.stringValue
println("Updating bio to: \(self.bio)")
//println("Updating bio to: \(self.bio)")
// Save it in the Setup model
SetupData.bio = self.bio
......@@ -298,7 +299,8 @@ class SetupStepTwoViewController: SetupStepViewController
//
override func prepareForSegue(segue: NSStoryboardSegue, sender: AnyObject?)
{
println("\(self): Prepare for segue called on Step Two View Controller — embedding child view controllers…")
// println("\(self): Prepare for segue called on Step Two View Controller — embedding child view controllers…")
if let segueIdentifier = segue.identifier
{
switch(segueIdentifier)
......
......@@ -132,7 +132,7 @@ class SetupViewController: NSViewController, SetupDelegate
func createConstraints()
{
println("\(self) Creating constraints.")
// println("\(self) Creating constraints.")
view.removeConstraints(view.constraints)
......@@ -229,7 +229,7 @@ class SetupViewController: NSViewController, SetupDelegate
{
if let segueIdentifier = segue.identifier
{
println("\(self): Prepare for segue called on Step View Controller: \(segueIdentifier)")
// println("\(self): Prepare for segue called on Step View Controller: \(segueIdentifier)")
switch(segueIdentifier)
{
......@@ -241,7 +241,7 @@ class SetupViewController: NSViewController, SetupDelegate
// Ignore manual (non-embedded segue) used during the pre-release programme.
case "prereleaseMessage":
println("Pre-release message segue.")
// println("Pre-release message segue.")
break
default:
......@@ -258,7 +258,7 @@ class SetupViewController: NSViewController, SetupDelegate
@IBAction func done(sender:NSButton)
{
println("Done button pressed.")
// println("Done button pressed.")
self.currentViewController.done()
}
......@@ -508,7 +508,7 @@ class SetupViewController: NSViewController, SetupDelegate
func done()
{
println("\(self): done()")
// println("\(self): done()")
// Don’t execute if we’re in the middle of being forced into the Main interface transition for debugging.
if self.debugForceTransitionToMainInterface { return }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment