On Thu, Jan 25, 2018 at 10:13:56PM +0100, Bert Freudenberg wrote:
On 25 January 2018 at 19:48, tim Rowledge tim@rowledge.org wrote:
On 25-01-2018, at 7:56 AM, commits@source.squeak.org wrote:
Simplify project dispatch selector detection. No hard-coded list. Almost
as good.
Maybe I missed something about why this slightly odd abstraction was needed, but what is inadequate about simply having implementations of #startUpWithCaption:icon:at:allowKeyboard: in each project related class? How are these cases so different to the usages of UIManager et al. that we need yet another mechanism?
???This is code from before we had Project subclasses.
Actually, it is more recent (circa 2010) and you can blame me for it.
This was work that I did in early 2010 on package modularity to make MVC be a fully unloadable/reloadable package.
The dispatch mechanism was added here:
Name: System-dtl.241 Author: dtl Time: 30 January 2010, 10:00:40.376 pm UUID: 4d4d420e-4618-4fe6-ab0f-c63a28bb622f Ancestors: System-dtl.240
Add Project>>dispatchTo:addPrefixAndSend:withArguments: Allow classes with MVC and Morphic dependencies to dispatch through Project current to invoke appropriate methods. Prevents accumulation of unrelated implementations in Project.
And the end result was this:
Name: System-dtl.255 Author: dtl Time: 15 February 2010, 10:37:15.416 pm UUID: b70348f2-a094-4adc-80fa-696552b171f0 Ancestors: System-dtl.254
Update SystemDictionary>>discardMVC to perform complete MVC removal. MVC may be reinstalled by loading packages ST80 and ToolBuilder-MVC.
I am very pleased with the reloadable MVC capability, and I would like to do the same for Morphic. I am not so happy about my dispatching hack, so if someone can propose a better alternative, please do so. I am /sure/ there must be a better way to do this :-)
Dave