[squeak-dev] Dependencies on Cursor

tim Rowledge tim at rowledge.org
Mon Jun 24 17:30:39 UTC 2013


On 24-06-2013, at 5:31 AM, Frank Shearar <frank.shearar at gmail.com> wrote:
>  You would then write:
> 
>    UIManager default showCursor: #wait during: ["stuff"]

> snip]

> The reason for the icky reflection is to fit in with the existing way
> cursors are used. I'd be happy to unroll the #perform: into a #caseOf:
> mapping explicitly to the existing cursors.
> 
> Thoughts

Well I really dislike seeing #respondsTo: et al in general code so I'd propose something along the lines of a list of known cursors (it's reasonable in my opinion to make that list using reflection at either startup or add-new-cursor time) and then 

Cursor class >> #named: aSymbol
   ^  cursorList at: aSymbol ifAbsent:[self normal]

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: CCC: Crash if Carry Clear




More information about the Squeak-dev mailing list