Active Frame
The Self Test primitive actions all implicitly apply to the top-most (active) frame. That is, the MrEd frames form a stack and the actions always apply to the top of the stack.
Thread Issues
The code started by the primitive actions must run in the handler thread. As a result, the test suite that invokes the primitive actions must not run in the handler thread (or else some actions will deadlock). Normally this is not an issue, but the repl in the MrEd console runs in the handler thread. Thus, a test suite for MrEd (not DrScheme) must be run in a separate thread.
Window Manager
In order for the Self Tester to work correctly, the window manager must set the keyboard focus to follow the active frame. This is the default behavior in Microsoft Windows and MacOS, but not in X windows.
In X windows, you must explicitly tell your window manager to set the keyboard focus to the top-most frame, regardless of the position of the actual mouse. Some window managers may not implement such functionality. You can obtain such an effect in Fvwm and Fvwm95 by using the option:
Style "*" ClickToFocus