[squeak-dev] [Newbies] ColorTranscript howto fake/implement?
LEnglish5 at cox.net
Thu May 16 09:41:34 UTC 2019
Hmmm. Doesn’t seem to work. Eventually opens up an uncountable number of MNU windows
Transcript := TranscriptStream new.
text := Text string: 'text' attribute: (Color red).
Transcript show: text;cr
16 May 2019 2:39:05.027292 am
VM: Mac OS - Smalltalk
Image: Squeak5.2 [latest update: #18229]
Working Dir /Applications/Squeak5.2-18229-64bit copy.app/Contents/Resources
Trusted Dir /Users/lawson/Library/Application Support/Squeak/
Untrusted Dir /Users/lawson/Documents/Squeak/
Receiver: Color red
Arguments and temporary variables:
aMessage: emphasizeScanner: a CharacterBlockScanner
exception: MessageNotUnderstood: Color>>emphasizeScanner:
Receiver's instance variables:
cachedBitPattern: a Bitmap of length 1
--- The full stack ---
 in CharacterBlockScanner(CharacterScanner)>>setFont
 in MouseOverHandler>>processMouseOver:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 in WorldState>>doOneCycleNowFor:
 in MorphicProject>>spawnNewProcess
 in BlockClosure>>newProcess
> On May 16, 2019, at 1:14 AM, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> Hi Lawson,
> please find attached a changeset that adds text support to TranscriptStream. You have to replace your transcript with "Transcript := TranscriptStream new".
>> Am 15.05.2019 20:35:00 schrieb LawsonEnglish <lenglish5 at cox.net>:
>> I’m trying to implement something along the lines of:
>> ColorTranscript show: ‘text’ withColor: Color red; show: ‘more text’ withColor: Color blue.
>> All stream classes seem to strip out text attribute information except AttributedTextStream which seems rather incomplete.
>> I was thinking that I could analyze how the color menu that is accessed via cmd-6 (on the mac) is able to colorize a selection even in a transcript window and so implement the functionality by faking the UI’s steps, but I can’t figure out how to debug the interface and trace though a menu call to see what it actually does.
>> Any suggestions?
>> on how to trace the steps to colorize a word via the menu OR on how to implement the functionality directly…
>> Either/both would be appreciated,
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev