Re: [Pharo-users] how do I send the 2 messsages to the function

2018-11-25 Thread Roelof Wobben
Thanks, I made a file out with all the code I have right now. The code can be found here :  https://gist.github.com/RoelofWobben/00829deff93e98523f5090383a656582 But still I cannot make it work. What I did is make a class SantaFloorAct

Re: [Pharo-users] how do I send the 2 messsages to the function

2018-11-25 Thread Roelof Wobben
Op 25-11-2018 om 19:12 schreef dorellang: What you want to do is: findBasement: input2 "solution to part1 of this challenge" input2 withIndexDo: [ :element :index | |action| action:= SantaFloorAction getActionFor: element. floor := action calculateNewFloor: floor index: index ].

Re: [Pharo-users] how do I send the 2 messsages to the function

2018-11-25 Thread Nicole de Graaf
Hi Roelof, is not easy to understand the question , without contents. #calculateNewFloor:index: - I assume you implemented the method on an action class (SantaAction). - In the method I see no usage from argument index but to send the method with a index: aFoor := aAction calculateNewFloor: a

Re: [Pharo-users] how do I send the 2 messsages to the function

2018-11-25 Thread dorellang
What you want to do is: findBasement: input2 "solution to part1 of this challenge" input2 withIndexDo: [ :element :index | |action| action:= SantaFloorAction getActionFor: element. floor := action calculateNewFloor: floor index: index ]. ^ counter Notice how I added the '