In that case it should be either

self iconNamed: #smallBackIcon
or
#smallBackIcon asIcon

that is ��� to avoid directly asking global singletons. This is similar to Theme, where one should not always ask Smalltalk ui theme, but instead have a single reference to it and ask "self theme".

As for which one of the two would be better in this situation, I don't know.
In general I would prefer the latter, but if there was a Spec-way added, then it should be used ��� it would make it easier to switch icons just for Spec in the future if such need would arise.

Also thanks for all the Spec fixes, this is really important!

Peter

On Mon, Jul 18, 2016 at 2:12 PM, Marion Noirbent <ms.noirbent@etudiant.univ-lille1.fr> wrote:
Hi,

In the issue 18742 add class to manage focusorder, Peter Uhn��k says:

"
The idiomatic way of creating icons should be either
#smallBackIcon asIcon (ideally)

or the long-form
(Smalltalk ui icons iconNamed: #smallBackIcon)
"


But there is a third way, ComposableModel defines iconNamed: like that

ComposableModel>>iconNamed: aSymbol
�� ^ Smalltalk ui icons iconNamed: aSymbol

So it is possible to use self iconNamed: #smallBackIcon

So my question is: what way is really ideal ?