Calypso icon indicating copy to clipboard operation
Calypso copied to clipboard

Smalltalk ui icons should be banned!!!!

Open Ducasse opened this issue 6 years ago • 7 comments

Either use the one in Object or define one in the superclass and use self iconNamed:

I found that a bit insulting that I spent my time cleaning this from the system and that there are still 200 senders! And especially in new framework.

When do we behave like pro?

Ducasse avatar Nov 04 '18 14:11 Ducasse

You are right. Problem that after cleanup which we did I still don't know the right way and what right way we want achieve. I see in Pharo7 there is Object>>iconNamed:. Is it our goal?

There are two places with #icons:

  • ClyMainItemCellMorph>>#iconNamed:
  • ClyTestResultProperty>>#createIcon First can be removed. Last can use "self iconNamed:".

dionisiydk avatar Nov 04 '18 14:11 dionisiydk

I did not put Object>>iconNamed: my idea was to identify the roots where such method should be put and to turn it into a variable (all the logic behind Smalltalk ui is a big shit). Now duplicating Smalltalk ui icons everywhere is not a solution because we cannot think anymore about the solution.

Now I do not know how you count because senders of ui shows me a lot more sender in classes starting with Cly

Ducasse avatar Nov 04 '18 15:11 Ducasse

I count senders of #icons. And there are 6 places with "Smalltalk ui iconNamed:". Mostly they are icons for commands.

Other users of #ui are theme related methods

dionisiydk avatar Nov 04 '18 15:11 dionisiydk

I did not put Object>>iconNamed: my idea was to identify the roots where such method should be put and to turn it into a variable (all the logic behind Smalltalk ui is a big shit).

So we still didn't decide what is the right way. And it is a reason why we have all these users

dionisiydk avatar Nov 04 '18 15:11 dionisiydk

So let us do nothing like that we will be sure that nothing will happen.

Ducasse avatar Nov 04 '18 15:11 Ducasse

Stef, I did not say "let's do nothing". I say I don't know what to use instead. I assume "self iconNamed:" everywhere is not what you want. Then how to change it?

dionisiydk avatar Nov 04 '18 15:11 dionisiydk

My solution is

  • define iconNamed: only one in root of hierarchy (not Object)
  • remove all the other references to Smalltalk ui
  • step back and think. Before being that that stage I cannot think.

May be we should keep one call in such root May be we should use an instance variable (what about updating).

I do not know. But we should really remove Smalltalk ui. That I'm sure.

Ducasse avatar Nov 04 '18 15:11 Ducasse