Re: [Pharo-users] Roassal2 in recent Pharo 7 causes DNU #asTraitComposition

2017-10-17 Thread Alistair Grant
On Tue, Oct 17, 2017 at 06:28:05AM +, Alistair Grant wrote: > Hi All, > > I'm attempting to load Roassal2 in to Pharo7 and am getting: > > UndefinedObject(Object)>>doesNotUnderstand: #asTraitComposition > > > It can be reproduced in a clean Pharo7 image, e.g. > Pharo7.0-32bit-d1b0e3e.image

[Pharo-users] Roassal2 in recent Pharo 7 causes DNU #asTraitComposition

2017-10-17 Thread Alistair Grant
Hi All, I'm attempting to load Roassal2 in to Pharo7 and am getting: UndefinedObject(Object)>>doesNotUnderstand: #asTraitComposition It can be reproduced in a clean Pharo7 image, e.g. Pharo7.0-32bit-d1b0e3e.image (downloaded 16 Oct 2017), and executing: Gofer it smalltalkhubUser:

Re: [Pharo-users] Roassal2 in recent Pharo 7 causes DNU #asTraitComposition

2017-10-17 Thread Alistair Grant
Hi Andrei, On Tue, Oct 17, 2017 at 01:58:22PM +0200, Andrei Chis wrote: > > > On Tue, Oct 17, 2017 at 1:04 PM, Alistair Grant wrote: > > On Tue, Oct 17, 2017 at 09:33:39AM +, Alistair Grant wrote: > > On Tue, Oct 17, 2017 at 06:28:05AM +, Alistair Grant

[Pharo-users] NeoJSONObject convenience method hint

2017-10-17 Thread Herby Vojčík
newFromAccessors: aCollection ofObject: anObject "Performs supplied accessors on anObject and returns my instance with accessor -> result pairs." ^ self newFrom: (aCollection collect: [ :each | each -> (anObject perform: each) ]) "I use it for example in this piece of code:

[Pharo-users] How do you mock http?

2017-10-17 Thread Herby Vojčík
Hello! I felt the need to mock http api (like nock in node, that is, mock http request-response itself on low-level part, leaving aside the question of what wrapper / library one uses to get to that http; in node it mocks basic http layer, here I tackled ZnClient), but struggled for a time

[Pharo-users] Mocketry willGenerateValueFrom: (was: Re: How do you mock http?)

2017-10-17 Thread Herby Vojčík
Herby Vojčík wrote: Hello! I felt the need to mock http api (like nock in node, that is, mock http request-response itself on low-level part, leaving aside the question of what wrapper / library one uses to get to that http; in node it mocks basic http layer, here I tackled ZnClient), but

Re: [Pharo-users] Roassal2 in recent Pharo 7 causes DNU #asTraitComposition

2017-10-17 Thread Andrei Chis
On Tue, Oct 17, 2017 at 1:04 PM, Alistair Grant wrote: > On Tue, Oct 17, 2017 at 09:33:39AM +, Alistair Grant wrote: > > On Tue, Oct 17, 2017 at 06:28:05AM +, Alistair Grant wrote: > > > Hi All, > > > > > > I'm attempting to load Roassal2 in to Pharo7 and am

Re: [Pharo-users] DesktopManaker from Ctrl-D to Ctrl-M help needed!!

2017-10-17 Thread Ricardo Pacheco
Actually, I see that Ctrl-M is also not a good choice, so I will try to figure out what key combinations are available!! -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] Roassal2 in recent Pharo 7 causes DNU #asTraitComposition

2017-10-17 Thread Alistair Grant
On Tue, Oct 17, 2017 at 09:33:39AM +, Alistair Grant wrote: > On Tue, Oct 17, 2017 at 06:28:05AM +, Alistair Grant wrote: > > Hi All, > > > > I'm attempting to load Roassal2 in to Pharo7 and am getting: > > > > UndefinedObject(Object)>>doesNotUnderstand: #asTraitComposition > > > > > >

Re: [Pharo-users] How do you mock http?

