Question
DeletePreProcess and DeletePostProcess
I get the same ASSERT as the one described in the
InDesign CS3: Selecting Hyperlink text post, but I don't understand the answer that was given. (I'm not using hypertext links, though -- I want to be able to automatically delete all contiguous characters with a particular attribute.)
I know I shouldn't increase the range in the DeletePreProcess() call, but I don't inderstand how to "disable the pending command" or why I would want to. (I can disable the delete by setting the length to 0, but that prevents DeletePostProcess() from ever getting called.) I'm also not sure what it means to "schedule a command" as opposed to just executing one, but I can probably look that up somewhere.
What I want to do is delete a range of characters when someone deletes the first or last character in the range. (Users won't be able to delete any of the other characters because my selection observer selects the whole range when any character in the range is selected.)
It looks to me as though I have to determine the range to delete in DeletePreProcess() and schedule a command to delete them in DeletePostProcess(), but I don't know how to let the DeletePostProcess() know about the range, other than to save it in some static class, which seems pretty kludgy.
What's the recommended way of doing this?
Thanks.
Bob
I know I shouldn't increase the range in the DeletePreProcess() call, but I don't inderstand how to "disable the pending command" or why I would want to. (I can disable the delete by setting the length to 0, but that prevents DeletePostProcess() from ever getting called.) I'm also not sure what it means to "schedule a command" as opposed to just executing one, but I can probably look that up somewhere.
What I want to do is delete a range of characters when someone deletes the first or last character in the range. (Users won't be able to delete any of the other characters because my selection observer selects the whole range when any character in the range is selected.)
It looks to me as though I have to determine the range to delete in DeletePreProcess() and schedule a command to delete them in DeletePostProcess(), but I don't know how to let the DeletePostProcess() know about the range, other than to save it in some static class, which seems pretty kludgy.
What's the recommended way of doing this?
Thanks.
Bob