ThreadWithProgressWindow's setThreadFunction is failing

Home Forums General Programming ThreadWithProgressWindow's setThreadFunction is failing

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29421
    synth
    Participant
      • Topics: 13
      • Replies: 35
      • Total: 48

      Hi,

      threadWithProgress = ThreadWithProgressWindow("Do work",											true, false, 0, "")
      			if threadWithProgress ~= nil then
      				threadWithProgress:setStatusMessage("Writing ")
      				threadWithProgress:setProgress(0)
      				threadWithProgress:setThreadFunction(threadWriteMethod())
      				threadWithProgress:runThread()
      			end

      Following is error it is throwing when I do above

      At line [-1]: [C]
      What: C
      Namewhat: method
      Name: setThreadFunction
      Error message: No matching overload found, candidates:
      void setThreadFunction(ThreadWithProgressWindow&,luabind::object const&).
      Method disabled

      Please suggest. What shall be done ?

      #29424
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        you shouldn’t do “theWriteMethod()” but “theWriteMethod” i think, you are not passing a function as a parameter but the result of calling theWriteMethod

        #29452
        synth
        Participant
          • Topics: 13
          • Replies: 35
          • Total: 48

          Thanks Atom,

          It works well. I am bit newbie for Lua, Hope to catch up soon with it as well.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The forum ‘Programming’ is closed to new topics and replies.
        There is currently 0 users and 143 guests online
        No users are currently active
        Forum Statistics
        Threads: 2,495, Posts: 17,374, Members: 77,605
        Most users ever online was 12 on January 22, 2019 3:47 pm
        Ctrlr