[CM] How to make new applicable objects that use generic set/get?

Iain Duncan iainduncanlists at gmail.com
Wed Jul 29 12:58:35 PDT 2020


Hi S7 Schemers, I'm hoping someone can help out, or point me at some
beginner friendly resources as I'm not able to figure this out from the
S7.html page. I am making a state management container for my max apps. I'd
like to make it follow the generic applicable syntax so that one can call
it as if it's a hashtable, allowing code using this to be unaware of
implementation. So I want to implement a setter and getter for my function
to be able to do:

;; call my setter
(set! (my-state-thing :foobar) 99)

;; call my setter
(my-state-thing :foobar)

I apologize if this is just basic scheme ignorance!
thanks
iain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20200729/304958ba/attachment.html>


More information about the Cmdist mailing list