On Mon, Mar 19, 2012 at 1:11 PM, Milan Mimica <[email protected]>wrote:
> On 19 March 2012 21:04, Eliot Miranda <[email protected]> wrote: > >> >> a) compiling source containing an undeclared reference merits only a >> warning >> >> IMO, it's not an error, and a) is a good option. Note that if you did >> make it an error in all circumstances you'd badly break the system. >> > > > Hi Eliot, > > a) works for me. I just need a string to display to the user, on compile > time. So how do I get a warning? > Look at UndeclaredVariableWarning. The Squeak code isn't well favtored. defaultAction needs to be decomposed further into a messageText implementation. But basically I'd want the UndeclaredVariableWarning's messageText to provide the warning string. So I could do e.g. [Compiler evaluate: aString] on: UndeclaredVariableWarning do: [:ex| Transcript cr; show: ex messageText] > > > -- > Milan Mimica > http://sparklet.sf.net > -- best, Eliot
