[squeak-dev] The Inbox: Tools-ct.1101.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Jan 10 12:18:34 UTC 2022


Hi Chris,


I am not sure whether we can (or should) make the default inspector proxy-safe. Rather, IMHO the default inspectors should handle proxies transparently and display the underlying object. For inspecting the implementation details of proxies, we have the BasicInspector, which is almost completely proxy-safe (the only exception I am aware of is a send to #isReadOnlyObject for the window label, for which we currently do not have a mirror primitive).


> #size is a provoking message.


And #printString, #longPrintString, #perform:, #instVarNamed:, #basicSize, and all others existing sends are not? :-)


> Magma's Proxy's anyway (which don't use the mirror-primitives but the old-school Proxy pattern)


Just out of interest, how would you implement a proxy using mirror primitives? :-)


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Chris Muller <asqueaker at gmail.com>
Gesendet: Montag, 10. Januar 2022 02:34:00
An: squeak dev
Betreff: Re: [squeak-dev] The Inbox: Tools-ct.1101.mcz

Hi Christoph,

I like the "Inspector" tools to be as rudimentary as possible so they can be used with Proxy's better.  At least with Magma's Proxy's anyway (which don't use the mirror-primitives but the old-school Proxy pattern), when I have an instance of MyProxy I'm able to inspect it without sending any provoking messages.  #size is a provoking message.

Explorers and other more snappy tools, on the other hand, already have no chance to use with Proxys, so might be good to see there.

 - Chris

On Mon, Jan 3, 2022 at 4:16 PM <commits at source.squeak.org<mailto:commits at source.squeak.org>> wrote:
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-ct.1101.mcz

==================== Summary ====================

Name: Tools-ct.1101
Author: ct
Time: 3 January 2022, 11:16:09.863397 pm
UUID: 97ded064-e941-f744-ac9b-642118fe8ef5
Ancestors: Tools-ct.1100

Proposal: Display the size of a collection in the window label.

=============== Diff against Tools-ct.1100 ===============

Item was added:
+ ----- Method: CollectionInspector>>labelString (in category 'user interface - window') -----
+ labelString
+
+       ^ '{1} ({2})' translated format: {super labelString. [self object size] ifError: ['?']}!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220110/dab75699/attachment.html>


More information about the Squeak-dev mailing list