Skip to content
#

smalltalk

Here are 669 public repositories matching this topic...

jecisc
jecisc commented Jun 6, 2019

Today I was doing a lot of changes on some variables in a deep hierarchy.

Current Pharo tools allow developers to find accesses to a variable in a class but not in a hierarchy so I had to make this snippet:

origin := AbstractWidgetPresenter.
variableName := #borderColor.
(origin slots detect: [ :e | e name = variableName ]) usingMethods collect: #methodClass as: Set
sophie-kaleba
sophie-kaleba commented Dec 19, 2019

(Same issue than in Newspeak, see https://groups.google.com/forum/#!msg/newspeaklanguage/PJeOLjxq_yA/ND3Jel_nAQAJ)

As per Newspeak spec, a call to a primary factory method should return a new instance of a given class. Sometimes it doesn't, as in:

class WhatDoesNewReturn = (
  true ifTrue: [ ^ nil ].
)()

where a call to WhatDoesNewReturn new will return nil instead of an i

Improve this page

Add a description, image, and links to the smalltalk topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the smalltalk topic, visit your repo's landing page and select "manage topics."

Learn more