Skip to content

Instantly share code, notes, and snippets.

View eMaringolo's full-sized avatar

Esteban A. Maringolo eMaringolo

View GitHub Profile
@eMaringolo
eMaringolo / wrongSlotScope.st
Created April 27, 2014 13:53
All the layout of some classes is wrong, due to some ancient bug. The bug fix has been integrated but all the classes that have been modified in-between may have this problem. To fix that you have to force the rebuild of these classes (by adding then removing a dummy inst var for ex).
ivName := 'anIVNameImPrettySureNobodyUses'.
all := Smalltalk allClasses flatCollect: [ :e | { e . e class } ].
candidates := all reject: [ :e | e superclass isNil or: [e layout slotScope isKindOf: LayoutEmptyScope ] ].
toRebuild := candidates reject: [ :e | e superclass layout slotScope == e layout slotScope parentScope ].
toRebuild do: [ :e | e addInstVarNamed: ivName ].
toRebuild do: [ :e |
(e isClassSide
mkdir marina
cd marina
wget "https://ci.inria.fr/pharo-contribution/job/marina/PHARO=30,VERSION=development,VM=vm/lastSuccessfulBuild/artifact/Marina.zip"
wget -O- get.pharo.org/vm | bash
git clone https://github.com/tide-framework/marina.git
cd marina
git submodule init
git submodule update
bower install
cd tide
renderChartOn: html
| graphId graph |
graphId := html nextId.
html div class: 'chart'; id: graphId.
graph := Rickshaw graph element: graphId.
graph width: 300.
graph height: 200.
graph addSerieNamed: 'Demo' color: 'steelblue' elements: { 0 @ 40. 1 @ 49. 2 @ 38. 3 @ 30. 4 @ 32 }.
html document addLoadScript: graph