File: 001.lua

package info (click to toggle)
lua-gtk 0.9%2B20100528-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,176 kB
  • ctags: 1,934
  • sloc: ansic: 9,571; sh: 373; makefile: 241
file content (13 lines) | stat: -rwxr-xr-x 272 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /usr/bin/env lua
require "gtk"

-- test that arbitrary values can be stored in a widget.

win = gtk.window_new(gtk.WINDOW_TOPLEVEL)
win._foo = 1
win._bar = "a string"
win._baz = { 1, 2, 3 }
assert(win._foo == 1)
assert(win._bar == "a string")
assert(win._baz[2] == 2)