Skip to content

Commit

Permalink
The label can now deal with results that return a boolean or a fraction.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdaase committed Jul 1, 2018
1 parent 9a8ee42 commit 95b3e77
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
as yet unclassified
calculateResultWeight: anObject

anObject isInteger ifTrue: [^anObject].
anObject isLiteral ifTrue: [anObject ifTrue: [^1]].

^ 0

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ resultCount
count := 0.

resultDialog ifNil: [^0].
resultDialog results do: [ :each | each value ifNotNil: [count := count + each value]].
resultDialog results do: [ :each | each value ifNotNil: [count := count + (self calculateResultWeight: (each value))]].

^ count
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
"buttonsOffsetTop" : "LS 6/29/2018 16:45",
"buttonsRight" : "LS 6/29/2018 16:45",
"buttonsTop" : "LS 6/29/2018 16:46",
"calculateResultWeight:" : "BD 7/1/2018 12:53",
"classesSelected" : "LS 6/29/2018 16:15",
"classesSelected:" : "LS 6/29/2018 16:15",
"descriptionFrame" : "LS 6/29/2018 16:52",
"initialExtent" : "LS 6/29/2018 16:54",
"initialize" : "LS 6/29/2018 16:13",
"open" : "LS 6/29/2018 16:34",
"resultCount" : "BD 7/1/2018 12:38",
"resultCount" : "BD 7/1/2018 12:49",
"resultDialog" : "BD 7/1/2018 12:23",
"resultDialog:" : "BD 7/1/2018 12:23",
"run" : "BD 7/1/2018 12:38",
Expand Down

0 comments on commit 95b3e77

Please sign in to comment.