7 Replies Latest reply on Jun 22, 2009 6:54 AM by Applied CD

    baCopyFileProgress with callback not working with D11.5?

    Applied CD Level 1

      I did a project last year using D10 & Buddy API 3.76 with baCopyFileProgress (callback handler enabled) and everything worked. I’ve done other projects since using D11.5, Buddy API 3.76 and baCopyFile (no callback) and everything worked. Now I’m updating last year’s project with the callback and it locks up (the callback is never called) both with D11.5 + Buddy API 3.76 and D11.5 + Buddy API 4.05 (demo). It locks up even if I just recompile last year's project with D11.5. I’m in the process of ordering the upgrade to Buddy API but the demo xtra isn’t working, I have my doubts registering is gonna fix it. Anyone else having trouble (or not) with D11.5 + Buddy API + baCopyFileProgress?

        • 1. Re: baCopyFileProgress with callback not working with D11.5?
          Applied CD Level 1

          Update:


          Registering Buddy API doesn’t fix the problem


          The callback does not work on any of the copy functions that should support the callback (ie: baCopyFileProgress, baCopyXFilesProgress, baXCopyProgress)


          Disabling the callback (ie, changing the copyflag from 24 to 8) allows the copy to work but of course I lose the functionality of the callback


          Enabling callback by size (copyFlag 88) doesn't help

           

          Curious:


          Bug fixes for 4.05 included fixing the system copy animation and help files that won’t open on XP. I’ve got version 4.05 but the help files still won’t open on XP and I’d bet the system copy animation and progress callbacks are related. I’m hoping this is really the old version and somehow version 4.05 never got placed on the site.

          • 2. Re: baCopyFileProgress with callback not working with D11.5?
            Chunick Level 3
            Bug fixes for 4.05 included fixing the system copy animation and help files that won’t open on XP. I’ve got version 4.05 but the help files still won’t open on XP and I’d bet the system copy animation and progress callbacks are related. I’m hoping this is really the old version and somehow version 4.05 never got placed on the site.

            I sounds like that's the case, doesn't it... well, I'd definitely get in contact with the buddyAPI creator to get more info.

            • 3. Re: baCopyFileProgress with callback not working with D11.5?
              Sean_Wilson Adobe Community Professional

              I just tried BudAPI version 4.0.5.0 and D11.5.0.596 on WinXP SP3 and can confirm that the callback handler doesn't seem to be being called (regardless of whether the CP_SIZEUPDATE 64 flag is included), and although a file is created at the destination it's size doesn't progress beyond 0KB

              • 4. Re: baCopyFileProgress with callback not working with D11.5?
                Applied CD Level 1

                Thanks Sean,

                 

                I’ve sent an email to Gary at Magic Modules but since he’s on Australian time I don’t expect an answer until tomorrow. I’ll post information as I get it.

                • 5. Re: baCopyFileProgress with callback not working with D11.5?
                  Sean_Wilson Adobe Community Professional

                  the help files still won’t open on XP and I’d bet the system copy animation and progress callbacks are related.

                  The help files don't open because I think the Director development team changed some mechanism internally and neglected to tell anyone. I don't think this is related at all to the callback function not being called or the copying not working when it's enabled.

                   

                  FWIW: in order to open the Help file, I place the xtra and its help file in the same directory (\Adobe Director 11\Configuration\Xtras\Scripting\Buddy API\) and add a Director file to the same folder with the following code in it:

                  on prepareMovie
                    tPath = _player.activeWindow.filename
                    tDelim = the itemDelimiter
                    the itemDelimiter = the last char of the moviePath
                    delete the last item of tPath
                    tPath = tPath & the itemDelimiter
                    the itemDelimiter = tDelim
                    OK = baOpenFile(tPath & "Buddy API Help.chm", "maximised")
                    --  put "exists:", baFileExists(tPath & "Buddy API Help.chm"), RETURN, tPath & "Buddy API Help.chm"
                    _player.activeWindow.forget()
                  end
                  

                  This file has a single sprite channel, is 1x1 pixels with no titlebar visible. I save it as "Buddy API Help" and I now have an entry under Xtras -> Buddy API -> Buddy API Help

                  1 person found this helpful
                  • 6. Re: baCopyFileProgress with callback not working with D11.5?
                    Applied CD Level 1

                    Thanks for the tip. About the callback and help, yeah I don’t think they’re related, I was just suspicious that if at least two items on the “fixed” list weren’t fixed I could be hopeful that the problem was something simple like packaging the old components instead of the new ones.

                    • 7. Re: baCopyFileProgress with callback not working with D11.5?
                      Applied CD Level 1

                      Here’s the response from the author of Buddy API. I’ve tested Buddy API 4.06 under the restriction noted below (ie: the no_dialog flag must be used when using callback) and it works. It looks like 4.05 is still on his site but I’m sure Gary will provide 4.06 shortly.

                       

                      Hello Bob, it’s looking like it is a problem in 11.5. what I do is have two threads, one handling the dialog box and the other the copying. It looks like the calling a function from a background thread is broken in 11.5. If that is the case, then the best we can hope for is a Hotfix from Adobe sometime in the future. But seeing typically, people using the callback handler don’t want the dialog box, I’m going today to look into doing the copying in that case in a single thread, hopefully that will mean the callbacks will  work correctly.

                       

                      Hello Bob, I’ve made some changes to the function, can you test it out and let me know how you get on. Note that if you specify the callback handler flag, you also cannot also show the dialog box, its one or the other at the moment.