[Cuis-dev] Updates for Theme, etc

Casey Ransberger bahweep at icloud.com
Wed May 27 22:48:16 PDT 2020


Wait, okay. Are newlines not displaying correctly, or are you just noticing that my lazy hands sometimes type an accessor method as

methodName ^ foo

?

Also, in Smalltalk, I usually put a trailing line at the end of a method because some folks might prefer mouse focus and accidentally write in. Having it on its own line makes it easier to stop panicking when *I* do that anyway! Incidentally, I remember being able to do Cmd-L to abandon my changes in a browser. Did that go away on purpose, or am I misremembering the keyboard shortcut?

I’m pretty sure the last time I was in on a discussion about coding style, there was just me and Juan and Juan said “you know what I want to see.” Which I took to mean, legible. If folks don’t like my one-line methods, I can totally take up a few more bytes with extra whitespace. And then make it up by leaving trailing whitespace off, if that’s what people want. I’m amenable. 

If — on the other hand — my changes have affected the way methods I didn’t touch are displayed, yeah, that’s a huge problem, and a curious one at that. Not sure where that’d be coming from.

My confidence was at its lowest modifying CodeWindow>>decorateForInheritance. I wasn’t sure why it's presented so differently from every other sender of #useUniformColors, or why it had hard-coded colors in it. Against my nature, I left the hard-coded stuff alone and just got rid of the unneeded branch at "Theme current useUniformColors”.

Someone who knows CodeWindow better than I do might be able to provide insight, if there’s a problem here.

The only other thing I felt uncertain about was the change I made to SystemWindow>>windowColor. It originally did “^self model class windowColor”, but when I looked into that, it seemed that ultimately it was doing "Theme current object” anyway, so I changed it to that, as self model… blah blah seemed like the longer way around to find the value it was looking for, and I thought it odd that a model should care what color the bike shed is. Models and their visual representation generally being kept as separate as possible.

Anyway let me know if I’ve actually broken something… things seem to work fine for me, so I’ll need help to figure it out otherwise.

—Casey

> On May 27, 2020, at 9:52 PM, Luciano Notarfrancesco <luchiano at gmail.com> wrote:
> 
> I tried it and fileIns fine and everything works fine (including my Theme, I just should remove #useUniformColors from my Theme).
> But there's a problem with newLines... some methods don't have newLines (for example UniformTheme>>browser looks like "browser ^ defaultColor") and most other methods have extra CRs.
> 
> On Thu, May 28, 2020 at 7:35 AM Casey Ransberger via Cuis-dev <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
> Found time to do the refactor today. Decoupling the Taskbar will have to wait a bit longer, as I’m out of time for now, but I expect that to be straightforward. The attached code is ready for review.
> 
> Note for the integrator: this stuff touches a bunch of UI. Nothing blows up on my machine har har har! But best to back up your work before bringing in this code, as if I have a bug somewhere, you know, images might explode (usually a million debuggers will open if that’s the case.)
> 
> I think on balance that this is a lot nicer than what was there before. Let me know what y’all think. As planned, it removes a bunch of code duplication and send sites, and adds a class with a small selection of entirely trivial methods. These changes shouldn’t affect observed behavior outside of perhaps an insignificant reduction in latency when opening new windows.
> 
> —Casey
> 
> -- 
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
> https://lists.cuis.st/mailman/listinfo/cuis-dev <https://lists.cuis.st/mailman/listinfo/cuis-dev>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200527/58fab6ca/attachment-0001.htm>


More information about the Cuis-dev mailing list