Re: [Pharo-users] difference between double dispatch and the method explains here

2019-04-07 Thread Roelof Wobben
Op 6-4-2019 om 15:15 schreef K K Subbu: On 06/04/19 4:49 PM, Roelof Wobben wrote: Hello, I just learned double dispatch. And now for the Robot challenge of exercism Tim has pointed me to this article(https://blog.metaobject.com/2019/04/accessors-have-message-obsession.html) but I fail to s

Re: [Pharo-users] Iceberg for files other than code?

2019-04-07 Thread Konrad Hinsen
Hi Christopher and Tim, Thanks for your comments! I agree that managing the README from Pharo is not the most important use case, I just mentioned it because everyone know what a README is. A better example of what I want to do is Pharo's Help system. It stores the individual pages as methods th

Re: [Pharo-users] Iceberg for files other than code?

2019-04-07 Thread Tim Mackinnon
Hi Konrad - I think you can do what you describe - I think the ICeRepository entry for your project will have the path you want. And yes, its the committing back non source files where iceberg doesn’t try to do anything (and so needs help from elsewhere). Tim > On 7 Apr 2019, at 16:40, Konrad

[Pharo-users] How to catch and handle multiple exceptions

2019-04-07 Thread Tim Mackinnon
Hi - I’m wondering what the best way for handling multiple exceptions is in Pharo? It seems like we just have on:do: (where on is a single exception?). However, I think I’ve noticed that you can concatenate exceptions - so DomainError, ZnHttpUnsuccessful - and then pass that to on: However, I’

Re: [Pharo-users] How to catch and handle multiple exceptions

2019-04-07 Thread Richard Sargent
On Sun, Apr 7, 2019, 12:13 Tim Mackinnon wrote: > Hi - I’m wondering what the best way for handling multiple exceptions is > in Pharo? > > It seems like we just have on:do: (where on is a single exception?). > > However, I think I’ve noticed that you can concatenate exceptions - so > DomainError,

Re: [Pharo-users] How to catch and handle multiple exceptions

2019-04-07 Thread Tim Mackinnon
Thanks, I guess that makes sense, although it somehow looks a bit ugly with the nested brackets.. but nothing else springs to mind so maybe I’ll get used to it (and In my case I think it’s likely 2 or 3 different exceptions) Tim Sent from my iPhone > On 7 Apr 2019, at 20:43, Richard Sargent

Re: [Pharo-users] How to catch and handle multiple exceptions

2019-04-07 Thread Stephan Eggermont
Tim Mackinnon wrote: > > Thanks, I guess that makes sense, although it somehow looks a bit ugly > with the nested brackets.. but nothing else springs to mind so maybe I’ll > get used to it (and In my case I think it’s likely 2 or 3 different > exceptions) I think I prefer them to be somehow ugl

Re: [Pharo-users] How to catch and handle multiple exceptions

2019-04-07 Thread Sean P. DeNigris
Tim Mackinnon wrote > nothing else springs to mind Double dispatch w extension methods on the Exception classes? - Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] How to catch and handle multiple exceptions

2019-04-07 Thread Sean P. DeNigris
Or I guess you don't even need dd here, just #handleMyErrorCase polymorphically - Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] How to catch and handle multiple exceptions

2019-04-07 Thread Richard O'Keefe
VisualAge Smalltalk has, in addition to the standard #on:do:, #when:do:, ..., #when:do:#when:do:#when:do:#when:do:#when:do:, with the last four mapping to #whenOneOf:doMatching:, taking two arrays. It's easy enough to add your own methods like on: exn1 do: act1 on: exn2 do: act2 "An imperfect

Re: [Pharo-users] difference between double dispatch and the method explains here

2019-04-07 Thread Richard O'Keefe
It would really REALLY **REALLY** help if we knew what the heck you were trying to do. There is an excellent chance that it is MUCH simpler than you think. If you cannot show us the Smalltalk version of the problem, can you show us the version for some other language? On Sun, 7 Apr 2019 at 20:1

Re: [Pharo-users] difference between double dispatch and the method explains here

2019-04-07 Thread Roelof Wobben
I can try to explain what I trying to solve. I have a Robot which can turn left,  turn right or moveForward. now I have a string like 'LAR' that means the robot needs to turn left (l) , move forward one place (A) and turn left.