[squeak-dev] The Trunk: Tools-mt.1055.mcz

commits at source.squeak.org commits at source.squeak.org
Thu May 6 17:11:12 UTC 2021


Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1055.mcz

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

Name: Tools-mt.1055
Author: mt
Time: 6 May 2021, 7:11:08.881981 pm
UUID: 9b30ecaa-fce5-b44c-af74-25a25f1eb5f8
Ancestors: Tools-mt.1054

Adds a new hook to Inspector and ObjectExplorer. Objects-under-inspection/exploration can intervene when the tool window is about to close.

Yes, this is a hook for "FFI-Tools" where I want to inform the user about external memory/address and ask whether to free it. :-)

Other possible uses include notifications for the last instance of a server (e.g. socket) or other resource. Everywhere where the GC might bite you because you loose your last precious reference with unwanted side-effects.

=============== Diff against Tools-mt.1054 ===============

Item was added:
+ ----- Method: BasicInspector>>objectOkToClose (in category 'user interface - window') -----
+ objectOkToClose
+ 	"No extra interaction with the object in the basic inspector:"
+ 	
+ 	^ true!

Item was added:
+ ----- Method: Inspector>>objectOkToClose (in category 'user interface - window') -----
+ objectOkToClose
+ 
+ 	^ (self object respondsTo: #inspectorOkToClose)
+ 		==> [(self object perform: #inspectorOkToClose) == true]!

Item was changed:
  ----- Method: Inspector>>okToClose (in category 'user interface - window') -----
  okToClose
+ 	"Check custom fields and give the object-under-inspection a chance to react. Maybe this explorer is an important reference to the object and the user needs to be informed about this fact."
  
+ 	^ super okToClose
+ 		and: [self okToDiscardCustomFields
+ 		and: [self objectOkToClose]]!
- 	^ super okToClose and: [self okToDiscardCustomFields]!

Item was added:
+ ----- Method: ObjectExplorer>>okToClose (in category 'user interface') -----
+ okToClose
+ 	"Give the object-under-exploration a chance to react. Maybe this explorer is an important reference to the object and the user needs to be informed about this fact."
+ 	
+ 	^ super okToClose
+ 		and: [(self rootObject respondsTo: #explorerOkToClose)
+ 			==> [(self rootObject perform: #explorerOkToClose) == true]]!



More information about the Squeak-dev mailing list