     private var inputImageIds: [Int]!
     private var inputImagesData = [PiwigoImageData]()
     private var totalNumberOfImages: Float = 0.0
+    private var selectedCategoryId = NSNotFound
 
     @objc func setInput(parameter:Any, for action:kPiwigoCategorySelectAction) {
         wantedAction = action

        } else {
            categoryData = categories[indexPath.row]
        }

        // What should we do with this selection?
        switch wantedAction {

                                     handler:((UIAlertAction) -> Void)? = nil) -> Void {
        let alert = UIAlertController(title: title, message: message, preferredStyle: .actionSheet)
        let cancelAction = UIAlertAction(title: NSLocalizedString("alertCancelButton", comment: "Cancel"),
                                         style: .cancel, handler: {_ in 
                                            // Forget the choice
                                            self.selectedCategoryId = NSNotFound
                                         })
        let performAction = UIAlertAction(title: NSLocalizedString("alertYesButton", comment: "Yes"), style: .default, handler:handler)
    
        // Add actions
