Closed GoogleCodeExporter closed 8 years ago
simpler test case:
(execute-in-gui
#'(lambda ()
(print "1")
(warn "2")
(print "3")))
should print "1" ... warn "2" ... "3" but will only print "1" and stop with
error at warn
Original comment by alex.rep...@gmail.com
on 13 May 2010 at 3:10
See http://trac.clozure.com/ccl/ticket/682
Original comment by GailZach...@gmail.com
on 13 May 2010 at 4:14
While the *objc-error-return-condition* fix does work for the two examples
above it does not for the more importance case of calling a lisp function
including a warning
from a objective-c function called from a control.
;; right version
Welcome to Clozure Common Lisp Version 1.6-dev-r13737M-trunk (DarwinX8632)!
;; changing from warning to error
(setq ccl::*objc-error-return-condition* 'error)
(objc:defmethod (#/invokeLispFunction: :void) ((self ns:ns-application) id)
(gui::invoke-lisp-function self id))
;; now this works:
(in-package :gui)
#<Package "GUI">
? (execute-in-gui
#'(lambda ()
(print "1")
(warn "2")
(print "3")))
"3"
But Currency Converter with a warning does not. Prints "1" then dies with
error. Sometimes (CCL64) no output from error/warning
(in-package :easygui-demo)
(defclass converter-window (window)
()
(:default-initargs :size (point 383 175)
:position (point 125 513)
:title "Currency Converter"
:resizable-p nil
:minimizable-p t))
(defmethod initialize-view :after ((cw converter-window))
(let ((currency-form (make-instance 'form-view
:autosize-cells-p t
:interline-spacing 9.0
:position (point 15 70)
:size (point 353 90)))
(convert-button (make-instance 'push-button-view
:default-button-p t
:text "Convert"
:position (point 247 15)))
(line (make-instance 'box-view
:position (point 15 59)
:size (point 353 2))))
(setf (action convert-button)
#'(lambda ()
(print "1")
(warn "2")
(print "3") ))
(setf (editable-p (car (last (add-entries currency-form
"Exchange Rate per $1:"
"Dollars to Convert:"
"Amount in other Currency:"))))
nil)
(add-subviews cw currency-form line convert-button)
(window-show cw)))
;(make-instance 'converter-window)
Original comment by alex.rep...@gmail.com
on 25 May 2010 at 2:36
ps. we are reloading views.lisp before loading the example. More importantly,
we are loading all of our code for
our examples from scratch after (setq ccl::*objc-error-return-condition* 'error)
Original comment by alex.rep...@gmail.com
on 25 May 2010 at 3:01
It works for me if I also recompile easygui from scratch.
Original comment by GailZach...@gmail.com
on 31 May 2010 at 3:40
Original comment by alex.rep...@gmail.com
on 2 Sep 2011 at 5:02
Original issue reported on code.google.com by
alex.rep...@gmail.com
on 13 May 2010 at 2:40