<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div>Hi All,<div><br></div><div>FYI, I use the technique of overriding DNU to create generic behaviors extensively in the Siren music package.</div><div>The base class of events has a property list (Dictionary), and overrides single-arg DNU as setters and no-arg DNU as getters. i.e., if the class Event has a dictionary called properties (lazily instantiated, of course), then</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">    </span>anEvent color: red<span class="Apple-tab-span" style="white-space:pre">          </span>becomes<span class="Apple-tab-span" style="white-space:pre">     </span> <span class="Apple-tab-span" style="white-space:pre">      </span>anEvent properties at #color put: red</div><div><br></div><div>and</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre"> </span>anEvent color<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space: pre;">          </span>becomes<span class="Apple-tab-span" style="white-space:pre">     </span> <span class="Apple-tab-span" style="white-space: pre;">    </span>anEvent properties at #color ifAbsent: [nil]</div><div><br></div><div><br></div><div>stp</div><div><br></div><div>
<meta charset="UTF-8"><br class="Apple-interchange-newline" style="font-family: "Times New Roman"; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 16px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: HelveticaNeue; font-size: 12px; float: none; display: inline !important;">--------</span><br style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: HelveticaNeue; font-size: 12px;"><br style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: HelveticaNeue; font-size: 12px;"><span style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: HelveticaNeue; font-size: 12px; float: none; display: inline !important;">Stephen Travis Pope    Ojai,</span><span style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: HelveticaNeue; font-size: 12px; float: none; display: inline !important;"> </span><span style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: HelveticaNeue; font-size: 12px; float: none; display: inline !important;">California, USA</span><br style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: HelveticaNeue; font-size: 12px;"><span style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: HelveticaNeue; font-size: 12px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">    </span><span style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: HelveticaNeue; font-size: 12px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"></span><span style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: HelveticaNeue; font-size: 12px;"></span><span style="font-family: "Times New Roman"; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 16px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"></span><span style="font-family: "Times New Roman"; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-size: 16px;"></span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"></span><span><img alt="pastedGraphic.tiff" src="cid:55B397C7-3D20-4E60-A051-4564245235A7@sd.cox.net"></span><meta charset="UTF-8"><font face="HelveticaNeue" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 16px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style="font-style: normal; font-size: 12px;"><br>     http://HeavenEverywhere.com</span></font><div style="font-family: "Times New Roman"; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 16px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><font face="HelveticaNeue" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="font-style: normal; font-size: 12px;">     http://FASTLabInc.com</span></font></div><div style="font-family: "Times New Roman"; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 16px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><font face="HelveticaNeue" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="font-style: normal; font-size: 12px;">     https://vimeo.com/user19434036/videos</span></font></div><div style="font-family: "Times New Roman"; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 16px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><font face="HelveticaNeue" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="font-style: normal; font-size: 12px;">     </span></font><span style="font-size: 12px; font-family: HelveticaNeue;">http://heaveneverywhere.com/Reflections</span></div><div style="font-family: "Times New Roman"; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 16px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><font face="HelveticaNeue" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="font-style: normal; font-size: 12px;"><br></span></font><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"></div>
</div>
<div><br><blockquote type="cite"><div>On Jun 10, 2024, at 11:16 AM, Mark Volkmann via Cuis-dev <cuis-dev@lists.cuis.st> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: TimesNewRomanPSMT; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div dir="ltr">On Mon, Jun 10, 2024 at 11:01 AM <<a href="mailto:ken.dickey@whidbey.com">ken.dickey@whidbey.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">On 2024-06-10 07:42, Mark Volkmann via Cuis-dev wrote:<br><br>> I'm learning about overriding the `doesNotUnderstand` method in a class<span class="Apple-converted-space"> </span><br>> to support processing somewhat arbitrary messages. But the Smalltalk<span class="Apple-converted-space"> </span><br>> editor is perhaps being too helpful. It doesn't want to let me send an<span class="Apple-converted-space"> </span><br>> "unknown selector". So it's not clear to me how I can send a message<span class="Apple-converted-space"> </span><br>> that will trigger my implementation of the `doesNotUnderstand` method.<span class="Apple-converted-space"> </span><br>> Is there a way I can do this?<br><br>When you save the method, you can just `confirm` this selector is what<span class="Apple-converted-space"> </span><br>you want.<br><br>It is useful to have unknown selectors, BTW to "debug code into<span class="Apple-converted-space"> </span><br>existence".  Just keep running the code and write code for the selectors<span class="Apple-converted-space"> </span><br>as they come up as missing into the debugger.<br><br>Use of #doesNotUnderstand is frequently the wrong thing to do.<br></blockquote><div><br></div><div dir="ltr">Thanks Ken! I was finally able to get my demo code working. A fileOut is attached.</div><div dir="ltr"><br><div>I see how the thing I implemented is not really a good idea. I was just trying to learn how `doesNotUnderstand` works.</div><div>I have a class method `demo` that demonstrates using my `Map` class with the following:</div><div><br></div><div><font face="monospace">map := Map new.<br>map firstName: 'Mark'.<br>map firstName print</font><br></div><div><br></div><div>The `Map` class has an instance variable that holds a `Dictionary`. Sending messages to a `Map` instance accessed the `Dictionary`. This lets me specify `Dictionary` keys with arbitrary messages. But an issue I discovered is that this breaks if the message name matches an existing method like `name`. I know I should just stick with sending `:at` and `:at:put` to a `Dictionary`. This was just a learning exercise.</div></div></div><div><br></div><span class="gmail_signature_prefix">--<span class="Apple-converted-space"> </span></span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">R. Mark Volkmann</font></div><div><span style="font-size: 12.8px;"><font face="arial, helvetica, sans-serif">Object Computing, Inc.</font></span></div></div></div></div></div></div></div></div></div><span id="cid:f_lx9af0sq0"><Map.st></span><span style="caret-color: rgb(0, 0, 0); font-family: TimesNewRomanPSMT; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">--<span class="Apple-converted-space"> </span></span><br style="caret-color: rgb(0, 0, 0); font-family: TimesNewRomanPSMT; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: TimesNewRomanPSMT; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">Cuis-dev mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: TimesNewRomanPSMT; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><a href="mailto:Cuis-dev@lists.cuis.st" style="font-family: TimesNewRomanPSMT; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Cuis-dev@lists.cuis.st</a><br style="caret-color: rgb(0, 0, 0); font-family: TimesNewRomanPSMT; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" style="font-family: TimesNewRomanPSMT; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">https://lists.cuis.st/mailman/listinfo/cuis-dev</a></div></blockquote></div><br></div></body></html>