-
Notifications
You must be signed in to change notification settings - Fork 6
/
stack_revRefactor_card_id_1119.livecodescript
85 lines (72 loc) · 3.05 KB
/
stack_revRefactor_card_id_1119.livecodescript
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
77
78
79
80
81
82
83
84
85
Script "stack_revRefactor_card_id_1119"
/*
# Name: card "Orphans" of stack "revRefactor"
# ID: card id 1119 of stack "revRefactor"
*/
on resizeStack
local tRect
constant kOrphanField = "fldOrphanList"
constant kOKButton = "Button_1"
constant kUndeclaredButton = "btnUndeclared"
constant kDuplicatesButton = "btnDupes"
constant kOrphansButton = "btnOrphans"
constant kParamsButton = "btnParams"
constant kHandlersButton = "btnHandlers"
lock screen
put the rect of field kOrphanField into tRect
put the left of this card + 20 into item 1 of tRect
put the right of this card - 20 into item 3 of tRect
put the bottom of this card - 50 into item 4 of tRect
set the rect of field kOrphanField to tRect
set the bottom of button kOKButton to the bottom of this card - 20
set the right of button kOKButton to the right of field kOrphanField
set the bottom of button kUndeclaredButton to the bottom of this card - 20
set the left of button kUndeclaredButton to the left of field kOrphanField
set the bottom of button kParamsButton to the bottom of this card - 20
set the left of button kParamsButton to the right of button kUndeclaredButton + 5
set the bottom of button kHandlersButton to the bottom of this card - 20
set the left of button kHandlersButton to the right of button kParamsButton
set the bottom of button kDuplicatesButton to the bottom of this card - 20
set the left of button kDuplicatesButton to the right of button kHandlersButton
set the bottom of button kOrphansButton to the bottom of this card - 20
set the left of button kOrphansButton to the right of button kDuplicatesButton
unlock screen
end resizeStack
on ShowOrHide pShow, pWhich
local tLineNumber
lock screen
put 1 into tLineNumber
repeat for each line tLine in field "fldOrphanList"
if pWhich is in tLine then
set the hidden of line tLineNumber of field "fldOrphanList" to not pShow
else
--set the hidden of line tLineNumber of field "fldOrphanList" to false
end if
add 1 to tLineNumber
end repeat
unlock screen
end ShowOrHide
command ShowAllLines
-- local tLineNumber
-- put 1 into tLineNumber
-- repeat for each line tLine in field "fldOrphanList"
-- set the hidden of line tLineNumber of field "fldOrphanList" to false
-- add 1 to tLineNumber
-- end repeat
set the hidden of line 1 to 1 of field "fldOrphanList" to false
end ShowAllLines
command HandleOptions
lock screen
ShowAllLines
ShowOrHide the hilite of button "btnParams", "unused parameter"
ShowOrHide the hilite of button "btnDupes", "duplicate"
ShowOrHide the hilite of button "btnHandlers", "unused function"
ShowOrHide the hilite of button "btnHandlers", "unused command"
ShowOrHide the hilite of button "btnHandlers", "unused getprop"
ShowOrHide the hilite of button "btnHandlers", "unused setprop"
ShowOrHide the hilite of button "btnOrphans", "orphan"
unlock screen
end HandleOptions
on closeStackRequest
hide this stack
end closeStackRequest