<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Georgia">The issue is that Dictionary>>collect:
used to return an OrderedCollection. Now it returns a Dictionary.<br>
<br>
Cheers,<br>
Bob<br>
<br>
</font>
<div class="moz-cite-prefix">On 9/6/13 10:07 AM, Bert Freudenberg
wrote:<br>
</div>
<blockquote
cite="mid:11899316-2444-42DC-AEE3-C07AD8C3E12D@freudenbergs.de"
type="cite">
<pre wrap="">
On 2013-09-06, at 08:21, Frank Shearar <a class="moz-txt-link-rfc2396E" href="mailto:frank.shearar@gmail.com"><frank.shearar@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On 6 September 2013 00:59, <a class="moz-txt-link-rfc2396E" href="mailto:commits@source.squeak.org"><commits@source.squeak.org></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">A new version of Protocols was added to project The Inbox:
<a class="moz-txt-link-freetext" href="http://source.squeak.org/inbox/Protocols-jmck.44.mcz">http://source.squeak.org/inbox/Protocols-jmck.44.mcz</a>
==================== Summary ====================
Name: Protocols-jmck.44
Author: jmck
Time: 5 September 2013, 7:59:50.198 pm
UUID: c4a851ef-6f9c-6f43-b0f4-b4ff12060089
Ancestors: Protocols-fbs.43
Vocabulary class>>typeChoices throws an error if Preferences>>allowEtoysUserCustomEvents is false
Mantis #7786
=============== Diff against Protocols-fbs.43 ===============
Item was changed:
----- Method: Vocabulary class>>typeChoices (in category 'type vocabularies') -----
typeChoices
"Answer a list of all user-choosable data types"
| aList |
(aList := self allStandardVocabularies
select:
[:aVocab | aVocab representsAType]
thenCollect:
[:aVocab | aVocab vocabularyName]).
+ Preferences allowEtoyUserCustomEvents ifFalse: [aList removeKey: #CustomEvents].
- Preferences allowEtoyUserCustomEvents ifFalse: [aList remove: #CustomEvents ifAbsent: []].
^ aList asSortedArray!
</pre>
</blockquote>
<pre wrap="">
I'm not in front of an image right now, but I find it a bit strange
that something Dictionary-y like #removeKey: is being sent to
something called "aList".
If aList will contain a Dictionary sometimes and a list-like
collection (Array, OrderedCollection) other times, first let me run
and hide in a corner so my crying doesn't upset anyone, and second
let's change the variable name to aListOrDictionary.
</pre>
</blockquote>
<pre wrap="">
No, the proposed "fix" is just plain wrong.
#allStandardVocabularies answers an IdentityDictionary, and aList is an OrderedCollection (at least in the Etoys image) so the original #remove:ifAbsent: makes sense, whereas #removeKey: does not.
- Bert -
</pre>
</blockquote>
<br>
</body>
</html>