Ticket #1194: Test.hs

File Test.hs, 0.6 kB (added by guest, 4 years ago)

Test new patch

Line 
1import Graphics.UI.Gtk as Gtk
2
3main = do
4  initGUI
5  window <- windowNew
6  nb <- notebookNew
7  entry1 <- entryNew
8  entry2 <- entryNew
9
10  set nb [ containerChild := entry1,
11           containerChild := entry2 ]
12
13  set window [ containerBorderWidth := 8,
14               windowTitle := "Crash Me",
15               containerChild := nb ]
16
17  -- apparently the widget in this signal can be null
18  let action = maybe (return ()) ((putStrLn =<<) . widgetGetName)
19  on nb setFocusChild action
20  onSetFocus window action
21  afterSetFocus window action
22
23  widgetGrabFocus entry1
24  notebookNextPage nb -- CRASH!
25
26  widgetShowAll window
27  mainGUI