The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Use the VW Transcript in ObjectStudio 8

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Use the VW Transcript in ObjectStudio 8 Posted: Mar 13, 2009 2:45 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Use the VW Transcript in ObjectStudio 8
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

I received a question from a customer today - he wanted to use the features of the VW transcript in ObjectStudio 8. The ObjectStudio transcript is a read-only thing, and he wanted something more engaging. Rather than try to build up the OST tool, I figured "why not use the VW tool?"

So I asked a few questions, did some debugging, and came up with a handful of overrides that accomplished my goal. The first one: have a VW transcript open detached when you ask for a transcript from the launcher menu. To do that, I made these two changes in class GlobalDictionary:


activateProgramWindow
	"if we use the VW Transcript, no need for this"

	"<osprim: MAIN ActivateProgramWindowSystem>"


openProgramWindow
	" Can't actually open program window, but the following is equivalent"

	"use the VW Transcript instead"
	Core.TextCollectorView open: Core.Transcript label: (#systemTranscript > 'System Transcript').

I commented out the rest of the code in that latter method. Then I needed to track down the implementations of #out - it turns out that all ObjectStudio objects use #out to dump themselves to the OST Transcript. So I overrode these three messages - first, in Object:


out
	"Use VW Transcript instead"
	Core.Transcript show: self print; cr

	"<osprim: MAIN OutString>"

Then in Symbol:


out
	"Use VW Transcript instead"
	Core.Transcript show: self; cr.

	"<osprim: MAIN OutString>"

And finally, in CharacterArray:


out
	"Use VW Transcript instead"
	Core.Transcript show: self; cr.

	"<osprim: MAIN OutString>"

And that's it. Engineering tells me that there are some primitive uses of Transcript that this misses, but it covers nearly all cases - and it gives you a Transcript with some more functionality. To print to it yourself, just use standard ObjectStudio protocol (i.e., #out) - or look at class TextCollector for the VW level API to the object. Enjoy!

Technorati Tags:

Read: Use the VW Transcript in ObjectStudio 8

Topic: Smalltalk Daily 3/12/09: Using the ObjectStudio TextCollector Control Previous Topic   Next Topic Topic: Squeak Board Elections End

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use