more MVC questions

Andreas Raab raab at isgnw.cs.Uni-Magdeburg.DE
Thu Feb 12 22:10:53 UTC 1998


> 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?

Create a subclass of TextCollectorController which just ignores keyboard
input (then people can't type anything) by overriding one of the methods
#processKeyboard #readKeyboard or even #zapSelectionWith: or you only
override the method #normalCharacter: - then people can't type any input
but can still use copy/paste or keyboard selection. Once you have your own
controller you can set it for the TextCollectorView using the
View>>controller: method.

> And while we're in the area,
> I notice that
> 
> 	TextCollectorView open: label:
> 
> doesn't return anything, despite the comment.

It can't return anything since StandardSystemController>>open will
terminate the current process. In fact, all code run after the call to
#open:label: will never be executed.

Andreas

-- 
Linear algebra is your friend - Trigonometry is your enemy.
+===== Andreas Raab ============= (raab at isg.cs.uni-magdeburg.de) =====+
I Department of Simulation and Graphics      Phone: +49 391 671 8065  I
I University of Magdeburg, Germany           Fax:   +49 391 671 1164  I
+=============< http://isgwww.cs.uni-magdeburg.de/~raab >=============+





More information about the Squeak-dev mailing list