[Openmcl-devel] How do I move the cursor in a window under program control?

Ron Garret ron at flownet.com
Fri Oct 17 15:31:42 PDT 2014


It’s a bit hackish, but this seems to do the trick:

(easygui::running-on-main-thread ()
  (hi::handle-hemlock-event
   (gui::front-view-for-buffer (gui::hemlock-buffer (GUI::TOP-LISTENER-DOCUMENT)))
   #k"end”))

Thanks, Gail!

On Oct 17, 2014, at 1:24 PM, Ron Garret <ron at flownet.com> wrote:

> 
> On Oct 17, 2014, at 12:35 PM, Gail Zacharias <gz at clozure.com> wrote:
> 
>> Yeah, the thing is that the buffer-selection-info gets secretly switched in and out of the buffer by Cocoa code  (that's what I meant about it being a back-door kludge, and that's why I suggested grepping for references - to find where it gets fiddled with).
> 
> Yeah, I did that, but it turns out I was looking in the wrong branch (I was in v1.8) so I didn’t find any.  Sorry about that.  I will follow that lead.
> 
>> Alternatively, try doing whatever you're doing inside hi::handle-hemlock-event (pass a function as the second argument).  That should insure that whatever weirdness we do around hemlock events also gets done around your code.  Just running on the main thread is not enough context for doing editor things, at least not any more.
> 
> OK, I’ll try that too.  Thanks!
> 
> rg
> 
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list