Closed sakurawald closed 2 days ago
The documentation for message-event
says:
A simple event merely used to deliver message strings.
Whereas a payload-event
can deliver any type of object.
Typically you'll define event subclasses that define what values are valid and potentially also perform some kind of validation on them. If you want an unstructured approach, you could indeed use a payload-event
and just pass a plist as a payload or whatever.
The documentation for
message-event
says:A simple event merely used to deliver message strings.
Whereas a
payload-event
can deliver any type of object.Typically you'll define event subclasses that define what values are valid and potentially also perform some kind of validation on them. If you want an unstructured approach, you could indeed use a
payload-event
and just pass a plist as a payload or whatever.
Thank you~
Hello, i am using the library
deeds
, it's well degisned, and almost fit my need. However, i have some question that i still don't understand:Question 1: what is the difference between
message-event
andpayload-event
? Since there is notype
for aplace
in common lisp, the variable has no type, and only the data has type. So it seems that i can use themessage-event
to deliveryany type of data
that takes 1 slot.Question 2: Is there a convenient way to delivery
keyword arguments
conveninently? In other words, i would like something likeOr i have to
pack the keyword arguments
intoone structure
(maybealist
orplist
), and pass this structure as:payload
instead.