[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

RE: [XaraXtreme-dev] interactive cancel of filter export action

Hello Sandro,

The code in XaraLX to handle errors from plugin filters is not complete.
It will display errors returned by the DoExport command (or output a
message saying that no message was set) but the handling of errors from
the PrepareExport command is not implemented.  I will implement this

You are basically doing the right thing though you should also output a
suitable message to stderr (prefixed with "ERROR: ").  The plugin filter
framework example includes functions for outputting warnings and errors.

We may change it in future so that the user doesn't see the error if
they have cancelled the export in which case the message will have to be
a specific one that XaraLX can detect and ignore.


-----Original Message-----
From: owner-dev@xxxxxxxxxxxxxxxx [mailto:owner-dev@xxxxxxxxxxxxxxxx] On
Behalf Of Sandro Sigala
Sent: 17 July 2006 14:03
To: dev@xxxxxxxxxxxxxx
Subject: [XaraXtreme-dev] interactive cancel of filter export action


I have a simple problem: let's suppose we have an export filter that
popups a
dialog box with a few settings and the classic "ok" and "cancel"
let's suppose that the user clicks on the "cancel" button. How can the
signal Xara that the operation was cancelled?

I supposed that something like system return value was sufficient, like:

int MyApp::OnRun()
	if (the_user_aborted_operation)
		return 1;
	return 0;	// Worked

but Xara complains with an empty error message when it gets the "1"
return value from the filter executable (screenshot attached).

By the way, I suggest to check the error message string (!str.IsEmpty())
before opening the message box because it's a bit confusing.