         filterDisclosableView.shown = filterShown
 
         // Then, since those may have resized the window, set the frame back to what we expect.
-        if let windowFrame = windowSettings[Self.windowFrameKey] as? String {
+        if let windowFrame = windowSettings[Self.windowFrameKey] as? NSWindow.PersistableFrameDescriptor {
             window?.setFrame(from: windowFrame)
         }
 
+        // TODO This scroll location doesn't seem to restore to exactly the right place
         if let scrollX = windowSettings[Self.messagesScrollPointX] as? NSNumber,
            let scrollY = windowSettings[Self.messagesScrollPointY] as? NSNumber {
             let scrollPoint = NSPoint(x: scrollX.doubleValue, y: scrollY.doubleValue)


    @IBAction func changeFilterFromMatrix(_ sender: AnyObject?) {
        let matrix = sender as! NSMatrix
        self.changeFilter(matrix.selectedCell())
    }

    @IBAction func setChannelRadioButton(_ sender: AnyObject?) {

    }

    private func refreshMessagesTableView() {
        displayedMessages = midiDocument.savedMessages() as! [SMMessage]

        // Scroll to the botton, iff the table view is already scrolled to the bottom.
        let isAtBottom = messagesTableView.bounds.maxY - messagesTableView.visibleRect.maxY < messagesTableView.rowHeight
