-
Notifications
You must be signed in to change notification settings - Fork 1
/
stage.rb
77 lines (75 loc) · 2.16 KB
/
stage.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
class BuildStage
attr_accessor :positions, :stagename
# attr_reader :livePosition
def initialize(stageWin, mainApp)
# debug "BLAH"
# debug self.inspect()
@stageWin = stageWin
@mainApp = mainApp
@stagename = ""
@positions = []
# debug mainApp.inspect()
@nameFlow = @stageWin.flow() do # | flowz0r |
# @stageWin.para "Stage:"
# @stageWin.edit_line ""
end
@posFlow = @stageWin.flow() do
# @stageWin.flow do
# @stageWin.para "Positions: "
# @stageWin.click do
# # debug "Clicked the 'Positions' stack"
# @positions.each do | pos |
# # debug "\tPos: #{pos}"
# @mainApp.selectPosition(pos.name)
# end
# end
# end
# @positions.each do | pos |
# @stageWin.para << pos.name()
# end
end
# @nameLine = @liveComponentWin.edit_line do | e |
# @livePosition.name = e.text
# end
update()
end
# def livePosition=(position)
# # debug "SelectedPosition.livePosition="
# # @livePosition = position
# # update()
# end
def update()
@nameFlow.clear()
@nameFlow = @stageWin.flow() do # | flowz0r |
@stageWin.para @stageWin.link "#{@stagename}", :weight => 900
@stageWin.click do
# debug "Clicked the 'Positions' stack"
@mainApp.clearSelections()
posNames = []
@positions.each do | pos |
posNames << pos.name()
end
# debug "Selecting ..."
@mainApp.selectPosition(posNames)
# @positions.each do | pos |
# @mainApp.clearSelections()
# @mainApp.selectPosition(pos.name)
# end
end
end
@posFlow.clear()
@posFlow = @stageWin.flow() do
@stageWin.flow() do
@positions.each do | pos |
posLink = @stageWin.link(pos.name())
tehPara = @stageWin.para posLink
posLink.click do
# debug tehPara.inspect()
@mainApp.clearSelections()
@mainApp.selectPosition(tehPara.text())
end
end
end
end
end
end