Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

TransferItems hangs

Transfer Items seems to work Ok if there are a few lines.
When it gets to around 20 I am having a problem whereby it seems to hang.

Code below.
I added a Yield, in case it needed that.
Also added status line feed to see where it was.
Once it hung at line 1, once at line 14 of 18.

Any ideas on best practice for using this tool.
I will carry on checking in case there is something in the tree keys causing this.
DragItemList=SRP_Sort_Array(DragItemList,"AL1") DragLines=DCOUNT(DragItemList<1>,@VM) FOR I=1 TO DragLines .STATUS->TEXT=I:" of ":DragLines DragItemKey=DragItemList<1,I>:"z" CALL Send_Message(MasterTree,"OLE.TransferItems",DragItemKey,ProjectTree,1,0) CALL YIELD() .STATUS->TEXT=I:" of ":DragLines:" done" NEXT I


  • Colin,

    I'll let Kevin respond to why the performance is struggling after so many calls to the method, but unless you have a reason to NOT do this, I suggest just creating an @FM list of DragItemKeys and make a single call to the method after your For/Next loop.
  • Don is right that is better to just pass the list of item keys and make one call to TransferItems. Also, the Yield is unnecessary because the transfer animation is done in a separate thread.
  • Kevin

    I failed to read the help and note that it allows @FM delimited lists.
    Tried that and is seems to be much happier now.
Sign In or Register to comment.