Currently, the only explanation for the block being no longer valid is that the currently edited part has changed in between both calls.
As the part is assigned to 2 editors, you can try to waitForIdle for both editors, and see if in this latter case you are still getting invalid block at the second NSLog.
Best regards,
Olivier
J
Just GoNXaS
said
over 2 years ago
Answer
Thanks Oliver. Though the problem may not be the invalid block. Is this what I should be doing to copy a block from one Text Document to another one?
J
Just GoNXaS
said
over 2 years ago
Hey Oliver.
I just figured it out, thanks for your help!
O
Olivier @MyScript
said
over 2 years ago
Dear Gonzalo,
thank you for the update, we are glad issue is solved!
Just GoNXaS
Hey guys!
I'm having some problems trying to copy a block from one text document, and then pasting it into a different text document.
This is the code I'm using, in this case self.editor already has an active part, which is working fine with text recognition and other kind of bloks.
The first nslog prints 1, while the second one (after the part is changed) is already 0. Nevertheless didPaste is true at the end of the execution
Any hints?
Thanks!
Thanks Oliver. Though the problem may not be the invalid block. Is this what I should be doing to copy a block from one Text Document to another one?
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstOlivier @MyScript
Dear Gonzalo,
thank you for your question.
Currently, the only explanation for the block being no longer valid is that the currently edited part has changed in between both calls.
As the part is assigned to 2 editors, you can try to waitForIdle for both editors, and see if in this latter case you are still getting invalid block at the second NSLog.
Best regards,
Olivier
Just GoNXaS
Thanks Oliver. Though the problem may not be the invalid block. Is this what I should be doing to copy a block from one Text Document to another one?
Just GoNXaS
Hey Oliver.
I just figured it out, thanks for your help!
Olivier @MyScript
Dear Gonzalo,
thank you for the update, we are glad issue is solved!
Best regards,
Olivier