1231
|
1 |
"{ Package: 'stx:libbasic3' }"
|
|
2 |
|
|
3 |
"{ NameSpace: Packages }"
|
|
4 |
|
|
5 |
Object subclass:#Prerequisite
|
|
6 |
instanceVariableNames:'name ifFailedString'
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'Package-Prerequisite'
|
|
10 |
!
|
|
11 |
|
|
12 |
|
|
13 |
!Prerequisite class methodsFor:'instance creation'!
|
|
14 |
|
|
15 |
named:aName ifFail:anActionBlock
|
|
16 |
^ self basicNew name:aName ifFailedAction:anActionBlock
|
|
17 |
!
|
|
18 |
|
|
19 |
named:aName ifFailString:aString
|
|
20 |
^ self basicNew name:aName ifFailedString:aString
|
|
21 |
! !
|
|
22 |
|
|
23 |
!Prerequisite methodsFor:'accessing'!
|
|
24 |
|
|
25 |
ifFailedString
|
|
26 |
"return the value of the instance variable 'ifFailedString' (automatically generated)"
|
|
27 |
|
|
28 |
^ ifFailedString
|
|
29 |
!
|
|
30 |
|
|
31 |
ifFailedString:something
|
|
32 |
"set the value of the instance variable 'ifFailedString' (automatically generated)"
|
|
33 |
|
|
34 |
ifFailedString := something.
|
|
35 |
!
|
|
36 |
|
|
37 |
name
|
|
38 |
"return the value of the instance variable 'name' (automatically generated)"
|
|
39 |
|
|
40 |
^ name
|
|
41 |
!
|
|
42 |
|
|
43 |
name:something
|
|
44 |
"set the value of the instance variable 'name' (automatically generated)"
|
|
45 |
|
|
46 |
name := something.
|
|
47 |
!
|
|
48 |
|
|
49 |
name:nameArg ifFailedString:ifFailedStringArg
|
|
50 |
"set instance variables (automatically generated)"
|
|
51 |
|
|
52 |
name := nameArg.
|
|
53 |
ifFailedString := ifFailedStringArg.
|
|
54 |
! !
|
|
55 |
|
|
56 |
!Prerequisite methodsFor:'evaluation'!
|
|
57 |
|
|
58 |
evaluate
|
|
59 |
(self testCondition) ifFalse:[
|
|
60 |
self evaluateIfFailedAction.
|
|
61 |
]
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
!
|
|
74 |
|
|
75 |
evaluateIfFailedAction
|
|
76 |
Compiler evaluate:ifFailedString
|
|
77 |
!
|
|
78 |
|
|
79 |
testCondition
|
|
80 |
self subclassResponsibility
|
|
81 |
! !
|
|
82 |
|
|
83 |
!Prerequisite methodsFor:'queries'!
|
|
84 |
|
|
85 |
isClassPrerequisite
|
|
86 |
^ false
|
|
87 |
!
|
|
88 |
|
|
89 |
isPackagePrerequisite
|
|
90 |
^ false
|
|
91 |
! !
|
|
92 |
|
|
93 |
!Prerequisite class methodsFor:'documentation'!
|
|
94 |
|
|
95 |
version
|
|
96 |
^ '$Header: /cvs/stx/stx/libbasic3/packages/Prerequisite.st,v 1.1 2003-04-09 11:37:57 james Exp $'
|
|
97 |
! !
|