jbe/bsw@0: --[[-- jbe/bsw@0: slot.select( jbe/bsw@0: slot_ident, -- name of a slot jbe/bsw@0: function() jbe/bsw@0: ... -- code to be executed using the named slot jbe/bsw@0: end jbe/bsw@0: ) jbe/bsw@0: jbe/bsw@0: This function executes code in a way that slot.put(...) and other functions write into the slot with the given name. Calls of slot.select may be nested. jbe/bsw@0: jbe/bsw@0: --]]-- jbe/bsw@0: jbe/bsw@0: function slot.select(slot_ident, block) jbe/bsw@0: local old_slot = slot._active_slot jbe/bsw@0: slot._active_slot = slot_ident jbe/bsw@0: block() jbe/bsw@0: slot._active_slot = old_slot jbe/bsw@0: end