INNER CODE UNIT · Go
launched
progrium/darwinkit · macos/_examples/layout/main.go:19
func launched(app appkit.Application, delegate *appkit.ApplicationDelegate) {
app.SetActivationPolicy(appkit.ApplicationActivationPolicyRegular)
app.ActivateIgnoringOtherApps(true)
w := appkit.NewWindowWithSize(600, 400)
objc.Retain(&w)
w.SetTitle("Test Layout")
label := appkit.NewLabel("label")
mdButton := appkit.NewButtonWithTitle("modal dialog")
dButton := appkit.NewButtonWithTitle("dialog")
textView := appkit.TextViewClass.ScrollableTextView()
action.Set(mdButton, func(sender objc.Object) {
d := widgets.NewDialog(400, 300)
d.SetView(appkit.NewLabel("test modal dialog"))
// if d.RunModal() == appkit.ModalResponseOK {
// fmt.Println("ok!")