Dialog closing without saving variabel - 28/03/08 08:07 PM
Code:
dialog pickachan { title "Pick a channel" size -1 -1 115 70 option dbu edit "", 1, 1 47 113 10, autohs %channel button "NRK1", 2, 1 1 37 12 button "NRK2", 3, 1 14 37 12 button "NRK3", 4, 1 27 37 12 button "TV2", 5, 39 1 37 12 button "TV2 Zebra", 6, 39 14 37 12 button "TVNORGE", 7, 77 27 37 12 button "TV3", 8, 77 1 37 12 button "FEM", 9, 77 14 37 12 button "TV2 Film", 10, 39 27 37 12 text "Custom:", 11, 1 39 25 8 button "Cancel", 13, 58 58 56 12, cancel button "Ok", 12, 1 58 56 12, ok } on *:dialog:pickachan:sclick:*:{ if ($did == 2) { set %channel NRK1 } if ($did == 3) { set %channel NRK2 } if ($did == 4) { set %channel NRK3 } if ($did == 5) { set %channel TV2 } if ($did == 6) { set %channel TV2 Zebra } if ($did == 7) { set %channel TVNORGE } if ($did == 8) { set %channel TV3 } if ($did == 9) { set %channel FEM } if ($did == 10) { set %channel TV2 Film } if ($did == 13) { halt } dialog -x pickachan }
This is a part of a bigger script, where this part is called up using "$dialog(pickachan,pickachan,-3)"
But when i click one of the buttons, the variable is not saved, the only thing that works is if i write a custom one.
The problem is proberly something around the "dialog -x pickachan" Any help is appreciated