asEnglishPlural, removeSuffix:, removePrefix: ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

asEnglishPlural, removeSuffix:, removePrefix: ?

abergel
Hi!

Apparently these method are used in Moose but are defined nowhere.

As a quick hack:
String compile: 'asEnglishPlural  ^ self'.
String compile: 'removePrefix: v   ^ (self beginsWith: v) ifTrue: [ self copyFrom: v size + 1 to: self size ] ifFalse: [ self ]'.
String compile: 'removeSuffix: v   ^ (self endsWith: v) ifTrue: [ self copyFrom: 1 to: (self size - v size)] ifFalse: [ self ]'.

Any idea what happened? Shall I open an issue?

Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: asEnglishPlural, removeSuffix:, removePrefix: ?

Tudor Girba-2
Hi,

Apparently, something is wrong with your image. These methods are present in the latest moose image and they are in the CollectionExtensions package.

Doru


On 6 Oct 2011, at 20:17, Alexandre Bergel wrote:

> Hi!
>
> Apparently these method are used in Moose but are defined nowhere.
>
> As a quick hack:
> String compile: 'asEnglishPlural  ^ self'.
> String compile: 'removePrefix: v   ^ (self beginsWith: v) ifTrue: [ self copyFrom: v size + 1 to: self size ] ifFalse: [ self ]'.
> String compile: 'removeSuffix: v   ^ (self endsWith: v) ifTrue: [ self copyFrom: 1 to: (self size - v size)] ifFalse: [ self ]'.
>
> Any idea what happened? Shall I open an issue?
>
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Don't give to get. Just give."






_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: asEnglishPlural, removeSuffix:, removePrefix: ?

abergel
Indeed. It is now in the last version.
Santiago and I both experienced this missing method on a two-days old image.

Thanks for checking.

Cheers,
Alexandre


On 6 Oct 2011, at 16:09, Tudor Girba wrote:

> Hi,
>
> Apparently, something is wrong with your image. These methods are present in the latest moose image and they are in the CollectionExtensions package.
>
> Doru
>
>
> On 6 Oct 2011, at 20:17, Alexandre Bergel wrote:
>
>> Hi!
>>
>> Apparently these method are used in Moose but are defined nowhere.
>>
>> As a quick hack:
>> String compile: 'asEnglishPlural  ^ self'.
>> String compile: 'removePrefix: v   ^ (self beginsWith: v) ifTrue: [ self copyFrom: v size + 1 to: self size ] ifFalse: [ self ]'.
>> String compile: 'removeSuffix: v   ^ (self endsWith: v) ifTrue: [ self copyFrom: 1 to: (self size - v size)] ifFalse: [ self ]'.
>>
>> Any idea what happened? Shall I open an issue?
>>
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Don't give to get. Just give."
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: asEnglishPlural, removeSuffix:, removePrefix: ?

abergel
The problem comes from that Mondrian depends on CollectionExtensions. Since we are experimenting with different version of Mondrian, old version of the extensions were loaded.

Subtil.

Alexandre


On 6 Oct 2011, at 16:35, Alexandre Bergel wrote:

> Indeed. It is now in the last version.
> Santiago and I both experienced this missing method on a two-days old image.
>
> Thanks for checking.
>
> Cheers,
> Alexandre
>
>
> On 6 Oct 2011, at 16:09, Tudor Girba wrote:
>
>> Hi,
>>
>> Apparently, something is wrong with your image. These methods are present in the latest moose image and they are in the CollectionExtensions package.
>>
>> Doru
>>
>>
>> On 6 Oct 2011, at 20:17, Alexandre Bergel wrote:
>>
>>> Hi!
>>>
>>> Apparently these method are used in Moose but are defined nowhere.
>>>
>>> As a quick hack:
>>> String compile: 'asEnglishPlural  ^ self'.
>>> String compile: 'removePrefix: v   ^ (self beginsWith: v) ifTrue: [ self copyFrom: v size + 1 to: self size ] ifFalse: [ self ]'.
>>> String compile: 'removeSuffix: v   ^ (self endsWith: v) ifTrue: [ self copyFrom: 1 to: (self size - v size)] ifFalse: [ self ]'.
>>>
>>> Any idea what happened? Shall I open an issue?
>>>
>>> Alexandre
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>>
>> "Don't give to get. Just give."
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev