305
|
1 |
"{ Package: 'stx:goodies/monticello' }"
|
|
2 |
|
|
3 |
MCTestCase subclass:#MCStReaderTest
|
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'Monticello-Tests'
|
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!MCStReaderTest methodsFor:'as yet unclassified'!
|
|
12 |
|
|
13 |
commentWithStyle
|
|
14 |
^ '!!AEDesc commentStamp: ''<historical>'' prior: 0!!
|
|
15 |
I represent an Apple Event Descriptor. I am a low-level representation of Apple Event (and hence Applescript) information. For further Information, see Apple''s Inside Macintosh: Interapplication Communications, at
|
|
16 |
|
|
17 |
http://developer.apple.com/techpubs/mac/IAC/IAC-2.html.
|
|
18 |
|
|
19 |
Essentially, I represent a record comprising a one-word "string" (treating the word as fourbyte characters) representing a data type, followed by a pointer to a pointer (a handle) to the data I represent. Care must be taken to assure that the Handle data is disposed after use, or memory leaks result. At this time, I make no effort to do this automatically through finalization.!!
|
|
20 |
]style[(218 54 384)f1,f1Rhttp://developer.apple.com/techpubs/mac/IAC/IAC-2.html;,f1!!
|
|
21 |
'
|
|
22 |
!
|
|
23 |
|
|
24 |
commentWithoutStyle
|
|
25 |
^ '
|
|
26 |
CharacterScanner subclass: #CanvasCharacterScanner
|
|
27 |
instanceVariableNames: ''canvas fillBlt foregroundColor runX lineY ''
|
|
28 |
classVariableNames: ''''
|
|
29 |
poolDictionaries: ''''
|
|
30 |
category: ''Morphic-Support''!!
|
|
31 |
|
|
32 |
!!CanvasCharacterScanner commentStamp: ''<historical>'' prior: 0!!
|
|
33 |
A displaying scanner which draws its output to a Morphic canvas.!!
|
|
34 |
|
|
35 |
!!CanvasCharacterScanner methodsFor: ''stop conditions'' stamp: ''ar 12/15/2001 23:27''!!
|
|
36 |
setStopConditions
|
|
37 |
"Set the font and the stop conditions for the current run."
|
|
38 |
|
|
39 |
self setFont.
|
|
40 |
stopConditions
|
|
41 |
at: Space asciiValue + 1
|
|
42 |
put: (alignment = Justified ifTrue: [#paddedSpace])!! !!'
|
|
43 |
!
|
|
44 |
|
|
45 |
methodWithStyle
|
|
46 |
^ '!!EventHandler methodsFor: ''copying'' stamp: ''tk 1/22/2001 17:39''!!
|
|
47 |
veryDeepInner: deepCopier
|
|
48 |
"ALL fields are weakly copied. Can''t duplicate an object by duplicating a button that activates it. See DeepCopier."
|
|
49 |
|
|
50 |
super veryDeepInner: deepCopier.
|
|
51 |
"just keep old pointers to all fields"
|
|
52 |
clickRecipient := clickRecipient.!!
|
|
53 |
]style[(25 108 10 111)f1b,f1,f1LDeepCopier Comment;,f1!! !!
|
|
54 |
|
|
55 |
'
|
|
56 |
!
|
|
57 |
|
|
58 |
testCommentWithStyle
|
|
59 |
| reader |
|
|
60 |
reader := MCStReader on: self commentWithStyle readStream.
|
|
61 |
reader definitions
|
|
62 |
!
|
|
63 |
|
|
64 |
testCommentWithoutStyle
|
|
65 |
| reader |
|
|
66 |
reader := MCStReader on: self commentWithoutStyle readStream.
|
|
67 |
self assert: (reader definitions anySatisfy: [:ea | ea isMethodDefinition]).
|
|
68 |
!
|
|
69 |
|
|
70 |
testMethodWithStyle
|
|
71 |
| reader |
|
|
72 |
reader := MCStReader on: self methodWithStyle readStream.
|
|
73 |
self assert: reader definitions first isMethodDefinition.
|
|
74 |
! !
|
|
75 |
|
|
76 |
!MCStReaderTest class methodsFor:'documentation'!
|
|
77 |
|
|
78 |
version
|
|
79 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCStReaderTest.st,v 1.1 2011-08-20 12:21:03 cg Exp $'
|
|
80 |
!
|
|
81 |
|
|
82 |
version_CVS
|
|
83 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCStReaderTest.st,v 1.1 2011-08-20 12:21:03 cg Exp $'
|
|
84 |
!
|
|
85 |
|
|
86 |
version_SVN
|
|
87 |
^ '§Id: MCStReaderTest.st 5 2010-08-29 07:30:29Z vranyj1 §'
|
|
88 |
! !
|