Skip to content

UiBuilder troubles #26

Answered by bailuk
matytyma asked this question in Q&A
Discussion options

You must be logged in to vote

A GTK application needs an application Window. It's a GTK Api thing.
I'm not exactly sure what the correct way is to set an application window in this case but I've managed to run your example by adding app.addWindow(window)

fun main(args: Array<String>) {
    val app = Application("dev.matytyma.DevTools", ApplicationFlags.FLAGS_NONE)
    app.onActivate {
        val builder = UiBuilder.fromResource("/window.ui")
        val window = Window(builder.getObject("window"))
        app.addWindow(window)
        window.show()
    }
   exitProcess(app.run(args.size, Strs(args)))
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by matytyma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants