Re: [Pharo-users] Code of Conduct

2019-09-11 Thread Peter Kenny
I see no problem with having *a* code of conduct, but there are some worrying aspects of *this* code. Clearly there is a need for generality in any code, but the vagueness of the drafting seems to me to open it up to all sorts of mischief. Consider the paragraph:" *Project maintainers have the righ

Re: [Pharo-users] Set >> collect:thenDo:

2019-09-08 Thread Peter Kenny
t is exactly the same. It will be the same as long as the original collection has no duplicates. Somehow the effect is to ignore the asSet. It just smells wrong. Peter Kenny Kasper Osterbye wrote > The first version: > > (#(1 2 3) asSet collect: #odd) > do: [ :each | Transcript sho

Re: [Pharo-users] "whenSelectedItemChanged:" in Spec

2019-07-17 Thread Peter Kenny
ection-is-changed > when actually it is only called once (by your application) to register > the block-to-be-called when the-selection-is-changed. > You don't seem to have done any such registration. > > cheers -ben Essentially ben is right. The method WidgetClassList >> when SelectedItemChanged: should just relay the message to the component ListPresenter, in the instvar list, which will carry out the registration as he describes. The problem is that this method seems to have been replaced by a debugging method, which simply displays a progress message on the Transcript. I think all you need is to enter the correct code for this method as shown in the 'Spec UI Framework' booklet: WidgetClassList >> whenSelectedItemChanged: aBlock list whenSelectedItemChanged: aBlock This is at least worth a try. You will be sticking to the code as shown in the booklet. HTH Peter Kenny -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] Easiest way to wrap around the indexed value in a list (mod doesn't quite work)

2019-03-30 Thread Peter Kenny
potter so we get all >> of this stuff in one easy place (I think its pretty simple, just haven’t >> had a chance to try it yet). >> >> Tim >> >>> On 30 Mar 2019, at 09:26, Peter Kenny < > peter@.co > > wrote: >>> >>> Ben >>

Re: [Pharo-users] Easiest way to wrap around the indexed value in a list (mod doesn't quite work)

2019-03-30 Thread Peter Kenny
wrote > On Sat, 30 Mar 2019 at 01:09, Peter Kenny < > peter@.co > > wrote: > >> Tim >> >> Going back to your original question, the answer is there all the time >> but >> buried in the enormous method dictionaries of the Collection subclasses. >

Re: [Pharo-users] Easiest way to wrap around the indexed value in a list (mod doesn't quite work)

2019-03-29 Thread Peter Kenny
ce, you end up with a negative index. This works equally well (I checked!), but it is not obvious that it must, because it is not obvious that \\ has to be positive - I have encountered systems with a different convention. HTH Peter Kenny Tim Mackinnon wrote > Peter - nice spot. I’m gla

Re: [Pharo-users] Easiest way to wrap around the indexed value in a list (mod doesn't quite work)

2019-03-29 Thread Peter Kenny
Tim Going back to your original question, the answer is there all the time but buried in the enormous method dictionaries of the Collection subclasses. If you look at SequenceableCollection>>atWrap: you will see that it does exactly what you want. To get the item before the first, i.e. the zeroth

Re: [Pharo-users] Easiest way to wrap around the indexed value in a list (mod doesn't quite work)

2019-03-29 Thread Peter Kenny
uch. > > Tim > >> On 29 Mar 2019, at 10:20, Peter Kenny < > peter@.co > > wrote: >> > >> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html >> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html>; -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] Easiest way to wrap around the indexed value in a list (mod doesn't quite work)

2019-03-29 Thread Peter Kenny
se it regards links as separate from the linked objects, it got too complicated. But it could give a starting point if you have lots of such cases. HTH Peter Kenny Tim Mackinnon wrote > Hey thanks guys - while it certainly makes sense when you think about it, > I was kind of hoping we had som

Re: [Pharo-users] Easiest way to wrap around the indexed value in a list (mod doesn't quite work)

2019-03-28 Thread Peter Kenny
step with wrapping is exactly equivalent to moving forward (size - 1) steps - because of wrapping, a move of size steps is null. Finally, substitute move = size - 1. ^list at: (index + size - 2 \\ size + 1. This can of course easily generalize to backward moves of any size. HTH Peter Kenny --

Re: [Pharo-users] Problem with input to XML Parser - 'Invalid UTF8 encoding'

2017-10-09 Thread Peter Kenny
Correction - I am misrepresenting Sven. What he said was that Zinc would not look inside the HTML node to find out about coding. It would of course use information in the HTTP headers, if any. Peter Kenny wrote > Henry > > Thanks for the explanations. It's a bit clearer now. I&#x

Re: [Pharo-users] Problem with input to XML Parser - 'Invalid UTF8 encoding'

2017-10-09 Thread Peter Kenny
Henry Thanks for the explanations. It's a bit clearer now. I'm still not sure about how ZnUrl>>retrieveContents manages to decode correctly in this case; I'm sure I recall Sven saying it didn't (and in his view shouldn't) look at the HTTP declarations in the header. There is also the mystery of ho

Re: [Pharo-users] Problem with input to XML Parser - 'Invalid UTF8 encoding'

2017-10-09 Thread Peter Kenny
Note: This was sent on Sunday at 19.45 but seems to have disappeared on its way to pharo users. Re-sent just to complete the story. _ Paul Good to have found the charset discrepancy - that may have something to do with it. But I don't think it ha

Re: [Pharo-users] final version of pharo syntax cheat page

2016-04-18 Thread Peter Kenny
ps "then not" or "and then not" would be clearer. Peter Kenny -- View this message in context: http://forum.world.st/final-version-of-pharo-syntax-cheat-page-tp4890508p4890674.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.