PackageInfo >> printOn:

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

PackageInfo >> printOn:

Mariano Martinez Peck
Hi. The current implementation of PackageInfo >> printOn:   is this:

printOn: aStream

    super printOn: aStream.
    aStream nextPutAll: '(',self packageName,')'.

So...it prints something like this: 'aPackageInfo(Collections-Weak)'

most of the times I prefer to print 'Collections-Weak'

in my image I change it to

printOn: aStream

    aStream nextPutAll: self packageName.

Do you think this can be useful for the rest or I just keep it in my image?

Cheers

Mariano

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: PackageInfo >> printOn:

Mariano Martinez Peck
Or maybe we can add

PackageInfo >> name
^ self packageName




On Tue, Aug 24, 2010 at 4:54 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi. The current implementation of PackageInfo >> printOn:   is this:

printOn: aStream

    super printOn: aStream.
    aStream nextPutAll: '(',self packageName,')'.

So...it prints something like this: 'aPackageInfo(Collections-Weak)'

most of the times I prefer to print 'Collections-Weak'

in my image I change it to

printOn: aStream

    aStream nextPutAll: self packageName.

Do you think this can be useful for the rest or I just keep it in my image?

Cheers

Mariano


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: PackageInfo >> printOn:

Stéphane Ducasse
may be { Collections-Weak } to make a displayed sign to denote packages.

Stef

> Or maybe we can add
>
> PackageInfo >> name
> ^ self packageName
>
>
>
>
> On Tue, Aug 24, 2010 at 4:54 PM, Mariano Martinez Peck <[hidden email]> wrote:
> Hi. The current implementation of PackageInfo >> printOn:   is this:
>
> printOn: aStream
>
>     super printOn: aStream.
>     aStream nextPutAll: '(',self packageName,')'.
>
> So...it prints something like this: 'aPackageInfo(Collections-Weak)'
>
> most of the times I prefer to print 'Collections-Weak'
>
> in my image I change it to
>
> printOn: aStream
>
>     aStream nextPutAll: self packageName.
>
> Do you think this can be useful for the rest or I just keep it in my image?
>
> Cheers
>
> Mariano
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: PackageInfo >> printOn:

Lukas Renggli
I would change it to

PackageInfo>>printOn: aStream
     aStream print: self class; nextPutAll: ' named: '; print: self packageName

That's basically the only solution that really makes sense.

Lukas

On 24 August 2010 22:50, Stéphane Ducasse <[hidden email]> wrote:

> may be { Collections-Weak } to make a displayed sign to denote packages.
>
> Stef
>
>> Or maybe we can add
>>
>> PackageInfo >> name
>> ^ self packageName
>>
>>
>>
>>
>> On Tue, Aug 24, 2010 at 4:54 PM, Mariano Martinez Peck <[hidden email]> wrote:
>> Hi. The current implementation of PackageInfo >> printOn:   is this:
>>
>> printOn: aStream
>>
>>     super printOn: aStream.
>>     aStream nextPutAll: '(',self packageName,')'.
>>
>> So...it prints something like this: 'aPackageInfo(Collections-Weak)'
>>
>> most of the times I prefer to print 'Collections-Weak'
>>
>> in my image I change it to
>>
>> printOn: aStream
>>
>>     aStream nextPutAll: self packageName.
>>
>> Do you think this can be useful for the rest or I just keep it in my image?
>>
>> Cheers
>>
>> Mariano
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: PackageInfo >> printOn:

Stéphane Ducasse
You remember when we tried to tag all senders and implementors result with a package (because I need this information
when trying to get throw the junggle) and I thought that the printOn: could remind such notation.
Now probably this solution is better/
Stef

> I would change it to
>
> PackageInfo>>printOn: aStream
>     aStream print: self class; nextPutAll: ' named: '; print: self packageName
>
> That's basically the only solution that really makes sense.
>
> Lukas
>
> On 24 August 2010 22:50, Stéphane Ducasse <[hidden email]> wrote:
>> may be { Collections-Weak } to make a displayed sign to denote packages.
>>
>> Stef
>>
>>> Or maybe we can add
>>>
>>> PackageInfo >> name
>>> ^ self packageName
>>>
>>>
>>>
>>>
>>> On Tue, Aug 24, 2010 at 4:54 PM, Mariano Martinez Peck <[hidden email]> wrote:
>>> Hi. The current implementation of PackageInfo >> printOn:   is this:
>>>
>>> printOn: aStream
>>>
>>>     super printOn: aStream.
>>>     aStream nextPutAll: '(',self packageName,')'.
>>>
>>> So...it prints something like this: 'aPackageInfo(Collections-Weak)'
>>>
>>> most of the times I prefer to print 'Collections-Weak'
>>>
>>> in my image I change it to
>>>
>>> printOn: aStream
>>>
>>>     aStream nextPutAll: self packageName.
>>>
>>> Do you think this can be useful for the rest or I just keep it in my image?
>>>
>>> Cheers
>>>
>>> Mariano
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project