Re: [fpc-pascal] Classes and class methods

2011-02-10 Thread Mark Morgan Lloyd
Luiz Americo Pereira Camara wrote: On 9/2/2011 07:58, Mark Morgan Lloyd wrote: Is it possible to put a class (not an instance) in a variable or array element, and to use this to call a class method? I'm defining a hierarchy of classes and it would be convenient if it were possible to register

Re: [fpc-pascal] Classes and class methods

2011-02-10 Thread Luiz Americo Pereira Camara
On 9/2/2011 07:58, Mark Morgan Lloyd wrote: Is it possible to put a class (not an instance) in a variable or array element, and to use this to call a class method? I'm defining a hierarchy of classes and it would be convenient if it were possible to register the fact that a class had a particu

Re: [fpc-pascal] Classes and class methods

2011-02-09 Thread Mark Morgan Lloyd
Jonas Maebe wrote: On 09 Feb 2011, at 13:41, Mark Morgan Lloyd wrote: I'm doing something wrong- it works. I've got a sequence of classes, each with a Parent class procedure and Children() class function which reference a global array associated with each class (hardcoded name). Each class a

Re: [fpc-pascal] Classes and class methods

2011-02-09 Thread Jonas Maebe
On 09 Feb 2011, at 13:41, Mark Morgan Lloyd wrote: I'm doing something wrong- it works. I've got a sequence of classes, each with a Parent class procedure and Children() class function which reference a global array associated with each class (hardcoded name). Each class also has an Oid(

Re: [fpc-pascal] Classes and class methods

2011-02-09 Thread Mark Morgan Lloyd
Mark Morgan Lloyd wrote: Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: Is it possible to put a class (not an instance) in a variable or array element, and to use this to call a class method? I'm defining a hierarchy of classes and it would be convenient if it wer

Re: [fpc-pascal] Classes and class methods

2011-02-09 Thread Mark Morgan Lloyd
Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: Is it possible to put a class (not an instance) in a variable or array element, and to use this to call a class method? I'm defining a hierarchy of classes and it would be convenient if it were possible to register the

Re: [fpc-pascal] Classes and class methods

2011-02-09 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > Is it possible to put a class (not an instance) in a variable or array > element, and to use this to call a class method? > > I'm defining a hierarchy of classes and it would be convenient if it > were possible to register the fact that a class

[fpc-pascal] Classes and class methods

2011-02-09 Thread Mark Morgan Lloyd
Is it possible to put a class (not an instance) in a variable or array element, and to use this to call a class method? I'm defining a hierarchy of classes and it would be convenient if it were possible to register the fact that a class had a particular subclass, such that the information was