disabled spurious debug output
This commit is contained in:
parent
2c2f058642
commit
bd54d37687
4 changed files with 36 additions and 5 deletions
31
examples/gtk3/glisttest.nim
Normal file
31
examples/gtk3/glisttest.nim
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# nim c --gc:arc glisttest.nim
|
||||
import gintro/[gtk, glib, gobject, gio]
|
||||
|
||||
proc buttonClicked (button: Button) =
|
||||
button.label = utf8Strreverse(button.label, -1)
|
||||
|
||||
proc appActivate (app: Application) =
|
||||
let window = newApplicationWindow(app)
|
||||
window.title = "GNOME Button"
|
||||
window.defaultSize = (250, 50)
|
||||
let button = newButton("Click Me")
|
||||
window.add(button)
|
||||
#button.connect("clicked", buttonClicked)
|
||||
let ch = window.getChildren # glist to Nim seq test
|
||||
echo ch.len
|
||||
echo ch[0] == button
|
||||
echo cast[int](ch[0].impl)
|
||||
echo cast[int](button.impl)
|
||||
echo ch[0] is Button
|
||||
echo ch[0] of Button
|
||||
Button(ch[0]).connect("clicked", buttonClicked)
|
||||
#button.connect("clicked", buttonClicked)
|
||||
window.showAll
|
||||
|
||||
proc main =
|
||||
let app = newApplication("org.gtk.example")
|
||||
connect(app, "activate", appActivate)
|
||||
discard app.run
|
||||
|
||||
main()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue