summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscrewlisp <screwtape@sdf.org>2026-07-02 23:19:05 +1200
committerscrewlisp <screwtape@sdf.org>2026-07-02 23:19:05 +1200
commit2e0110e9e99034f49a59d68af509ae3015184b7a (patch)
tree86a30d5fe0a3cb6633d09b956c7be1d2f57397df
parent4bbc0b00023cc8b7db24142febb8695838b78752 (diff)
just use package inferred.
-rw-r--r--better-eg.pngbin0 -> 119973 bytes
-rw-r--r--class.lisp27
-rw-r--r--frame.lisp19
-rw-r--r--packages.lisp0
-rw-r--r--simple-text-clim-frame.asd6
-rw-r--r--some.text7
6 files changed, 59 insertions, 0 deletions
diff --git a/better-eg.png b/better-eg.png
new file mode 100644
index 0000000..efd8344
--- /dev/null
+++ b/better-eg.png
Binary files differ
diff --git a/class.lisp b/class.lisp
new file mode 100644
index 0000000..ba68fcc
--- /dev/null
+++ b/class.lisp
@@ -0,0 +1,27 @@
+(uiop:define-package
+ :simple-text-clim-frame/class
+ (:export #:my-class #:my-display)
+ (:import-from :asdf))
+
+(in-package :simple-text-clim-frame/class)
+
+(defclass my-class ()
+ ((text-slot
+ :initform #.(format
+ nil
+ "~{~a~^~%~}"
+ (with-open-file
+ (in (merge-pathnames
+ #P"some.text"
+ (asdf:system-source-directory
+ "simple-text-clim-frame")))
+ (loop for line = (read-line in nil nil)
+ while line
+ collect line))))))
+
+(defmethod my-display ((obj my-class) stream)
+ (with-slots
+ (text-slot)
+ obj
+ (princ text-slot stream)))
+
diff --git a/frame.lisp b/frame.lisp
index e69de29..f8555e1 100644
--- a/frame.lisp
+++ b/frame.lisp
@@ -0,0 +1,19 @@
+(uiop:define-package
+ :simple-text-clim-frame/frame
+ (:export)
+ (:mix-reexport :simple-text-clim-frame/class)
+ (:mix :clim :clim-lisp))
+
+(in-package :simple-text-clim-frame/frame)
+
+(define-application-frame
+ my-frame
+ (my-class standard-application-frame)
+ ()
+ (:panes
+ (title :title :display-string "My title")
+ (app :application :display-function 'my-display))
+ (:layouts
+ (default
+ (vertically () title app))))
+
diff --git a/packages.lisp b/packages.lisp
deleted file mode 100644
index e69de29..0000000
--- a/packages.lisp
+++ /dev/null
diff --git a/simple-text-clim-frame.asd b/simple-text-clim-frame.asd
index e69de29..08afcb3 100644
--- a/simple-text-clim-frame.asd
+++ b/simple-text-clim-frame.asd
@@ -0,0 +1,6 @@
+(defsystem
+ simple-text-clim-frame
+ :class :package-inferred-system
+ :depends-on (:simple-text-clim-frame/frame)
+ :components
+ ((:static-file "some.text")))
diff --git a/some.text b/some.text
index e69de29..b5a8741 100644
--- a/some.text
+++ b/some.text
@@ -0,0 +1,7 @@
+this
+ is
+ some
+ text
+ ! ,,,,
+ checking commas work
+ is a lisp thing.