CAPI best practice question
This question is really for those of you who have been programming CAPI for a while... I have a very common occurrence in my code where I'll have a pretty generic action I want to perform on the "backend" of my application. Completely contrived example incoming... (defun delete-thing (pane) ...) Now, let's say I want to call delete-thing whenever the object is double clicked. So, I subclass the pane and add that functionality... (defclass my-pane (output-pane) () (:default-initargs :input-model '(((:button :second-press) delete-thing)))) But, now I have a problem. The input-model callback will also pass along the x and y coordinates of where the click took place. But, other places in code will want to call delete-thing as well. I've been toying with two different solutions: * Add &optional x y parameters to the delete-thing function. * Have :input-model call a different function, which in-turn calls delete-thing. But work fine, but I'm wondering if - as my projects grow - is one going to be considerably better long-term? Is there another solution that I'm not seeing? Jeff M. _______________________________________________ Lisp Hug - the mailing list for LispWorks users lisp-hug@lispworks.com http://www.lispworks.com/support/lisp-hug.html