more MVC questions

Preston Briggs preston at tera.tera.com
Thu Feb 12 21:43:15 UTC 1998


I'm writting a small game as a sort of exploratory exercise
to get me through the learning curve on Squeak.  Has worked very well
in that I can get around the programming environment pretty well
and can zip out correct code pretty quickly. (and the program
plays Gin pretty well :-)

But now I'm bouncing up against the MVC.  Basically, I want to
display a stream of results on the screen.  I've been simply writing
things to Transcript, but want to do better.  So I looked at something
like

	create a TextCollector
	create a TextCollectorView
	hook 'em together
	create a StandardSystemView
	hook 'em together
	open it and start streaming to it.

This works ok, but...
Seems like the data I'm displaying is for display only.
I don't want people editing it or executing it.
Makes sense to be able to scroll around.
Makes some sense to select and copy it.
How can I arrange this sort of thing?

And while we're in the area,
I notice that

	TextCollectorView open: label:

doesn't return anything, despite the comment.
Indeed, when I edit the code, it still won't return anything.
E.g., when I execute the following code in a workspace

	tc := TextCollector new.
	tv := TextCollectorView open: tc label: 'Score'.

I get a window on my display, and I'm able to stream text
to "tc" and have it show up in the window, but "tv" is undefined.

Thanks,
Preston





More information about the Squeak-dev mailing list