TABLE OF CONTENTS


::pwtk::input::pop

SYNOPSIS

proc ::pwtk::input::pop {} {

PURPOSE

The "pop" proc for the input data & state stack.

SEE ALSO

For more explanation see ::pwtk::input::push

SOURCE

    variable stack 
    variable stackLevel

    if { ! [info exists stackLevel] || $stackLevel < 1 } {
        pwtk::error "cannot pop an empty stack"
    }

    incr stackLevel -1

    set data [lindex $stack end]
    set stack [lrange $stack 0 end-1]

    load_state $data
}