I have solved this issue with help from madshi over at forum.madshi.net.
My solution involves the TMadExceptionHandler-component, and the event OnExceptionAction.
procedure TMainForm.MadExceptionHandler1ExceptAction(action: TExceptAction;
const exceptIntf: IMEException; var handled: Boolean);
var
cbSendData: INVCheckbox;
assistant: INVAssistant;
begin
if action = eaSendBugReport2 then
begin
assistant := exceptIntf.GetAssistant(exceptIntf.SendAssistant);
cbSendData := assistant.Forms[1].nvCheckBox('SendDataChk');
exceptIntf.AdditionalAttachments.Clear;
if (cbSendData.Checked) then
begin
//Add data files as attachments...
end;
end;
end;
One minor thing remains, and that is to enable/disable the checkbox on special occasions. Madshi tells me the proper way of doing that, is to register an actionhandler-callback with the assistant and check for an nvaItemEvent-action on the checkbox. I have not tried this yet.
-Vegar