Roman Hubacek, 02.05.2006 09:38:
Hi,
I think the easiest solution is to replace out such items. I've added
three string.gsub lines in the script and it seems to work fine:
function openPasFromDpr2()
local dfm = props['FilePath']
local path = props['FileDir'] --without trailing /\
local file = editor:textrange(0, editor.Length)
for uses in string.gfind(file, "uses.-;") do
uses = string.gsub(uses,"//.-\n","")
uses = string.gsub(uses,"{.-}","")
uses = string.gsub(uses,"%(%*.-%*%)","")
for c in string.gfind(uses, "\'([^\']*)\'") do
scite.Open(path .. '\\' .. c)
end
end
scite.Open(dfm)
end
-- regards Roman
Thank you very much roman. Now it works perfect ;)
for those who are interested i've changed this function to allow
absolute paths:
function openPasFromDpr()
local path = props['FileDir'] --without trailing /\
local file = props['FilePath'] --the projectfile used for changing
back to this buffer
local text = editor:textrange(0, editor.Length)
for uses in string.gfind(text, "uses.-;") do
uses = string.gsub(uses,"//.-\n","")
uses = string.gsub(uses,"{.-}","")
uses = string.gsub(uses,"%(%*.-%*%)","")
for c in string.gfind(uses, "\'([^\']*)\'") do
if not (string.gfind(c,":")) then
c=path .. '\\' .. c
end
scite.Open(c)
end
end
scite.Open(file)
end
Frank
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest