set-content: transparent update of content field of actor:message
This commit is contained in:
parent
e0877cc20f
commit
5872c25129
1 changed files with 6 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
||||||
(:shape :scopes/shape)
|
(:shape :scopes/shape)
|
||||||
(:util :scopes/util))
|
(:util :scopes/util))
|
||||||
(:export #:start #:stop #:create #:send
|
(:export #:start #:stop #:create #:send
|
||||||
#:message #:content #:customer
|
#:message #:content #:customer #:set-content
|
||||||
#:*logger* #:*root*
|
#:*logger* #:*root*
|
||||||
#:echo #:inc #:lgi
|
#:echo #:inc #:lgi
|
||||||
#:calculator #:plus #:minus #:show #:send-value))
|
#:calculator #:plus #:minus #:show #:send-value))
|
||||||
|
@ -31,6 +31,11 @@
|
||||||
(defun message (content &optional customer)
|
(defun message (content &optional customer)
|
||||||
(make-instance 'message :content content :customer customer))
|
(make-instance 'message :content content :customer customer))
|
||||||
|
|
||||||
|
(defgeneric set-content (msg fn)
|
||||||
|
(:method (msg fn) (funcall fn msg))
|
||||||
|
(:method ((msg message) fn)
|
||||||
|
(message (funcall fn (content msg)) (customer msg))))
|
||||||
|
|
||||||
;;;; actor loop (listener)
|
;;;; actor loop (listener)
|
||||||
|
|
||||||
(eval-when (:compile-toplevel :load-toplevel :execute)
|
(eval-when (:compile-toplevel :load-toplevel :execute)
|
||||||
|
|
Loading…
Add table
Reference in a new issue