summaryrefslogtreecommitdiff
path: root/area.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-29 11:07:14 -0700
committerJeff Carr <[email protected]>2019-05-29 11:07:14 -0700
commit5a24461b59b49f622283951e1891559f6323a42d (patch)
tree07724389e4e73f86657ff5364e9047c3ab8b205d /area.go
parentbe2a69804a5b8823d450ec5a478766c3d8f4acac (diff)
fix crash
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'area.go')
-rw-r--r--area.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/area.go b/area.go
index 1cb8e67..62058d2 100644
--- a/area.go
+++ b/area.go
@@ -23,6 +23,7 @@ func findFB(button *ButtonMap) *ButtonMap {
func makeSplashArea() *AreaHandler {
// make this button just to get the default font (but don't display the button)
// There should be another way to do this (?)
+ myAH = new(AreaHandler)
newB := CreateFontButton("AREA")
myAH.FontButton = newB.FB
@@ -38,7 +39,7 @@ func makeSplashArea() *AreaHandler {
tmp = findFB(newB)
log.Println("makeSplashArea() tmp =", tmp, "newB", newB)
- Data.AllButtons[1].AH = &myAH
+ Data.AllButtons[1].AH = myAH
time.Sleep(200 * time.Millisecond)
tmp = findFB(newB)
@@ -61,7 +62,7 @@ func makeSplashArea() *AreaHandler {
} else {
log.Println("NOT DEBUGGING AREA mhAH.Button =", myAH.Button)
}
- return &myAH
+ return myAH
}
func appendWithAttributes(newText *ui.AttributedString, what string, attrs ...ui.Attribute) {
@@ -94,8 +95,9 @@ func (ah AreaHandler) MouseEvent(a *ui.Area, me *ui.AreaMouseEvent) {
}
if (me.Up == 1) {
log.Println("GOT MOUSE UP")
- log.Println("GOT MOUSE UP")
- log.Println("GOT MOUSE UP")
+ // log.Println("GOT MOUSE UP ah", ah)
+ log.Println("GOT MOUSE UP ah.FontButton =", ah.FontButton)
+ log.Println("GOT MOUSE UP ah.Button =", ah.Button)
mouseClick(ah.Button)
}
}