对象没有创建,居然可以访问?
var
FormSelectPrintItem: TFormSelectPrintItem;
Kind:String;
StrType1,StrTypeDB2:TStringList;//应该算是全局变量吧?
implementation
{$R *.dfm}
function ShowFormSelectPrintItem(Dataset:TDataset;Kind:String;StrType:TStringList;StrTypeDB:TStringList): Boolean ;
var
test:String;
begin
//SelectPrintItem_Frm.StrType1:=TStringList.Create;
SelectPrintItem_Frm.StrTypeDB2:=TStringList.Create;
SelectPrintItem_Frm.StrType1:=StrType;
test:=SelectPrintItem_Frm.StrType1.text;//没创建SelectPrintItem_Frm.StrType1,用SelectPrintItem_Frm.StrType1.text居然能够运行,不出现异常,不太明白???