How do I get all classnames in a category?

Jason Rogers jacaetevha at gmail.com
Thu Nov 17 20:04:25 UTC 2005


Oops, just saw Damien's response.  That's better.

On 11/17/05, Jason Rogers <jacaetevha at gmail.com> wrote:
> On 11/17/05, Marcus Pedersén <marcus.pedersen at comhem.se> wrote:
> >
> > Hi!
> > How do I get all classnames in a specific category, codewise?
> > I am after something like:
> > Categories classnamesInCategory: 'My Category'.
> > ...and I want a collection returned with all classnames in that category.
> >
> > Many thanks in advance!
>
> | category classNames |
> category := 'Foo*'.
> classNames := OrderedCollection new.
> SystemOrganization categories withIndexCollect: [:cat :idx |
>     (category match: cat)
>         ifTrue: [classNames addAll: (SystemOrganization
> listAtCategoryNumber: idx)]
>         ifFalse: [nil]].
> classNames explore.
>
> --
> Jason Rogers
>
> "I am crucified with Christ: nevertheless I live; yet not I,
> but Christ liveth in me: and the life which I now live in
> the flesh I live by the faith of the Son of God, who loved
> me, and gave himself for me."
>     Galatians 2:20
>


--
Jason Rogers

"I am crucified with Christ: nevertheless I live; yet not I,
but Christ liveth in me: and the life which I now live in
the flesh I live by the faith of the Son of God, who loved
me, and gave himself for me."
    Galatians 2:20



More information about the Squeak-dev mailing list