[squeak-dev] Progress-bar positioning

Levente Uzonyi leves at elte.hu
Thu Jun 9 21:31:09 UTC 2011


On Tue, 7 Jun 2011, Chris Muller wrote:

>> Which class will implement the preference? DisplayScreen?
>
> Yes, that seems like a very reasonable candidate to me.  My only
> question is, do we want to maintain #cursorPoint as a viable option
> for displaying progress bar?  It seems reasonable to me, but then we
> would have to either have a case check or implement cursorPoint on
> DisplayScreen..
>

Thinking a bit about it I came to the following idea:
The preference would be added to ProgressInitiationException. The 
values of the preference would be symbols, like #cursorPoint, #center, 
#topCenter, etc. The exception would use UIManager to find out what the 
symbol means. The value of the preference would be used when no point 
would be requested (nil value). This way we wouldn't introduce unnecessary 
dependencies. Ideally one would be able to write things like
'foo' displayProgressAt: #center from: ...
Or another helper method using the value of the preference:
'foo' displayProgressFrom: ...

This requires a new kind of preference where the user can select it's 
value from a predefined list. I'm sure this would also be useful in other 
cases.

What do you think?


Levente



More information about the Squeak-dev mailing list