load to prefs added

This commit is contained in:
p.kosyh 2010-07-24 11:50:56 +00:00
parent d6f6f013c0
commit 148d3cf631

View file

@ -1,12 +1,15 @@
prefs = obj {
nam = 'preferences',
system_type = true,
ini = function(s)
load = function(s)
local name = get_savepath() .. '/prefs';
local f, err = loadfile(name);
if not f then return nil end
f();
end,
ini = function(s)
return s:load()
end,
store = function(s)
local name = get_savepath() .. '/prefs';
local h = stead.io.open(name,"w");