Is there a technique or goodie lurking about out there for getting printouts of source code in an easy-to-read format? Right now if I have a project with 20 new classes in it and I want a printout of all the code to refer to in discussion with someone (assume there is no machine with a squeak environment available) it seems I have to file out the code then print the file and work from that. All of the exclamation points, timestamps, etc... get a bit annoying after a while. I'm looking for something that would make the code look a bit cleaner and easier to read, the way it appears in the browser.
Thanks, Kevin
John,
I mentioned a bug on the Squeak mailing list yesterday and I have tracked down more information about it.
do: is used in the method displayOn:transformation:clippingBox:rule:fillColor:
in the classes Path, Line, LinearFit, CurveFitter Spline. The method is overwritten in each subclass, but I don't think that it needs to be.
The scaleBy: and translateBy: methods can be modified as attached and the displayOn:... methods removed from the four subclasses and the one in Path replaced by my version.
Along with those changes, the classes Arc and Circle should be removed from the Path hierarchy. They don't use the Path instance variable collectionOfPoints and many of their inherited methods don't make sense (at least to me).
There seems to be two Path type root classes. One for point paths and one for algorithmic paths. The commonality of the classes being the form used to draw them out.
John-Reed Maffeo Mesa, Arizona Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="522A6368"; name="Pathfixes.30Mar750pm.cs" Content-Transfer-Encoding: 7bit Content-Description: BBEdit Lite 3.0 Document Content-Disposition: inline; filename="Pathfixes.30Mar750pm.cs"
'From Squeak 2.3 of January 14, 1999 on 30 March 1999 at 7:50:40 pm'!
!Path methodsFor: 'transforming' stamp: 'jrm 3/30/1999 19:36'! scaleBy: aPoint "Answers a new Path scaled by aPoint. Does not affect the current data in this Path."
| newPath | newPath _ self species new: self size. newPath form: self form. collectionOfPoints do: [:element | newPath add: (aPoint asPoint x * element x) asInteger @ (aPoint asPoint y * element y) asInteger]. ^newPath! !
!Path methodsFor: 'transforming' stamp: 'jrm 3/30/1999 19:38'! translateBy: aPoint "Answers a new Path whose elements are translated by aPoint. Does not affect the elements of this Path."
| newPath | newPath _ self species new: self size. newPath form: self form. collectionOfPoints do: [:element | newPath add: (element x + aPoint x) asInteger @ (element y + aPoint y) asInteger]. ^newPath! !
!Path methodsFor: 'displaying' stamp: 'jrm 3/30/1999 19:40'! displayOn: aDisplayMedium transformation: aTransformation clippingBox: clipRect rule: anInteger fillColor: aForm
| transformedPath | "get the scaled and translated Path." transformedPath _ aTransformation applyTo: self. transformedPath displayOn: aDisplayMedium at: 0 @ 0 clippingBox: clipRect rule: anInteger fillColor: aForm.! !
squeak-dev@lists.squeakfoundation.org