Here is a sentence from Chapter Seventeen of Huckleberry Finn. The sentence appears in a grammar worksheet:
When I got to the three log doorsteps I heard them unlocking and unbarring and unbolting.
My English teacher stated that "them" was an indirect object, and unlocking and unbolting was a direct object, as that is what was being directly heard. She states that indirect objects can answer the questions "by whom", referring to the direct object. (The doing could be done by the indirect object.) This doesn't really make sense to me. My first impression was that them was the direct object and the participles unlocking and unbolting were modifying them. So, can an indirect object in a sense do the action of a gerund direct object? Any help is welcome!