Reimplement text edit scrolling in C++

* And update some corelib APIs
This commit is contained in:
Eduardo Bart
2013-01-16 14:20:17 -02:00
parent a3fcf2e8e7
commit 2e75380218
21 changed files with 540 additions and 295 deletions

View File

@@ -228,10 +228,16 @@ function resolvepath(filePath, depth)
end
end
function toboolean(str)
str = str:trim():lower()
if str == '1' or str == 'true' then
return true
function toboolean(v)
if type(v) == 'string' then
v = v:trim():lower()
if v == '1' or v == 'true' then
return true
end
elseif type(v) == 'number' then
if v == 1 then
return true
end
end
return false
end