Re: [Pharo-users] how to get out of this mess

2019-03-25 Thread Roelof Wobben
I try to understand the way the streams works here. but as far as I can see the collection is a array. I tried to convert it with  aCollection readStream. But then I see a error on the nextline Anyone a hint  how I can ma

Re: [Pharo-users] how to get out of this mess

2019-03-25 Thread Roelof Wobben
and Ricard , I forgot to thank you for the explantion and the code. Roelof Op 25-3-2019 om 08:40 schreef Roelof Wobben: Sorry. Is this more the OOP way. https://github.com/RoelofWobb

Re: [Pharo-users] how to get out of this mess

2019-03-25 Thread Roelof Wobben
Sorry. Is this more the OOP way. https://github.com/RoelofWobben/Tournament-/tree/master/Exercism-Tournament Roelof Op 25-3-2019 om 07:39 schreef Richard O'Keefe: In OOP, you should

Re: [Pharo-users] how to get out of this mess

2019-03-24 Thread Richard O'Keefe
In OOP, you should not be thinking in terms of "updating a record". You should *ask* an object to update *itself*. [aStream atEnd] whileFalse: [ |fields team1 team2 outcome| fields := aStream nextLine subStrings: ';'. team1 := self teamNamed: (fields at: 1). t

Re: [Pharo-users] how to get out of this mess

2019-03-24 Thread Roelof Wobben
Thanks all @Richard  I did tried that way in the solution I put on the net. But I get stuck at the point that if I update a record in the Team Class the collection at the Tournament class was not updated. But right now , I try a new w

Re: [Pharo-users] how to get out of this mess

2019-03-24 Thread Richard O'Keefe
This is a simple programming-contest sort of exercise. You "need" only two classes. + a Team - knows its name (a String of at most 30 characters) * This should be passed when the Team is created; the rest of the program should NOT call (Team new) and should NEVER see an un#initial

Re: [Pharo-users] how to get out of this mess

2019-03-24 Thread Benoit St-Jean via Pharo-users
--- Begin Message --- Hi Roelof, I probably missed your prior posts but I do have a few questions and/or comments for you before I can be of any help! This code is for tournaments of what sport exactly?  Hockey teams?  Baseball teams?  Or tournaments between players (such as in chess where

Re: [Pharo-users] how to get out of this mess

2019-03-24 Thread Roelof Wobben
hello, I think I have to reconsider my classes and reponsibilities Right now Im thinking of this Team :  responsinble for team properties Ranking : reponsibilities  for checking if a team is in the ranking and updating the team statics Tournament :  parsing the ganes and call the right functi

[Pharo-users] how to get out of this mess

2019-03-24 Thread Roelof Wobben
Hello, I tried another way to solve this but the code is a mess now. I can update a record but the record is not updated. And I have to do a lot of the same steps for every team. Anyone who can help me to get out of this mess. Code so far:  https://github.com/RoelofWobben/tournament Roelof