Re: [Pharo-users] Object configuration idioms

2018-02-11 Thread Sven Van Caekenberghe
Why not directly on TwitterClient ? That would be easiest for the user, then they do not need to know about TwitterConfiguration. Anyway, that is how I do it most often. The disadvantage is that TwitterClient might become a bit heavy, API wise, but you can delegate internally. > On 11 Feb

[Pharo-users] Object configuration idioms

2018-02-11 Thread Peter Uhnák
Hi, are there any best practices/idioms in regards to object configuration/building? Let's say I want to configure a TwitterClient that requires a username and a password that is stored in a separate object TwitterConfiguration a) the basic approach (either separate sends or via cascade, that

Re: [Pharo-users] canonical way to convert Symbol into Class (retrieve class by its name)

2018-02-11 Thread Hernán Morales Durand
2018-02-11 16:55 GMT-03:00 Denis Kudriashov : > > > 2018-02-11 20:36 GMT+01:00 Hernán Morales Durand : >> >> 2018-02-11 16:10 GMT-03:00 Denis Kudriashov : >> > Hi Hernan. >> > >> > 2018-02-11 19:57 GMT+01:00 Hernán Morales

Re: [Pharo-users] canonical way to convert Symbol into Class (retrieve class by its name)

2018-02-11 Thread Richard Sargent
There are two use cases that come immediately to mind. They may be the two most important. "As a Compiler, I need to be able to resolve a Symbol to a known Object." "As a Browser, I need to be able to identify the possible resolutions of a String to known Objects." I can elaborate on those, but

Re: [Pharo-users] canonical way to convert Symbol into Class (retrieve class by its name)

2018-02-11 Thread Denis Kudriashov
Hi Hernan. 2018-02-11 19:57 GMT+01:00 Hernán Morales Durand : > Hi Denis > > 2018-02-10 15:18 GMT-03:00 Denis Kudriashov : > > > > 2018-02-10 20:59 GMT+03:00 Stephane Ducasse : > >> > >> Please to not use an unary on Symbol

Re: [Pharo-users] canonical way to convert Symbol into Class (retrieve class by its name)

2018-02-11 Thread Hernán Morales Durand
2018-02-11 16:10 GMT-03:00 Denis Kudriashov : > Hi Hernan. > > 2018-02-11 19:57 GMT+01:00 Hernán Morales Durand : >> >> Hi Denis >> >> 2018-02-10 15:18 GMT-03:00 Denis Kudriashov : >> > >> > 2018-02-10 20:59 GMT+03:00 Stephane

Re: [Pharo-users] canonical way to convert Symbol into Class (retrieve class by its name)

2018-02-11 Thread Stephane Ducasse
Denis we should introduce classNamed: now we can have traits and globals too :( Idea? may be can still classNamed: Stef On Sun, Feb 11, 2018 at 8:55 PM, Denis Kudriashov wrote: > > > 2018-02-11 20:36 GMT+01:00 Hernán Morales Durand : >> >>

Re: [Pharo-users] How to have an in-image map (morph/spec/brick) showing a gps location

2018-02-11 Thread Sven Van Caekenberghe
> On 11 Feb 2018, at 22:02, Richard Sargent > wrote: > > Beautiful, Sven! > > I have a publicity suggestion. Make a larger png of that and share it on > Twitter and LinkedIn. > (And if you do, I would also suggest cascading the message sends to the >

Re: [Pharo-users] Object configuration idioms

2018-02-11 Thread Christian Caldeiro
Maybe using directly TwitterClient, but using #doesNotUnderstand: to delegate there message sends to the configuration object(kind of a proxy pattern). That way the TwitterClient class doesn't became so heavy. Christian On Sun, Feb 11, 2018 at 1:35 PM, Sven Van Caekenberghe

Re: [Pharo-users] Object configuration idioms

2018-02-11 Thread Stephane Ducasse
Arghh no magic please. I got burned by too much DNU override. On Sun, Feb 11, 2018 at 8:17 PM, Christian Caldeiro wrote: > Maybe using directly TwitterClient, but using #doesNotUnderstand: to > delegate there message sends to the configuration object(kind of a

Re: [Pharo-users] canonical way to convert Symbol into Class (retrieve class by its name)

2018-02-11 Thread Denis Kudriashov
2018-02-11 20:36 GMT+01:00 Hernán Morales Durand : > 2018-02-11 16:10 GMT-03:00 Denis Kudriashov : > > Hi Hernan. > > > > 2018-02-11 19:57 GMT+01:00 Hernán Morales Durand < > hernan.mora...@gmail.com>: > >> > >> Hi Denis > >> > >> 2018-02-10 15:18

Re: [Pharo-users] canonical way to convert Symbol into Class (retrieve class by its name)

2018-02-11 Thread Denis Kudriashov
2018-02-11 21:08 GMT+01:00 Stephane Ducasse : > Denis > > we should introduce classNamed: now we can have traits and globals too :( > Yes, we need to think about it. > Idea? may be can still classNamed: > > Stef > > > On Sun, Feb 11, 2018 at 8:55 PM, Denis Kudriashov

Re: [Pharo-users] Object configuration idioms

2018-02-11 Thread Henrik-Nergaard
Hi Peter, I would just fill in the configuration and have it give me the correct client which uses the configuration instance. = | client | client := TwitterConfiguration new username: 'stuff'; password: 'password1'; port: '1234'; useHttps; client.