a generic interaction request ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

a generic interaction request ...

frank.schoenheit
Hi,

Perhaps I'm getting something wrong in the interaction handler API, but
in my understanding, what this API (or the current implementation) is
missing is some kind of "generic" request. That is, when I want to show
some arbitrary string to the user, together with a set of
yes/no/cancel/retry/OK buttons (defined by myself), then there's no way
to do this with the standard css.task.InteractionHandler implementation.

While it has an impressive list of requests it can handle (and the
documentation is not even up-to-date), all those requests are pretty
specialized.

In the most simple form, the functionality I have in mind would just be
giving the interaction handler implementation the responsibility for
arbitrary ClassifiedInteractionRequests. That is, after finding that the
request is not of a known/handled type, then at least do the generic
handling if it is a ClassifiedInteractionRequests: Take the Message
string, open a message box with buttons according to the available
continuations, and display that.

Well, for those saying that Exception.Message is not for being displayed
to the end-user, let's have a
  exception GenericInteractionRequest : ClassifiedInteractionRequest
  {
    string DisplayMessage;
  }


I'd happily implement this, but I'm interested in opinions why we don't
have this, yet - does it somehow contradict the intention of the
interaction handler, and I just do not grasp it? Or did just nobody ever
bother?

Opinions?

Thanks & Ciao
Frank

--
- Frank Schönheit, Software Engineer         [hidden email] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: a generic interaction request ...

stephan.bergmann
On 02/15/10 20:11, Frank Schoenheit, Sun Microsystems Germany wrote:
> Perhaps I'm getting something wrong in the interaction handler API, but
> in my understanding, what this API (or the current implementation) is
> missing is some kind of "generic" request. That is, when I want to show
> some arbitrary string to the user, together with a set of
> yes/no/cancel/retry/OK buttons (defined by myself), then there's no way
> to do this with the standard css.task.InteractionHandler implementation.

The intention behind the interaction handling mechanism is that
interaction requests can be handled programmatically.  Displaying
something to the user is, in a sense, only a last resort activity of an
interaction handler.  Hence, interaction requests need to carry rich
information to make it possible to meaningfully handle them
programmatically.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: a generic interaction request ...

frank.schoenheit
Hi Stephan,

> The intention behind the interaction handling mechanism is that
> interaction requests can be handled programmatically.  Displaying
> something to the user is, in a sense, only a last resort activity of an
> interaction handler.  Hence, interaction requests need to carry rich
> information to make it possible to meaningfully handle them
> programmatically.

I see your point, but - the first sentence from
http://api.openoffice.org/docs/common/ref/com/sun/star/task/InteractionHandler.html
is "An interaction request handler that lets the user handle a number of
well known requests via GUI dialogs". This sounds to me like the main
intention of the InteractionHandler is, well, displaying GUI dialogs ...?

Ciao
Frank


--
- Frank Schönheit, Software Engineer         [hidden email] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: a generic interaction request ...

stephan.bergmann
On 02/16/10 10:59, Frank Schoenheit, Sun Microsystems Germany wrote:

>> The intention behind the interaction handling mechanism is that
>> interaction requests can be handled programmatically.  Displaying
>> something to the user is, in a sense, only a last resort activity of an
>> interaction handler.  Hence, interaction requests need to carry rich
>> information to make it possible to meaningfully handle them
>> programmatically.
>
> I see your point, but - the first sentence from
> http://api.openoffice.org/docs/common/ref/com/sun/star/task/InteractionHandler.html
> is "An interaction request handler that lets the user handle a number of
> well known requests via GUI dialogs". This sounds to me like the main
> intention of the InteractionHandler is, well, displaying GUI dialogs ...?

It is just the specific com.sun.star.task.InteractionHandler service
implementation of com.sun.star.task.XInteractionHandler that is GUI
oriented.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: a generic interaction request ...

frank.schoenheit
Hi Stephan,

> It is just the specific com.sun.star.task.InteractionHandler service
> implementation of com.sun.star.task.XInteractionHandler that is GUI
> oriented.

Okay, so extended this specific service which a possibility to display
arbitrary messages to the user would be legitimate?

Ciao
Frank

--
- Frank Schönheit, Software Engineer         [hidden email] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: a generic interaction request ...

stephan.bergmann
On 02/16/10 12:06, Frank Schoenheit, Sun Microsystems Germany wrote:
>> It is just the specific com.sun.star.task.InteractionHandler service
>> implementation of com.sun.star.task.XInteractionHandler that is GUI
>> oriented.
>
> Okay, so extended this specific service which a possibility to display
> arbitrary messages to the user would be legitimate?

Probably, if you need that.  But you should introduce the sketched
GenericInteractionRequest for that, not handle arbitrary
ClassifiedInteractionRequest derivations.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]