Supporting Cut Copy Paste
I'm designing a LispWorks application that needs to provide a window containing text-input-panes, and I want to support Cut, Copy, and Paste in those panes. I've got it to work by providing menus such as: (make-instance 'capi:menu-item :title "Cut" :accelerator #\x :callback-type :none :callback #'(lambda () (capi:text-input-pane-cut (find-focus- pane)))) where I've defined find-focus-pane as: (defun find-focus-pane () (capi:map-pane-descendant-children (first (capi:collect-interfaces 'capi:interface :sort-by :visible)) #'(lambda (p) (when (capi:pane-has-focus-p p) (return-from find-focus-pane p))))) Is this the correct way to do it? This seems quite a roundabout way of finding where the selection is, but I can't find any examples. Many thanks, David Johnson-Davies +------------------------------------------------------------+ David Johnson-Davies, Human-Computer Interface Ltd 17 Signet Court, Swanns Road, Cambridge, CB5 8LA, England. Tel: +44 1223 314934, Fax: +44 1223 462562 Email: david@interface.co.uk, Web: http://www.interface.co.uk/ +------------------------------------------------------------+