Login  Register

Re: Programmatic generation of new class

Posted by Clément Béra on Jul 29, 2016; 4:22pm
URL: https://forum.world.st/Programmatic-generation-of-new-class-tp4908659p4908696.html

On old versions of Pharo you need to use:
#subclass:instanceVariableNames:classVariableNames:poolDictionaries:package:

That might be it.

On Fri, Jul 29, 2016 at 6:14 PM, Peter Uhnak <[hidden email]> wrote:
Can you show the full trace? Because I am regularly doing something similar without any problems.
In fact if I copy/paste your code (and just change the classes that I have) it works fine.

Btw. did you override such methods in your system?

Peter

On Fri, Jul 29, 2016 at 07:05:04AM -0700, Brad Selfridge wrote:
> I'm trying to programmatically generate a new class, but am getting the
> following error:
>
> DynamicDescriptorSystem class(Object)>>doesNotUnderstand:
> #subclass:instanceVariableNames:classVariableNames:package:
>
> This is the method that I'm trying to execute:
>
> buildNewDescriptorSystemUsing: aDescriptorSystemClassName
>
>       descriptorSystem :=
>       DynamicDescriptorSystem subclass: aDescriptorSystemClassName asSymbol
>                       instanceVariableNames: ''
>                       classVariableNames: ''
>                       package: packageName asString
>
> I see examples of this all over Pharo and I copied this code almost
> verbatim.
>
> What am I doing wrong?
>
>
>
> -----
> Brad Selfridge
> --
> View this message in context: http://forum.world.st/Programmatic-generation-of-new-class-tp4908659.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>