[Newbies] Defining a class at runtime
bert at freudenbergs.de
Fri Jul 20 09:42:46 UTC 2007
On Jul 20, 2007, at 11:31 , Marcin Tustin wrote:
> On 7/20/07, Bert Freudenberg <bert at freudenbergs.de> wrote: On Jul
> 20, 2007, at 8:52 , Louis Moon wrote:
> > Hello. I've been playing around with Squeak the last couple of
> > days, and I've found it pretty easy to use so far. However, I can't
> > figure out how to do this (I'm trying mostly out of curiousity). I
> > suspect it had something to do with the ClassBuilder class, but I
> > can't figure out its usage. How's it done? Thanks for any help.
> In Squeak there is no "runtime". Just send the same message you use
> to create a class in a browser.
> What is that message? We're all holding our breath.
> (If you're not going to say that, I'll point out that it is
> possible to examine code in the browser to see how it does it.)
Err, the message is right in your face:
Object subclass: #NameOfSubclass
> ...and yes, of course, there is a runtime.
Well, you could say there is only runtime. Which makes the term
useless, as it implies some sort of opposite.
- Bert -
More information about the Beginners