Thanks,
I tried to assign an OnAction-event, but found it easier to use the ExceptAction-event on the VCL component.
I have a small problem, though.
- Code: Select all
procedure TMainForm.MadExceptionHandler1ExceptAction(action: TExceptAction;
const exceptIntf: IMEException; var handled: Boolean);
var
cbSendData: INVCheckbox;
zipfile: String;
assistant: INVAssistant;
begin
if (action = eaSendBugReport) then
begin
assistant := exceptIntf.GetAssistant(exceptIntf.SendAssistant);
cbSendData := assistant.Forms[1].nvCheckBox('SendDataChk');
cbSendData.Enabled := HasData;
cbSendData.Checked := HasData;
end
else if action = eaSendBugReport2 then
begin
assistant := exceptIntf.GetAssistant(exceptIntf.SendAssistant);
cbSendData := assistant.Forms[1].nvCheckBox('SendDataChk');
exceptIntf.AdditionalAttachments.Clear;
if cbSendData.Checked then
exceptIntf.AdditionalAttachments.Add(datafile);
end;
end;
When action equals eaSendBugReport, I disable the checkbox if no data exists, but when the assistant pops up, the checkbox is still enabled.
Do you have a solution for this?
regards,
-Vegar