我的程序中配置程序有问题(100分)

  • 主题发起人 主题发起人 tab916
  • 开始时间 开始时间
T

tab916

Unregistered / Unconfirmed
GUEST, unregistred user!
ver lista:Tstrings;
begin
//session.GetAliasNames(lista);
//if lista.IndexOf('rk')= -1 then
//session.AddStandardAlias('rk',extractfiledir(application.exename)+'data','Paradox');
//session.GetAliasNames(lista);
//if lista.IndexOf('pass')= -1 then
//session.AddStandardAlias('pass',extractfiledir(application.exename)+'system','Paradox');
//if fileexists(extractfiledir(application.exename)+'system/tree')=True then
//treeview1.LoadFromFile(extractfiledir(application.exename)+'system/tree');
//table1.DatabaseName :='rk';
//table1.FieldByName('xuesheng.db');
//table2.DatabaseName :='rk';
//table2.FieldByName('password.db');
//table1.Active:=true;
//table2.Active:=true;
end;
 
var
lista:Tstrings;
begin
Lista:=TstringList.create;
session.GetAliasNames(lista);
if lista.IndexOf('rk')= -1 then
session.AddStandardAlias('rk',extractfiledir(application.exename)+'/data','Paradox');
session.GetAliasNames(lista);
if lista.IndexOf('pass')= -1 then
session.AddStandardAlias('pass',extractfiledir(application.exename)+'/system','Paradox');
if fileexists(extractfiledir(application.exename)+'/system/tree')=True then
treeview1.LoadFromFile(extractfiledir(application.exename)+'/system/tree');
table1.DatabaseName :='rk';
table1.tableName('xuesheng.db');
table2.DatabaseName :='rk';
table2.tableName('password.db');
table1.Active:=true;
table2.Active:=true;
lista.free;
end;
 
//add this
session.saveconfigfile;
lista.free;
end;

 
arm:
你好!为什么要加--->lista.free;
 
动态创建类以后要释放
 
arm:
谢谢!
 
接受答案了.
 
后退
顶部