[Newbies] AbstractObjectsAsMethod
Marcel Taeumel
marcel.taeumel at hpi.de
Tue Mar 16 08:24:34 UTC 2021
Hi David, hi all!
For using object-as-method, you do not need to inherit from #AbstractObjectsAsMethod. Just install an object into a class' method dictionary that implements #run:with:in:.
Method Wrappers do this:
https://github.com/hpi-swa/MethodWrappers
Here is an example for installing such objects-as-methods:
https://github.com/hpi-swa/MethodWrappers/blob/master/packages/MethodWrappers.package/MwMethodWrapper.class/instance/install.st
It uses Behavior >> #addSelectorSilently:withMethod: to modify the class' method dictionary.
Best,
Marcel
Am 15.03.2021 20:06:33 schrieb stes at PANDORA.BE <stes at telenet.be>:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
When I select the method run:with:in: of the class
(AbstractObjectsAsMethods subclass) ObjectsAsMethodsExample :
and then I click in the menu on "Implementors of it" (m), I find:
Implementors of run:with:in:
ObjectsAsMethodsExample run:with:in: {as yet unclassified}
TestCoverage run:with:in: {evaluation}
WrappedBreakpoint run:with:in: {evaluation}
So I suspect the classes "TestCoverage" and "WrappedBreakpoint"
somehow also implement run:with:in
Perhaps TestCoverage in the category SUnitGUI is a reason why the feature is
there.
David Stes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJgT7ABAAoJEAwpOKXMq1MaJ4gIAK2xW25G4ScKyagy6C2XUzEj
bySA/MPqvZlvFqHixn+Z1/VeIOAJYamojV0Y8S3mymc0ACRHrunMAwCrsVqgQpBV
yPAadkHY41J2vZT1hrhJOHuRHHF35yGWSGHVir3ucFzamfBQluUWIhh5NPK+BBrK
kk//j91v8aci5bLWR4GVWmoaOytI78/3EAESKvvkT4e7+CVz4gRjsX6kfKQY3l3J
301GhMtdb905jqxoe97U4lBRyY2ZDkwpqHPNgrWwnE6SydbhIHDZeJ+qadZYmlr4
dbFsjs5m90vtl2P4+ut6frGUC6URmaKOte+NrWGJ8SaHhv385kQTW+tucZNVHCI=
=VrXK
-----END PGP SIGNATURE-----
_______________________________________________
Beginners mailing list
Beginners at lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/beginners/attachments/20210316/88e335b5/attachment.html>
More information about the Beginners
mailing list