     // ====================================
     private func selectSourceDirectory() {
         let openPanel = directoryOpenPanel("Select Source Directory")
-        openPanel.beginWithCompletionHandler( {(result:Int) in
-            if(result == NSFileHandlingPanelOKButton)
-            {
-                let fileURL = openPanel.URL!
-                print("path = \(fileURL.path!)")
-                
-                // Now we have a directory selected. Its URL = fileURL
-                self.sourceDirTextField.stringValue = "\(fileURL.path!)"
-                self.sourceDirStatusLabelColor = NSColor.blueColor()
+        
+        // TODO: remove beginWithCompletionHandler
+        if (openPanel.runModal() == NSFileHandlingPanelOKButton) {
+            let fileURL = openPanel.URL!
+                //print("path = \(fileURL.path!)")
+            self.sourceDirTextField.stringValue = "\(fileURL.path!)"
+                self.sourceDirStatusLabelColor = self.fieldValidityToColor( true )
                 self.setSourceDirStatusLabel("\(self.nrOfPdfFilesInFolder( fileURL )) pdf files found")
                 
-            }
-        })
+        }
+        
     }
     
     /// TODO

    }
    
    @IBAction func cancelButton(sender: AnyObject) {
    }
   
    @IBAction func arc42LabelButton(sender: AnyObject) {

    // (in versionLabel)
    let appName: String = "org.arc42.PdfStamper"
    var appVersionInfo: String = "-.-.-"

    
    var myModel: PdfStamperModel = PdfStamperModel.init()
  
    
    
    // MARK labels and textfields
