The Dolphin solution to this type of problem is to define #species that answers 
the collection type to use when copying - then the super class method has a 
much easier time answering a collection of the expected type.

Bill


-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Henrik 
Johansen
Sent: Monday, October 05, 2009 7:00 AM
To: [email protected]
Subject: [Pharo-project] Copy for SequenceableCollection subclasses? (Was: Fix 
for 987)

Somewhat related, at least I noticed it when debugging this:

Sending copy to a LinkedList or a Semaphore will give back an array, since it 
uses shallowCopy from SequenceableCollection.
Probably applies to more of SequenceableCollection's subclasses too, f.ex. 
DirectoryEntry for which copy leads to an MNU.

Another side-effect of strange class-hierarchy, I guess :)

Not quite sure how/if you want to implement those differently.

Submitted to tracker as Issue1272.

Cheers,
Henry


On Oct 5, 2009, at 1:12 38PM, Stéphane Ducasse wrote:

> Thanks we will integrate that as soon as we can breath :)
>
> On Oct 5, 2009, at 12:14 PM, Henrik Johansen wrote:
>
>> Updated Issue987 with a SLICE in Inbox, which "fixes" the DNU in the 
>> way below.
>> Used printString instead of asString as proposed by Hernán, as it (in
>> principle) should be more robustly implemented and thus more suited 
>> for debugger display.
>> (If sig's idea from some time back was adopted, this should be 
>> debugString instead of printString, of course).
>>
>> Cheers,
>> Henry
>>
>> On Oct 5, 2009, at 11:51 23AM, Henrik Johansen wrote:

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

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

Reply via email to