Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!uwvax!tank!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!p.cs.uiuc.edu!johnson From: johnson@p.cs.uiuc.edu Newsgroups: comp.lang.smalltalk Subject: Re: Quest. on Smalltalk Message-ID: <80500047@p.cs.uiuc.edu> Date: 17 Dec 88 20:44:00 GMT References: <14@ Lines: 15 Nf-ID: #R:1. Is it possible to create a message at run time and then send it? >For those of you who know LISP, I am asking if Smalltalk has a >facility analogous to the EVAL statement. If you really want to define a new method at run time, then perform: will not do the trick. You can build up a string and send a message to a class asking it to install it as a new method, or you can just ask the compiler to evaluate it for you. It is instructive to see how doIt is implemented in TextController. (Unless it is done in ParagraphEditor. I think it is in TextCOntroller, though.) In general, however, perform: is safer and will probably do what you want. Blocks can also often be used as the solution to problems of this type, as Scheme programmers well know.