File: bug557960.py

package info (click to toggle)
newt 0.52.21-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,944 kB
  • sloc: ansic: 9,316; python: 713; makefile: 254; sh: 37; xml: 7
file content (30 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python

# bug557960: segfault on second call to SnackScreen.

from snack import *

s = SnackScreen()
g = Grid(1, 1)
ok = Button("Ok")
g.setField(ok, 0, 0)
s.gridWrappedWindow(g, "Ok")
F = Form()
F.add(ok)
res = F.run()
s.popWindow()
s.finish()

print "New screen"
s = SnackScreen()
# print "We do not get here if run in screen."
g = Grid(1, 1)
ok = Button("Ok")
g.setField(ok, 0, 0)
s.gridWrappedWindow(g, "segfaults in screen")
F = Form()
F.add(ok)
res = F.run()
s.popWindow()
s.finish()