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
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
Thanks for trying to help, Hans-Martin. It is a Newspeak thing: back in last years image one needs a reference to the category object to send lookup messages to. This is changed now and I query the "platform squeak" namespace, which I got working last night.
Regards, Robert
On 9/26/2015 3:26 AM, Hans-Martin Mosner wrote:
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
squeak-dev@lists.squeakfoundation.org