[squeak-dev] Proof-of-concept: moving Smalltalk code editing support into SmalltalkEditor

Marcel Taeumel marcel.taeumel at hpi.de
Tue Mar 27 09:52:46 UTC 2018


Shout wants to be the only mechanism that governs text attributes in a (pluggable) text morph. It does not keep track of its own additions or anything that has been there before. You cannot even combine two different kinds of "Shout stylers" if you would want to. Thus, any manual changes to text attributes will be discarded once Shout decides to re-style the text contents again. That is why CMD-7 does not work as expected if a text morph has a styler and hence Shout styling enabled.

We decided to put all Shout-styling properties into the UI themes because code styling is closely related to all other visual properties in the system. For example, the code as to look different in "Solarized" than it does in "Monokai" or "Default Squeak":


If you want to write a tool or application that DOES NOT comply with UI themes, you might encounter several barriers at this moment. However, there is #canApplyUserInterfaceTheme implemented in Morph to start thinking about this challenge. You can set the property #noUserInterfaceTheme to avoid UI-theme application. This suggests a bigger refactoring I should approach. All calls to #setDefaultParameters might need to happen through #applyUserInterfaceTheme, which me might want to guard for Morphs, for example. Let me think about that.

Anyway: Managing side effects and state in an image-based object system remains challenging. :-)

Best,
Marcel
Am 26.03.2018 20:22:36 schrieb tim Rowledge <tim at rowledge.org>:


> On 25-03-2018, at 8:52 PM, Chris Muller wrote:
>
>> Maybe even per-editor instance preferences. Inherit the global as a default but allow changing at need. Need a UI to make it useful. Actually we really need some big improvements to the prefs/settings/style/font/colour stuff for editors anyway.
>
> UserInterfaceTheme in the image does that. We did it in summer of
> 2016, the color themes work pretty well ever since.

I was thinking more of the UI for changing text styles/font/colours within editors etc. Marcel's answer about having properties within the themes that could cover these sounds interesting.

I've just noticed an extra bit of complication when thinking about this wrt Shout colouring - just try cmd-7 with some selected text in a code view! Even in a comment...

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Diagnostics are the programs that run when nothing else will.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180327/74d2c085/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 54262 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180327/74d2c085/attachment-0001.png>


More information about the Squeak-dev mailing list