Skip to content

Commit 5c34b68

Browse files
committed
Fix examples and tutorials
1 parent 8936ade commit 5c34b68

File tree

13 files changed

+45
-14
lines changed

13 files changed

+45
-14
lines changed

examples/chat/client/client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ func main() {
1717
thrust.InitLogger()
1818
thrust.Start()
1919

20-
thrustWindow := thrust.NewWindow(fmt.Sprintf("http://127.0.0.1:%d", *port), nil)
20+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
21+
RootUrl: fmt.Sprintf("http://127.0.0.1:%d", *port),
22+
})
2123
thrustWindow.Show()
2224
thrustWindow.Focus()
2325
// BLOCKING - Dont run before youve excuted all commands you want first.

examples/chat/server/server.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ func main() {
145145

146146
thrust.InitLogger()
147147
thrust.Start()
148-
thrustWindow := thrust.NewWindow(fmt.Sprintf("http://127.0.0.1:%d", *port), nil)
148+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
149+
RootUrl: fmt.Sprintf("http://127.0.0.1:%d", *port),
150+
})
149151
thrustWindow.Show()
150152
thrustWindow.Focus()
151153

examples/jankybrowser/browser.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ func main() {
3434
thrust.InitLogger()
3535
thrust.Start()
3636

37-
thrustWindow := thrust.NewWindow(fmt.Sprintf("http://127.0.0.1:%d", *port), nil)
37+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
38+
RootUrl: fmt.Sprintf("http://127.0.0.1:%d", *port),
39+
})
3840
thrustWindow.Show()
3941
thrustWindow.Focus()
4042

tutorials/advanced_session/advanced_session.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ func main() {
3232
Modified basic_window, where we provide, a session argument
3333
to NewWindow.
3434
*/
35-
thrustWindow := thrust.NewWindow("http://breach.cc/", mysession)
35+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
36+
RootUrl: "http://breach.cc/",
37+
Session: mysession,
38+
})
3639
thrustWindow.Show()
3740
thrustWindow.Maximize()
3841
thrustWindow.Focus()

tutorials/advanced_window_devtools/advanced_window_devtools.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ func main() {
1313
thrust.SetProvisioner(tutorial.NewTutorialProvisioner())
1414
// thrust.Start() must always come before any bindings are created.
1515
thrust.Start()
16-
thrustWindow := thrust.NewWindow("http://breach.cc/", nil)
16+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
17+
RootUrl: "http://breach.cc/",
18+
})
1719
thrustWindow.Show()
1820
thrustWindow.Maximize()
1921
thrustWindow.Focus()

tutorials/basic_menu/basic_menu.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ func main() {
1111
thrust.SetProvisioner(tutorial.NewTutorialProvisioner())
1212
// thrust.Start() must always come before any bindings are created.
1313
thrust.Start()
14-
thrustWindow := thrust.NewWindow("http://breach.cc/", nil)
14+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
15+
RootUrl: "http://breach.cc/",
16+
})
1517
thrustWindow.Show()
1618
thrustWindow.Maximize()
1719
thrustWindow.Focus()

tutorials/basic_menu_events/basic_menu_events.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ func main() {
1515
thrust.SetProvisioner(tutorial.NewTutorialProvisioner())
1616
// thrust.Start() must always come before any bindings are created.
1717
thrust.Start()
18-
thrustWindow := thrust.NewWindow("http://breach.cc/", nil)
18+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
19+
RootUrl: "http://breach.cc/",
20+
})
1921
thrustWindow.Show()
2022
thrustWindow.Maximize()
2123
thrustWindow.Focus()

tutorials/basic_multiple_windows/basic_multiple_windows.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ func main() {
1212
// thrust.Start() must always come before any bindings are created.
1313
thrust.Start()
1414

15-
thrustWindow := thrust.NewWindow("http://breach.cc/", nil)
15+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
16+
RootUrl: "http://breach.cc/",
17+
})
1618
thrustWindow.Show()
1719
thrustWindow.Maximize()
1820
thrustWindow.Focus()
1921

20-
thrustWindow2 := thrust.NewWindow("http://google.com/", nil)
22+
thrustWindow2 := thrust.NewWindow(thrust.WindowOptions{
23+
RootUrl: "http://google.com/",
24+
})
2125
thrustWindow2.Show()
2226
thrustWindow2.Focus()
2327

tutorials/basic_remote_messaging/basic_remote_messaging.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ func main() {
2222
// thrust.Start() must always come before any bindings are created.
2323
thrust.Start()
2424

25-
thrustWindow := thrust.NewWindow("http://localhost:8080/", nil)
25+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
26+
RootUrl: "http://localhost:8080/",
27+
})
2628
thrustWindow.Show()
2729
thrustWindow.Maximize()
2830
thrustWindow.Focus()

tutorials/basic_session/basic_session.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ func main() {
2525
Modified basic_window, where we provide, a session argument
2626
to NewWindow.
2727
*/
28-
thrustWindow := thrust.NewWindow("http://breach.cc/", mysession)
28+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
29+
RootUrl: "http://breach.cc/",
30+
Session: mysession,
31+
})
2932
thrustWindow.Show()
3033
thrustWindow.Maximize()
3134
thrustWindow.Focus()

tutorials/basic_webserver_app/basic_webserver_app.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ func main() {
2222

2323
mysession := thrust.NewSession(false, false, "cache")
2424

25-
thrustWindow := thrust.NewWindow("http://localhost:8080/", mysession)
25+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
26+
RootUrl: "http://localhost:8080/",
27+
Session: mysession,
28+
})
2629
thrustWindow.Show()
2730
thrustWindow.Maximize()
2831
thrustWindow.Focus()

tutorials/basic_window/basic_window.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ func main() {
1515
// thrust.Start() must always come before any bindings are created.
1616
thrust.Start()
1717

18-
thrustWindow := thrust.NewWindow("http://breach.cc/", nil)
18+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
19+
RootUrl: "http://breach.cc/",
20+
})
1921
thrustWindow.Show()
2022
thrustWindow.Maximize()
2123
thrustWindow.Focus()

tutorials/basic_window_events/basic_window_events.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ func main() {
2424
// thrust.Start() must always come before any bindings are created.
2525
thrust.Start()
2626

27-
thrustWindow := thrust.NewWindow("http://breach.cc/", nil)
27+
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
28+
RootUrl: "http://breach.cc/",
29+
})
2830
thrustWindow.Show()
2931

3032
/*

0 commit comments

Comments
 (0)