[squeak-dev] NS` how can I get programmatic reference to a
particular category?
Hans-Martin Mosner
hmm at heeg.de
Sat Sep 26 07:26:01 UTC 2015
Am 25.09.2015 um 18:12 schrieb robert:
> I must define variableByte subclasses in the category. Categories are not part of the namespace nor or symbols looked
> for there. SO I need programmatic access. I didn't find anything in the documentation, as it is an implementation
> issue. Could someone knowledgeable point out how I can do this?
>
> ty,
> Robert
>
>
>
It is somewhat unclear what you want to achieve.
Categories are simple strings, and "Smalltalk organization" (a SystemOrganizer) keeps the association between classes
and categories.
To create a class in a given category, just execute the class creation expression with the proper category, something
like this:
| nameOfYourClass nameOfYourCategory |
nameOfYourClass := #MyNewClass.
nameOfYourCategory := 'MyOldCategory'.
Object variableByteSubclass: nameOfYourClass
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: nameOfYourCategory
Cheers,
Hans-Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150926/e3f5d931/attachment.htm
More information about the Squeak-dev
mailing list
|