webmcp

diff framework/env/execute/inner.lua @ 0:9fdfb27f8e67

Version 1.0.0
author jbe/bsw
date Sun Oct 25 12:00:00 2009 +0100 (2009-10-25)
parents
children 1fcdd5c6f498
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/framework/env/execute/inner.lua	Sun Oct 25 12:00:00 2009 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +--[[--
     1.5 +execute.inner()
     1.6 +
     1.7 +It is MANDATORY to call this function once in each filter of a WebMCP application. Calling execute.inner() calls the next filter in the filter chain, or the view or action, if there are no more filters following. Code executed BEFORE calling this function is executed BEFORE the view or action, while code executed AFTER calling this function is executed AFTER the view of action.
     1.8 +
     1.9 +--]]--
    1.10 +
    1.11 +function execute.inner()
    1.12 +  local stack = execute._wrap_stack
    1.13 +  local pos = #stack
    1.14 +  if pos == 0 then
    1.15 +    error("Unexpected call of execute.inner().")
    1.16 +  end
    1.17 +  local inner_func = stack[pos]
    1.18 +  if not inner_func then
    1.19 +    error("Repeated call of execute.inner().")
    1.20 +  end
    1.21 +  stack[pos] = false
    1.22 +  inner_func()
    1.23 +end

Impressum / About Us