[squeak-dev] Preferences ignoreStyleIfOnlyBold

Tobias Pape Das.Linux at gmx.de
Fri Jan 3 17:42:49 UTC 2014


On 03.01.2014, at 18:03, Frank Shearar <frank.shearar at gmail.com> wrote:

> On 3 January 2014 16:33, Chris Muller <asqueaker at gmail.com> wrote:
>> On Fri, Jan 3, 2014 at 3:35 AM, Frank Shearar <frank.shearar at gmail.com> wrote:
>>> On 31 December 2013 19:54, Colin Putney <colin at wiresong.com> wrote:
>>>> 
>>>> 
>>>> 
>>>> On Tue, Dec 31, 2013 at 11:48 AM, Chris Muller <asqueaker at gmail.com> wrote:
>>>> 
>>>>> 
>>>>> Cut-and-pasting _should_ be painful, so you will be encouraged to
>>>>> write factored code instead.  :)
>>>> 
>>>> 
>>>> I do write factored code. I just don't like typing it all out by hand.
>>>> 
>>>>> 
>>>>> But wait!  If you're using Shout, how will you stop the method from
>>>>> being styled as soon as you type the next character?
>>>>> 
>>>>> And, if you're not using Shout then "cut" will be cutting plain text
>>>>> anyway..
>>>>> 
>>>>> So, unless I'm missing something, this preference seems so useless its
>>>>> crazy.
>>>> 
>>>> 
>>>> Yeah, this preference isn't quite right for my purposes. The behaviour I
>>>> want is that Shout does syntax highlighting for me, but the text is
>>>> otherwise treated as unstyled. If I cut it, the clipboard has unstyled text,
>>>> if I paste styled text, the styles are ignored and Shout restyles it
>>>> according to syntax. Unstyled text gets stored in the changes file and
>>>> Monticello.
>>>> 
>>>> The problem I have now is that if I cut Shout-styled text and paste it into
>>>> a browser, I get a dialog asking me if I want styled text. The answer is
>>>> always no, so I'd rather not be asked about it every time.
>>> 
>>> For what it's worth, things still seem to work just fine if you rip
>>> out #askIfAddStyle:req: and adjust ClassDescription >>
>>> logMethodSource:forMethodWithNode:inCategory:withStamp:notifying:
>>> accordingly. That might not mean particularly much. At any rate,
>>> logging here means storing in the changes file. What the implications
>>> styling (or the lack thereof) _of methods_ has for the changes file I
>>> do not know. Since Shout styles code, I don't see what the problem
>>> would be with simply removing all styling of all source on its way to
>>> the changes file (so in the ClassDescription method above).
>>> (Obviously, class comments are different, and we should preserve
>>> styling here. But that's a different code path.)
>>> 
>>> In other words, why can't we replace
>>> 
>>> newText := (requestor notNil and: [Preferences confirmFirstUseOfStyle])
>>>    ifTrue: [aText askIfAddStyle: priorMethodOrNil req: requestor]
>>>    ifFalse: [aText].
>>> 
>>> with aText asString?
>> 
>> +1.  I agree with your reasoning -- there's no obviously good reason
>> to store styled Text in the changes file.
> 
> OK, so that's you & I in agreement. I think Colin's happy for it to
> go. Any ol' timers out there with warnings of doom, before I rip this
> out?

Just FYI: this makes it impossible to use/port CodeTalk[1] in/to
Squeak 4.5.
And I actually used it once or twice, not that this would be important :)

Best
	-Tobias

[1] https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/codetalk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1665 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140103/5d341933/signature.pgp


More information about the Squeak-dev mailing list