2017-10-17 Thread Herby Vojčík
Herby Vojčík wrote: Hello! I felt the need to mock http api (like nock in node, that is, mock http request-response itself on low-level part, leaving aside the question of what wrapper / library one uses to get to that http; in node it mocks basic http layer, here I tackled ZnClient), but

Re: [Pharo-users] DesktopManaker from Ctrl-D to Ctrl-M help needed!!

2017-10-17 Thread Alistair Grant
On Tue, Oct 17, 2017 at 02:21:42AM -0700, Ricardo Pacheco wrote: > > PD to the DesktopManager team: Your tool is really cool, thanks a lot; > nevertheless is not nice to hide the Do-It command > I don't use the DesktopManager, but remember seeing a reply some time ago that Do-It has been

Re: [Pharo-users] Mocketry willGenerateValueFrom: (was: Re: How do you mock http?)

2017-10-17 Thread Denis Kudriashov
Hi Herby. There is message #will: which accepts the block with possible arguments (if needed). ZnClient stub new will: [ ZnMockClient ...] But generally your approach looks bad to me. You put too many details on your tests which just duplicate Zinc API used in the domain code. It makes tests

Re: [Pharo-users] Mocketry willGenerateValueFrom: (was: Re: How do you mock http?)

2017-10-17 Thread Herby Vojčík
Denis Kudriashov wrote: Hi Herby. There is message #will: which accepts the block with possible arguments (if needed). ZnClient stub new will: [ ZnMockClient ...] But generally your approach looks bad to me. You put too many details on your tests which just duplicate Zinc API used in the

[Pharo-users] SpecColumnLayout not behaving as expected

2017-10-17 Thread Steven R. Baker
Heya folks, I'm sure I'm doing something wrong, I just don't know what it is. I have the following: defaultSpec     ^ SpecColumnLayout composed         newColumn: [ :col |             col                 add: #sideBar;                 add: #listView ];         yourself In the resulting window,

[Pharo-users] Techtalk today: AI

2017-10-17 Thread Marcus Denker
Hello! The tech talk starts in 20 minutes (17h europe time). Slides (pdf) can be downloaded here . Invite for Discord (for Q after): http://discord.gg/Sj2rhxn

Re: [Pharo-users] Mocketry willGenerateValueFrom: (was: Re: How do you mock http?)

