From ca4e2b239114d84a78f4dcbb69f8d0f5424ce031 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Tue, 17 Nov 2020 21:44:48 +1100 Subject: [PATCH] Cosmetic changes --- .../frontend/src/pages/System/Platform/code.go | 4 ++-- .../kitchensink/frontend/src/pages/events/On/code.go | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/v2/test/kitchensink/frontend/src/pages/System/Platform/code.go b/v2/test/kitchensink/frontend/src/pages/System/Platform/code.go index 1b08cc7bf..89c8158cc 100644 --- a/v2/test/kitchensink/frontend/src/pages/System/Platform/code.go +++ b/v2/test/kitchensink/frontend/src/pages/System/Platform/code.go @@ -2,13 +2,13 @@ package main import ( wails "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/internal/runtime" ) type MyStruct struct { runtime *wails.Runtime } +// ShowPlatformHelp shows specific help for the platform func (l *MyStruct) ShowPlatformHelp() { - l.runtime.Browser.Open("https://wails.app/gettingstarted/" + runtime.System.Platform()) + l.runtime.Browser.Open("https://wails.app/gettingstarted/" + l.runtime.System.Platform()) } diff --git a/v2/test/kitchensink/frontend/src/pages/events/On/code.go b/v2/test/kitchensink/frontend/src/pages/events/On/code.go index d712ab702..44a6d657e 100644 --- a/v2/test/kitchensink/frontend/src/pages/events/On/code.go +++ b/v2/test/kitchensink/frontend/src/pages/events/On/code.go @@ -1,17 +1,26 @@ package main -import wails "github.com/wailsapp/wails/v2" +import ( + "fmt" + + wails "github.com/wailsapp/wails/v2" +) type MyStruct struct { runtime *wails.Runtime } +type Notes struct { + lines []string +} + func (m *MyStruct) WailsInit(runtime *wails.Runtime) error { runtime.Events.On("notes updated", func(optionalData ...interface{}) { // Get notes notes := optionalData[0].(*Notes) // Save the notes to disk + fmt.Printf("%+v\n", notes) }) m.runtime = runtime