Smalltalk ui icons vs iconNamed: vs @
Hi, My understanding is that now instead of Smalltalk ui icons smallConfigurationIcon I should do Smalltalk ui iconNamed: #smallConfigurationIcon This is however really unpractical, because it changes the operator priority, so I have to wrap it in parentheses every single time. Button new icon: (... iconNamed: ...) How about we add '@' or another binary selector so we can avoid the parentheses? Peter
What about Symbol >>#asIcon ^ Smalltalk ui icons iconNamed: self Then one can do: "#add asIcon" ? Best regards, Henrik -----Original Message----- From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of Peter Uhnak Sent: Monday, May 30, 2016 4:34 PM To: Pharo Development List <pharo-dev@lists.pharo.org> Subject: [Pharo-dev] Smalltalk ui icons vs iconNamed: vs @ Hi, My understanding is that now instead of Smalltalk ui icons smallConfigurationIcon I should do Smalltalk ui iconNamed: #smallConfigurationIcon This is however really unpractical, because it changes the operator priority, so I have to wrap it in parentheses every single time. Button new icon: (... iconNamed: ...) How about we add '@' or another binary selector so we can avoid the parentheses? Peter
On Mon, May 30, 2016 at 02:47:03PM +0000, Henrik Nergaard wrote:
What about
Symbol >>#asIcon
^ Smalltalk ui icons iconNamed: self
Then one can do: "#add asIcon" ?
+1
Best regards, Henrik
-----Original Message----- From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of Peter Uhnak Sent: Monday, May 30, 2016 4:34 PM To: Pharo Development List <pharo-dev@lists.pharo.org> Subject: [Pharo-dev] Smalltalk ui icons vs iconNamed: vs @
Hi,
My understanding is that now instead of
Smalltalk ui icons smallConfigurationIcon
I should do
Smalltalk ui iconNamed: #smallConfigurationIcon
This is however really unpractical, because it changes the operator priority, so I have to wrap it in parentheses every single time.
Button new icon: (... iconNamed: ...)
How about we add '@' or another binary selector so we can avoid the parentheses?
Peter
Yes we were thinking about it too. Stef Le 30/5/16 à 15:47, Henrik Nergaard a écrit :
What about
Symbol >>#asIcon
^ Smalltalk ui icons iconNamed: self
Then one can do: "#add asIcon" ?
Best regards, Henrik
-----Original Message----- From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of Peter Uhnak Sent: Monday, May 30, 2016 4:34 PM To: Pharo Development List <pharo-dev@lists.pharo.org> Subject: [Pharo-dev] Smalltalk ui icons vs iconNamed: vs @
Hi,
My understanding is that now instead of
Smalltalk ui icons smallConfigurationIcon
I should do
Smalltalk ui iconNamed: #smallConfigurationIcon
This is however really unpractical, because it changes the operator priority, so I have to wrap it in parentheses every single time.
Button new icon: (... iconNamed: ...)
How about we add '@' or another binary selector so we can avoid the parentheses?
Peter
participants (3)
-
Henrik Nergaard -
Peter Uhnak -
stepharo