2017-10-17 Thread Denis Kudriashov
2017-10-17 14:49 GMT+02:00 Herby Vojčík : > Denis Kudriashov wrote: > >> I would hide the tricks even more: >> >>ZnClient stubRequests: [ :request | >>request uri = >> ('https://onesignal.com/api/v1/players/{1}?app_id={2} >>

[Pharo-users] [ANN] Pharo Consortium New Bronze Member: OSOCO

2017-10-17 Thread Marcus Denker
The Pharo Consortium is very happy to announce that OSOCO has joined the Consortium as a Bronze Member. About - OSOCO: https://osoco.es - Pharo Consortium: http://consortium.pharo.org The goal of the Pharo Consortium is to allow companies and institutions to support the ongoing development and

Re: [Pharo-users] Mocketry willGenerateValueFrom: (was: Re: How do you mock http?)

2017-10-17 Thread Herby Vojčík
Denis Kudriashov wrote: I would hide the tricks even more: ZnClient stubRequests: [ :request | request uri = ('https://onesignal.com/api/v1/players/{1}?app_id={2} ' format: { self uidy: 'Q7'. appId }) asZnUrl and: [

[Pharo-users] [ANN] feenk upgraded to Gold Membership

2017-10-17 Thread Marcus Denker
The Pharo Consortium is very happy to announce that feenk has upgraded to Gold Member status. About - feenk: http://feenk.com - Pharo Consortium: http://consortium.pharo.org The goal of the Pharo Consortium is to allow companies and institutions to support the ongoing development and future of

Re: [Pharo-users] SpecColumnLayout not behaving as expected

2017-10-17 Thread Peter Uhnák
Because it is the other way around: in the block ([ :col | ... ]) you are describing the content of the column. So what you are actually doing is you create a Column (SpecColumnLayout), inside which you create another column (newColumn), and to that column you add two rows (add:, add:). On Tue,

Re: [Pharo-users] SpecColumnLayout not behaving as expected

2017-10-17 Thread Steven R. Baker
Oh! I remember fighting with this last week too. Am I the only who who struggled with that? If not, perhaps we could call #add: #addRow: ? -Steven On 17/10/17 18:00, Peter Uhnák wrote: > Because it is the other way around: in the block ([ :col | ... ]) you > are describing the content of the

Re: [Pharo-users] NeoJSONObject convenience method hint

2017-10-17 Thread Sven Van Caekenberghe
Hi, > On 17 Oct 2017, at 11:46, Herby Vojčík wrote: > > newFromAccessors: aCollection ofObject: anObject > "Performs supplied accessors on anObject > and returns my instance with accessor -> result pairs." > > ^ self newFrom: (aCollection collect: [ :each |

[Pharo-users] Pharo and instance variables ...

2017-10-17 Thread James Ladd
Hello Pharo Users, I'm wondering about instance variables for support in Redline Smalltalk and want to get my understanding straight. Are instance variables only accessible (without using #instVarNamed:) inside the method with the same name as the instance variable? eg: myInstVar ^

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread James Ladd
Please could you provide an example? On Wed, Oct 18, 2017 at 2:16 PM, David Mason wrote: > Any instance method in the class where the instance variable is defined or > in a subclass can access the instance variable. Similarly for class > methods to access class-side

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread David Mason
Any instance method in the class where the instance variable is defined or in a subclass can access the instance variable. Similarly for class methods to access class-side variables, and for class and instance methods to access class variables. On 17 October 2017 at 23:04, James Ladd

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread David Mason
In Pharo, open a browser on OrderedCollection, then click "Variables" in the top left of the window and then "array"... if you scroll through you can see that mostly OrderedCollection methods use it, but some SortedCollection (a subclass) methods also use it. The model is similar to protected in

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread James Ladd
Ah that is very helpful - thank you. addFirst: newObject "Add newObject to the beginning of the receiver. Answer newObject." firstIndex = 1 ifTrue: [self makeRoomAtFirst]. firstIndex := firstIndex - 1. *array* at: firstIndex put: newObject. ^ newObject On Wed, Oct 18, 2017 at 2:41 PM, David

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread James Ladd
Hey David, If you could only access instance variables in the class that defined them and therefore only in a subclass via an accessor / mutator method w that be a big problem in your view? Sent from my Commodore 64 > On 18 Oct 2017, at 2:41 pm, David Mason wrote: > > In

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread Clément Bera
On Wed, Oct 18, 2017 at 7:07 AM, James Ladd wrote: > Hey David, > > If you could only access instance variables in the class that defined them > and therefore only in a subclass via an accessor / mutator method w that be > a big problem in your view? > Yes. I don't want

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread James Ladd
What if accessors were generated but not mutators? Sent from my Commodore 64 > On 18 Oct 2017, at 4:21 pm, Clément Bera wrote: > > > >> On Wed, Oct 18, 2017 at 7:07 AM, James Ladd wrote: >> Hey David, >> >> If you could only access instance

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread Markus Stumptner
It would break code all over the place... On 18/10/2017 16:02, James Ladd wrote: What if accessors were generated but not mutators? Sent from my Commodore 64 On 18 Oct 2017, at 4:21 pm, Clément Bera > wrote: On Wed, Oct 18, 2017 at

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread Prof. Andrew P. Black
> On 18 Oct 2017, at 08:32 , James Ladd wrote: > > What if accessors were generated but not mutators? > The point is that, once a method exists, there is not way to restrict who can send a message that will execute it. So if one were forces to generate a reader

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread James Ladd
Good point thanks Sent from my Commodore 64 > On 18 Oct 2017, at 4:34 pm, Markus Stumptner wrote: > > It would break code all over the place... > >> On 18/10/2017 16:02, James Ladd wrote: >> What if accessors were generated but not mutators? >> >> Sent from my

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread James Ladd
Good point - thank you Sent from my Commodore 64 > On 18 Oct 2017, at 4:36 pm, Prof. Andrew P. Black wrote: > > >> On 18 Oct 2017, at 08:32 , James Ladd wrote: >> >> What if accessors were generated but not mutators? >> > > The point is that, once