Caster icon indicating copy to clipboard operation
Caster copied to clipboard

"Record from history" doesn't work with Mimic action

Open chilimangoes opened this issue 7 years ago • 0 comments

As reported by @cajuncoder on Gitter, the "record from history" functionality does not seem to register commands that use the Mimic action. I was able to reproduce this by adding the following command to one of my grammars:

"(camo | camel) <textnv>":      R(Mimic("Gerrish","bow", extra="textnv"), rdescript="camelCase"),

If I say "tie gum bow this is a test", "ace", "camo this is a test", Caster correctly outputs the text "ThisIsATest thisIsATest". But then if I say "record from history", the record dialog comes up displaying only "tie gum bow this is a test" and "ace".

I did a bit of digging around in history.py, nexus.py and stack.py, but didn't see any obvious problems. I'm suspicious that it might have something to do with stack.py->CasterState.add(self, stack_item) and the fact that using Mimic results in another action being executed (possibly asynchronously, not sure). But admittedly, I didn't have time to do any real analysis or or troubleshooting of the add() method, and it wasn't obvious to me what the add() method is doing and why. For example, I'm not sure what all of the references to self.blocker, self.waiting, ContextStack.is_asynchronous, etc. are about.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

chilimangoes avatar Mar 08 '17 02:03 chilimangoes