Created
July 12, 2014 14:43
-
-
Save moratori/7efd914aa8b2dba12f3d to your computer and use it in GitHub Desktop.
clim app2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package :cl-user) | |
(ql:quickload :clx) | |
(ql:quickload :mcclim) | |
(defpackage app | |
(:use :clim | |
:clim-lisp)) | |
(in-package :app) | |
(define-application-frame main-frame () | |
() | |
(:pointer-documentation t) | |
(:panes | |
(app :application :display-time nil :height 400 :width 600) | |
(int :interactor :height 200 :width 600)) | |
(:layouts | |
(default (vertically () app int)))) | |
(defun main () | |
(run-frame-top-level | |
(make-application-frame | |
'main-frame))) | |
(define-main-frame-command (com-quit :name t) () | |
(frame-exit *application-frame*)) | |
(define-main-frame-command (com-parity :name t) ((number 'integer)) | |
(format t "~A is a ~A~%" number | |
(if (oddp number) "odd" "even"))) | |
(main) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment