Hi, I've been messing around with some lua scripting, and I've got a
question:
Is it ok to assume that whilst you can get lua function to fail and throw
up an error you can't crash Ion itself from Lua using badly formed
data?
The particular case I'm thinking of is
local swapTargetClient=nil
local swapTargetFrame=nil
function setSwapTarget(frame,client)
swapTargetFrame=frame
swapTargetClient=client
end
function swapWithSwapTarget(frame,client)
frame:attach(swapTargetClient,{switchto=true})
swapTargetFrame:attach(client,{switchto=false})
swapTargetClient=client;
end
which implements a swap clients function that keeps track of one of the
(window,frame) data to swap (so that you can swap windows in and out of a
particular frame by only having to call swapWithTarget with the client to
swap with, rather than having to specify both each time). But if the
swapTargetClient client or swapTargetFrame frame is accidentally closed
and then swapWithSwapTarget is called again, will this code just not work
(OK) or possibly crash the WM (in which case I'd want to figure out how to
bullet proof it).
Many thanks for any enlightenment,
--
__cheers, dave____________________________________________
homepages.inf.ed.ac.uk/dtweed/ tel: +44 131 651 3447
JCMB, Kings Buildings, Edinburgh fax: +44 131 651 3435
X wrote a book about this, which Y was carrying around for
a long time with little discernible effect -- John Baez