[Newbies] Contents of Transcript
Cédrick Béler
cdrick65 at gmail.com
Thu Jul 30 14:22:56 UTC 2009
Just playing around. This is probably not thread safe and also not
nice but here it is.
I added an inst var log (maybe subclass would be better) and then
changed endEntry like below :
endEntry
"Display all the characters since the last endEntry, and reset the stream"
accessSemaphore critical:[
self changed: #appendEntry.
log ifNil: [log := WriteStream new].
log nextPutAll: stream contents.
stream reset
].
actualEntry
^log contents
It actually log whats written programaticaly to the transcript but not
what's written directly in it (like in a workspace).
hth,
Cédrick
2009/7/30 Guillaume Grondin <grondin at ensm-douai.fr>:
> Hi,
>
> I would like to fileout the content of Transcript. But it doesn't seem to be
> possible because "Squeak Transcript (different from VW Transcript) is the
> stream of not yet appened text" (nicolas cellier). (How about pharo ?)
>
> One solution seems to be to add a dependent to Transcript and log stuff on
> "updated: #appendEntry". Is there a more practical solution ?
>
> Regards,
> Guillaume Grondin
>
> previous discussion on this matter :
> http://marc.info/?l=squeak-dev&m=119282200100489&w=2
> http://aspn.activestate.com/ASPN/Mail/Message/squeak-list/2498160
>
>> On Saturday 20 October 2007 3:00 am, nicolas cellier wrote:
>>
>>> Transcript must now be viewed as a TranscriptingService you'll have to
>>> subscribe to... For that reason I would rather call it a Subscript!
>
>
> --
> Guillaume GRONDIN (Dr)
> Ph.D in Computer Science
> ===========================================
> Ecole des Mines de Douai - Dept. I.A.
> 941, rue Charles Bourseul
> BP 10838 - 59508 Douai Cedex, France
> Tél : (+33) (0) 3 27 71 24 53
> Fax : (+33) (0) 3 27 71 29 17
> Email: grondin at ensm-douai.fr
> http://vst.ensm-douai.fr/grondin
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
--
Cédrick
More information about the Beginners
mailing list