How to customize Assitants using Exception Filter?
How to customize Assitants using Exception Filter?
I was hoping to use the Exception Filter to create unique Assistant criteria for each Filter.
To keep it simple:
Filter1 is setup to only prompt for Contact Info.
It prompts with the correct assistant but never continues to Mailto, this is either wrong or I am missing something..
To keep it simple:
Filter1 is setup to only prompt for Contact Info.
It prompts with the correct assistant but never continues to Mailto, this is either wrong or I am missing something..
Re: How to customize Assitants using Exception Filter?
The assistant's don't include mailing functionality. The assistant's are just GUIs that add information to the IMEException interface. If you want the bug report to be sent, that needs to be explicitly triggered somehow.
Can you tell me a bit more about what exactly you want to achieve?
Can you tell me a bit more about what exactly you want to achieve?
Re: How to customize Assitants using Exception Filter?
Sure, I added a "Tell Us" button to a dialog that I show when an exception occurs within a known area.madshi wrote:The assistant's don't include mailing functionality. The assistant's are just GUIs that add information to the IMEException interface. If you want the bug report to be sent, that needs to be explicitly triggered somehow.
Can you tell me a bit more about what exactly you want to achieve?
Lets take db creation as an example. While the db is being created any errors are already posted to my log file and that file is included in the MAD Error submission so I really don't need to have the user add "Just Started the App" as an explanation of what he was doing. It would be best if the Assistant for ETellUS does not prompt for that info.
Re: How to customize Assitants using Exception Filter?
So it seems that when the user pressese the "Tell Us" button, you manually raise an ETellUs exception?
So what do you want to happen exactly when the user processes the "Tell Us" button? And how does that differ from what you want to happen for normal exceptions?
So what do you want to happen exactly when the user processes the "Tell Us" button? And how does that differ from what you want to happen for normal exceptions?
Re: How to customize Assitants using Exception Filter?
The default assistant is setup to check email and ask for input, I want to skip the input on ETellUs.madshi wrote:So it seems that when the user pressese the "Tell Us" button, you manually raise an ETellUs exception?
So what do you want to happen exactly when the user processes the "Tell Us" button? And how does that differ from what you want to happen for normal exceptions?
Re: How to customize Assitants using Exception Filter?
That does not really answer my question fully. I'm only getting half the picture here.
Again: What do you want to happen exactly when the user processes the "Tell Us" button?
Again: What do you want to happen exactly when the user processes the "Tell Us" button?
Re: How to customize Assitants using Exception Filter?
Hmm, OK then.. Obviously the Filter isn't doing what I would expect it to do so I have already ditched that.madshi wrote:That does not really answer my question fully. I'm only getting half the picture here.
Again: What do you want to happen exactly when the user processes the "Tell Us" button?
Now ETellUS does exactly what all other unhandled exceptions do but I don't what the Details Form to show for that exception.
All Assistants use:
- ContactForm
- DetailsForm
I want to skip the DetailsForm for ETellUs but continue normally through the ExceptionHandlers.
Re: How to customize Assitants using Exception Filter?
I'm sorry, but you're still not answering my question. Your first sentence tells me what you did so far. Your second sentence tells me what you *don't* want. Your last sentence tells me what you want to skip. But not a single of your sentences tells me what exactly you want to happen when the user presses that button. You're making it really hard for me. I asked a very specific and very simple question, and I require an answer which is to the point of what I asked.
Let me give you some examples of answers that would properly answer my question:
1) When the user presses that button, I want the exception box to appear. And when the user then presses the "send bug report" button, I want the normal sending, but without the DetailsForm.
2) When the user presses that button, I want the send assistant to show up immediately (no exception box), but without the DetailsForm.
3) When the user presses that button, I want to format C:\.
4) When the user presses that button, I want [...].
Right now I don't know if it's 1) or 2) or something else you want.
Let me give you some examples of answers that would properly answer my question:
1) When the user presses that button, I want the exception box to appear. And when the user then presses the "send bug report" button, I want the normal sending, but without the DetailsForm.
2) When the user presses that button, I want the send assistant to show up immediately (no exception box), but without the DetailsForm.
3) When the user presses that button, I want to format C:\.
4) When the user presses that button, I want [...].
Right now I don't know if it's 1) or 2) or something else you want.
Re: How to customize Assitants using Exception Filter?
1) When the user presses that button, I want the send assistant to show up immediately (no exception box), but without the DetailsForm.madshi wrote:I'm sorry, but you're still not answering my question. Your first sentence tells me what you did so far. Your second sentence tells me what you *don't* want. Your last sentence tells me what you want to skip. But not a single of your sentences tells me what exactly you want to happen when the user presses that button. You're making it really hard for me. I asked a very specific and very simple question, and I require an answer which is to the point of what I asked.
Let me give you some examples of answers that would properly answer my question:
1) When the user presses that button, I want the exception box to appear. And when the user then presses the "send bug report" button, I want the normal sending, but without the DetailsForm.
2) When the user presses that button, I want the send assistant to show up immediately (no exception box), but without the DetailsForm.
3) When the user presses that button, I want to format C:\.
4) When the user presses that button, I want [...].
Right now I don't know if it's 1) or 2) or something else you want.
2) Then I want to continue as a normal exception would by eventually triggering the ExceptAction handler with eaSendBugReport2
Re: How to customize Assitants using Exception Filter?
Do you absolutely need part 2)?
What you could instead of raising a dummy exception:
Right now I'm not sure if doing this also does part 2). Could be.
What you could instead of raising a dummy exception:
Code: Select all
with NewException() do
begin
SendAssistant := 'TellUsAssistant';
SendBugReport();
end;
Re: How to customize Assitants using Exception Filter?
It doesn't do part 2 but first things first:madshi wrote:Do you absolutely need part 2)?
What you could instead of raising a dummy exception:
Right now I'm not sure if doing this also does part 2). Could be.Code: Select all
with NewException() do begin SendAssistant := 'TellUsAssistant'; SendBugReport(); end;
From MES file
Code: Select all
Assistant4=ContactOnly|Send Assistant|ContactForm
Code: Select all
with NewException() do begin
SendAssistant := 'ContactOnly';
SendBugReport();
end;
Re: How to customize Assitants using Exception Filter?
The other solution would be to stick with the ETellUs exception, and then in an exception handler set "exceptIntf.ShowSettings := ssNothing". This hides the exception box. And then "exceptIntf.SendAssistant := '...'" should switch the assistant. Do you have automatic sending activated? I'm not completely sure if it gets executed if you hide the exception box, but I think it should.
Not sure why setting the SendAssistant doesn't seem to work for you. Does it work if you switch to one of the other assistants instead?
Not sure why setting the SendAssistant doesn't seem to work for you. Does it work if you switch to one of the other assistants instead?
Re: How to customize Assitants using Exception Filter?
None of this works, pretty much retracing my steps when I tried to get this to work earlier with Filters.madshi wrote:The other solution would be to stick with the ETellUs exception, and then in an exception handler set "exceptIntf.ShowSettings := ssNothing". This hides the exception box. And then "exceptIntf.SendAssistant := '...'" should switch the assistant. Do you have automatic sending activated? I'm not completely sure if it gets executed if you hide the exception box, but I think it should.
First none of that does anything with NewException() I needed to raise ETellUS, then ssNothing does nothing, ssAssistant brings up the full exception box but does display the correct Assistant after that. Of course that doesn't help me..
So unless you actually have a "functioning" way to do this I am just going to leave it..
I used PrintAssistant and same deal.madshi wrote: Not sure why setting the SendAssistant doesn't seem to work for you. Does it work if you switch to one of the other assistants instead?
Re: How to customize Assitants using Exception Filter?
ssNothing doing nothing, is that when using raise ETellUs, or when using NewException?
Re: How to customize Assitants using Exception Filter?
New Project nothing but default settings:madshi wrote:ssNothing doing nothing, is that when using raise ETellUs, or when using NewException?
Code: Select all
procedure TForm1.btRaiseClick(Sender: TObject);
begin
raise Exception.Create('Error Message');
end;
procedure TForm1.MadExceptionHandler1Exception(const exceptIntf: IMEException; var handled: Boolean);
begin
exceptIntf.ShowSetting := ssNothing;
exceptIntf.SendAssistant := 'PrintAssistant';
end;