[UI] Compiler messages

Colin Putney cputney at wiresong.ca
Mon Nov 12 06:53:43 UTC 2007


On 11-Nov-07, at 12:44 PM, tim Rowledge wrote:

>
> On 11-Nov-07, at 12:10 PM, Colin Putney wrote:
>>>
>>
>> I don't have any advice about that, but I would like to suggest  
>> this: please, please don't continue the tradition of having the  
>> parser interact with the user directly by opening menus and what  
>> not. This is a horrifying design that has given me much grief with  
>> OmniBrowser.
>
> I'd say this is one of those places where exceptions have a clear  
> and valuable role.
>
> When there is an unknown variable, instead of using something like
> varname isUnknown ifTrue:[(PopUpMenu query:'is this a temp or cancel  
> compile') ifTrue:[self addTempNamed: varname] ifFalse:[^self  
> buggered]]
>
> try something a bit more like
> varname isUnknown ifTrue:[CompilerUnknownVariableName informWith:  
> varname forCompiler: self]

Yeah, that's what I ended up doing.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Parser.3.cs
Type: application/octet-stream
Size: 10791 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/ui/attachments/20071111/56c9bbb0/Parser.3-0001.obj
-------------- next part --------------



The next egregious thing to fix is the way the browsers and the parser  
use the Text that's submitted for compilation as a ValueHolder for the  
source code. Ugh.

Colin


More information about the UI mailing list