[Pharo-users] "Theming" dictionaries?

Esteban Maringolo emaringolo at gmail.com
Wed Feb 19 12:05:16 EST 2020

I'm not sure I fully understand your question.

But Dictionaries expect its elements to respond to #key/#value messages,
and in the case of Pharo Dictionary is tightly bound to the Association
class (and the #-> selector), so there is no way to subclassify Dictionary
and specify the class of its elements.

Otherwise you could subclassify Dictionary and have its elements to be
instances of "MinipediaLanguage", that is polymorphic with Association but
have language/titles instead of key/value.

I don't see the need for it, though.

Esteban A. Maringolo

On Wed, Feb 19, 2020 at 1:49 PM Offray Vladimir Luna Cárdenas <
offray.luna at mutabit.com> wrote:

> Hi,
> As some of you may know, I'm a "savage coder" who learned
> Smalltalk/Pharo by himself, of course thanks to communities, books and
> videos, but without formal training or peers in the same country and
> guided mostly by necessity. All this to say that this maybe kind of a
> silly question.
> Anyway, we have this project called Minipedia[1], that imports Wikipedia
> articles and their history. A Minipedia language there, is just a
> dictionary, where the key is the language two letters code and the value
> for each key is an array of article titles. There is any way to
> specialize a Dictionary to tell it, name your 'key' as language and your
> 'value' as 'titles'?
> [1] https://mutabit.com/repos.fossil/minipedia/
> Thanks,
> Offray
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20200219/798a76ed/attachment.html>

More information about the Pharo-users mailing list