Hello all, I remarked that the package CollectionExtensions is missing in Pharo 2.0. We are using a useful method provided by the package on strings that provides character intervals for line numbers in a string. Here is the code from 1.4:
intervalOfLine: aLineNumber "Answer an interval spanning between the first and the last character of the line from aLineNumber"
| lineIndex | lineIndex := 0.
self lineIndicesDo: [ :start :endWithoutDelimiters :end | lineIndex := lineIndex + 1.
lineIndex = aLineNumber ifTrue: [ ^ start to: end ] ]. ^ 0 to: 0 Now, this method is missing in Pharo 2.0. Is there a particular reason for omitting the package? Is there a replacement for the pckage? tx, Usman
|
Hello,
CollectionExtensions is a package of Moose, it was never in Pharo. It has not been integrated because nobody yet cared to coordinate to integrate the CollectionExtensions into collections (those parts that are generally useful). Marcus On Nov 22, 2012, at 4:37 PM, Usman Bhatti <[hidden email]> wrote: > Hello all, > > I remarked that the package CollectionExtensions is missing in Pharo 2.0. We are using a useful method provided by the package on strings that provides character intervals for line numbers in a string. Here is the code from 1.4: > > intervalOfLine: aLineNumber > > "Answer an interval spanning between the first and the last character of the line from aLineNumber" > > | lineIndex | > lineIndex := 0. > self lineIndicesDo: [ :start :endWithoutDelimiters :end | > lineIndex := lineIndex + 1. > lineIndex = aLineNumber ifTrue: [ ^ start to: end ] ]. > ^ 0 to: 0 > > Now, this method is missing in Pharo 2.0. Is there a particular reason for omitting the package? Is there a replacement for the pckage? > > tx, > Usman -- Marcus Denker -- http://marcusdenker.de |
In reply to this post by Usman Bhatti
usman
we would love to get some of the nice collection extensions made in Moose. Now somebody has to push it to us. open a ticket and submit code and you will get it. Stef On Nov 22, 2012, at 4:37 PM, Usman Bhatti wrote: > Hello all, > > I remarked that the package CollectionExtensions is missing in Pharo 2.0. We are using a useful method provided by the package on strings that provides character intervals for line numbers in a string. Here is the code from 1.4: > > intervalOfLine: aLineNumber > > "Answer an interval spanning between the first and the last character of the line from aLineNumber" > > | lineIndex | > lineIndex := 0. > self lineIndicesDo: [ :start :endWithoutDelimiters :end | > lineIndex := lineIndex + 1. > lineIndex = aLineNumber ifTrue: [ ^ start to: end ] ]. > ^ 0 to: 0 > > Now, this method is missing in Pharo 2.0. Is there a particular reason for omitting the package? Is there a replacement for the pckage? > > tx, > Usman |
and you need to be fast, because as soon as we declare beta (next week), nothing else will be added :)
On Nov 23, 2012, at 7:03 PM, Stéphane Ducasse <[hidden email]> wrote: > usman > > we would love to get some of the nice collection extensions made in Moose. > Now somebody has to push it to us. > open a ticket and submit code and you will get it. > Stef > > On Nov 22, 2012, at 4:37 PM, Usman Bhatti wrote: > >> Hello all, >> >> I remarked that the package CollectionExtensions is missing in Pharo 2.0. We are using a useful method provided by the package on strings that provides character intervals for line numbers in a string. Here is the code from 1.4: >> >> intervalOfLine: aLineNumber >> >> "Answer an interval spanning between the first and the last character of the line from aLineNumber" >> >> | lineIndex | >> lineIndex := 0. >> self lineIndicesDo: [ :start :endWithoutDelimiters :end | >> lineIndex := lineIndex + 1. >> lineIndex = aLineNumber ifTrue: [ ^ start to: end ] ]. >> ^ 0 to: 0 >> >> Now, this method is missing in Pharo 2.0. Is there a particular reason for omitting the package? Is there a replacement for the pckage? >> >> tx, >> Usman > > |
Free forum by Nabble | Edit this page |