3 Replies Latest reply on Jun 26, 2015 7:36 AM by johnrellis

    Overriding the function progressScope:cancel()

    chetant60011991

      Hi,

      I am trying to override the progressScope:cancel() function such that when the user clicks on x while  an image is getting exported/published, a confirmation dialog box is thrown asking the user if he really wants to cancel. if he clicks on ok it would make progressScope:IsCanceled() to be true. Otherwise, I want it to remain false only.

       

      function progressScope:cancel()

             local response = LrDialogs.confirm("Do you want to cancel upload ?","Click Yes to cancel the rest of the upload. Else click No","Yes, cancel upload","No, don't Cancel")

             if(response == "ok") then

                  progressScope:isCanceled() = true

             else

                  progressScope:isCanceled() = false

             end

        end

      end

       

      This code dosen't seem to help as it gets cancelled anyways.