[Pharo-users] metacolli and magritte-bootstrap

2020-09-13 Thread Roelof Wobben via Pharo-users
Hello, Does anyone know how to install magritte-bootstrap web with metacolli, I tried this : Metacello new     repository: 'github://magritte-metamodel/bootstrap-magritte/source';     baseline: 'Magritte';     load. but I get a message that the baseline could not be found. Regards, Roelof

[Pharo-users] Fwd: Re: How can I make this more OOP

2020-09-13 Thread Roelof Wobben via Pharo-users
Doorgestuurd bericht Onderwerp: Re: [Pharo-users] How can I make this more OOP Datum: Sun, 13 Sep 2020 16:43:59 +0200

Re: [Pharo-users] How can I make this more OOP

2020-09-13 Thread Noury Bouraqadi
Hi Roelof, Polymorphism is the answer. Object >> flattenInto: result result nextPut: anObject UndefinedObject >> flattenInto: result ^self Collection >> flattenInto: result self do: [ :item | item flattenInto: result ] flatten: anObject ^ (OrderedCollection streamCo

[Pharo-users] How can I make this more OOP

2020-09-13 Thread Roelof Wobben via Pharo-users
Hello, I know that OOP is not asking a object what it is but I have to flatten a array so I did this : flattenArray: aCollection     ^ (OrderedCollection         streamContents: [ :stream | self flatten: aCollection into: stream ])         asArray