procedure TMainLogicModule_jsmcc.AddEventLog1(Logstr: string);
begin
with FormMain_jsmcc do
begin
ValueListEditor2.Row:=1;
ValueListEditor2.InsertRow(FormatDateTime('yyyy-mm-dd hh:nn:ss',now()),Logstr,False);
end;
end;procedure TMainLogicModule_jsmcc.DOAddEventLog1(Sender: TObject);
var
response:string;
begin
response:='1234567';
with FormMain_jsmcc do
if Sender=FormMain_jsmcc.ButtonNetCall then
begin
AddEventLog1(response);
end;
end;
我想要的效果是,在按钮ButtonNetCall按了之后,就响应AddEventLog1把字符串送到ValueListEditor2里面去,程序可以运行,没有报错,但是看不到我要的结果,也就是运行之后ValueListEditor2里面没有数据,经理说是没有抛出事件还是没有响应事件什么的,具体的我不是太懂,求救高手,跪谢,有分相送!
begin
with FormMain_jsmcc do
begin
ValueListEditor2.Row:=1;
ValueListEditor2.InsertRow(FormatDateTime('yyyy-mm-dd hh:nn:ss',now()),Logstr,False);
end;
end;procedure TMainLogicModule_jsmcc.DOAddEventLog1(Sender: TObject);
var
response:string;
begin
response:='1234567';
with FormMain_jsmcc do
if Sender=FormMain_jsmcc.ButtonNetCall then
begin
AddEventLog1(response);
end;
end;
我想要的效果是,在按钮ButtonNetCall按了之后,就响应AddEventLog1把字符串送到ValueListEditor2里面去,程序可以运行,没有报错,但是看不到我要的结果,也就是运行之后ValueListEditor2里面没有数据,经理说是没有抛出事件还是没有响应事件什么的,具体的我不是太懂,求救高手,跪谢,有分相送!
下边应该响应不到的
with FormMain_jsmcc do
begin
ValueListEditor2.Row:=1;
ValueListEditor2.InsertRow(FormatDateTime('yyyy-mm-dd hh:nn:ss',now()),Logstr,False);
end;
不可以吗?
begin
showmessage(response);//看看能执行到这句吗,不能就处理第一句(if Sender=FormMain_jsmcc.ButtonNetCall then)
AddEventLog1(response);
end;
另外你可以加断点看代码怎么执行的