[squeak-dev] The Inbox: Tools-fbs.415.mcz
Levente Uzonyi
leves at elte.hu
Tue Jul 24 21:49:27 UTC 2012
On Tue, 24 Jul 2012, Frank Shearar wrote:
> On 19 July 2012 14:39, <commits at source.squeak.org> wrote:
>> Frank Shearar uploaded a new version of Tools to project The Inbox:
>> http://source.squeak.org/inbox/Tools-fbs.415.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Tools-fbs.415
>> Author: fbs
>> Time: 19 July 2012, 2:39:10.14 pm
>> UUID: 5cc4c76f-cd59-410c-b5de-8dd427098e6d
>> Ancestors: Tools-cmm.414
>>
>> Mantis bug 7697: deleting a message from a MessageSet doesn't automatically select another message, breaking the flow when, say, deleting a large number of messages.
>>
>> =============== Diff against Tools-cmm.414 ===============
>>
>> Item was changed:
>> ----- Method: MessageSet>>deleteFromMessageList: (in category 'message functions') -----
>> deleteFromMessageList: aMessage
>> "Delete the given message from the receiver's message list"
>> + | currIdx |
>> + currIdx := self messageListIndex.
>> + messageList := messageList copyWithout: aMessage.
>> + messageList ifNotEmpty: [self messageListIndex: {currIdx. messageList size.} min]!
I know it doesn't answer your question, but IMHO this is better than
creating an array just to send a message to it: (currIdx min: messageList
size)
>> -
>> - messageList := messageList copyWithout: aMessage!
>
> *cough* Any takers? I dislike using indices, but they're there and
> they work. I don't mind addressing the using-indices thing in another
> ticket: 'make MessageSet stop using indices' or something.
If the resulting code is cleaner and the performance is okay, then why
not? :)
Levente
>
> frank
>
>
More information about the Squeak-dev
mailing list
|