Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #816

Re: TaskWindow -txt &xxxxxxxx

From Martin Wuerthner <spamtrap@mw-software.com>
Newsgroups comp.sys.acorn.programmer
Subject Re: TaskWindow -txt &xxxxxxxx
Date 2011-10-01 13:19 +0200
Organization MW Software
Message-ID <d309521b52.martin@bach.planiverse.com> (permalink)
References <3613761952.davehigton@dsl.pipex.com> <068f781952.martin@bach.planiverse.com> <4e853be3$0$831$e4fe514c@dreader28.news.xs4all.nl> <5fdd061b52.davehigton@dsl.pipex.com> <4e868de7$0$18793$ba4acef3@reader.news.orange.fr>

Show all headers | View raw


In message <4e868de7$0$18793$ba4acef3@reader.news.orange.fr>
          Rick Murray <heyrickmail-usenet@yahoo.co.uk> wrote:

> On 30/09/2011 23:38, Dave Higton wrote:

>> What I'm getting is that the taskwindow is only opened if /neither/
>> -task nor -txt argument is given.

> Because TaskWindow passes around a message in that case saying "can
> anybody deal with this?" and I think if somebody can, it is up to them
> to start up the task, and TaskWindow talks to them and them alone.

Yes, exactly.

>> This is disastrous, because the whole point of using a taskwindow
>> (in my case) is to present output from a command line programme.
>> I don't want to have to do the textifying and window drawing myself.

> Off the top of my head, this is a really grotty hacky man-in-the-middle
> idea.

> Right, if the TaskWindow module passes TaskWindow_NewTask (&808C5) to
> find a suitable handler, then what YOU should do is broadcast this
> message yourself, specifying a dummy command line. Something ought to
> bite (!Edit, !Zap, whatever).

> Then you call TaskWindow to run your desired task, as if you dealt with
> the entire process. You'll get the Egos and Morios and so forth.

Yes, that is a nice idea, but it needs a bit more effort to actually 
work because the other task (the actual server that displays the 
window) needs to see the Ego and Morio messages with its own 
txt-handle quoted back to it, so it thinks your task is the TaskWindow 
task. Otherwise, it will not be willing to receive any input from you.

So, the command you pass around in the NewTask message cannot be 
entirely dummy. It needs to be a command that allows your task to find 
out the txt-handle the other task specified (you need it for the Ego 
message you will send to the actual server), plus you need to find out 
which other task has actually claimed the request, so you can send 
messages to it.

One way to do that is to make the other task run a utility that sends 
a message containing its parameters (which include the task and 
txt-handles) to your task. A less complicated approach would be make 
the other task run an Obey file that stores its parameters in a system 
variable (which is safe as long as the variable name contains your 
tasks's internal unique handle for the TaskWindow job, i.e., something 
like <YourTask>$ExternalTaskWindow<handle>). Then, your task just 
needs to monitor that variable, and when it is set, extract the task 
and txt-handle values from it and remember them.

Once your task has the task and txt-handle values of the actual 
server, it can issue the TaskWindow command passing its own task and 
txt-handle values. Then, when your task receives the Ego message, it 
needs to pass it on to the actual server, substituting the txt-handle 
it got from the other task, and from that point on, the server knows 
your task, so it can make sense of all the other messages you pass on 
to it, most notably the Output messages and (finally) the Morio 
message.

-- 
Martin
---------------------------------------------------------------------
Martin Wuerthner         MW Software      http://www.mw-software.com/
        RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

TaskWindow -txt &xxxxxxxx Dave Higton <davehigton@dsl.pipex.com> - 2011-09-27 21:41 +0100
  Re: TaskWindow -txt &xxxxxxxx Martin Wuerthner <spamtrap@mw-software.com> - 2011-09-27 23:08 +0200
    Re: TaskWindow -txt &xxxxxxxx Dave Higton <davehigton@dsl.pipex.com> - 2011-09-27 22:33 +0100
    Re: TaskWindow -txt &xxxxxxxx "Ste (news)" <steve@revi11.plus.com> - 2011-09-28 15:27 +0100
      Re: TaskWindow -txt &xxxxxxxx Martin Wuerthner <spamtrap@mw-software.com> - 2011-09-28 17:16 +0200
        Re: TaskWindow -txt &xxxxxxxx "Ste (news)" <steve@revi11.plus.com> - 2011-09-28 19:52 +0100
          Re: TaskWindow -txt &xxxxxxxx Erik G <erikg@noname.invalid> - 2011-09-30 06:02 +0200
        Re: TaskWindow -txt &xxxxxxxx druck <news@druck.org.uk> - 2011-10-02 16:13 +0100
          Re: TaskWindow -txt &xxxxxxxx Erik G <erikg@noname.invalid> - 2011-10-13 11:23 +0200
            Re: TaskWindow -txt &xxxxxxxx Alex Macfarlane Smith <nospam@archifishal.co.uk> - 2011-10-13 21:08 +0100
            Re: TaskWindow -txt &xxxxxxxx druck <news@druck.org.uk> - 2011-10-15 12:13 +0100
              Re: TaskWindow -txt &xxxxxxxx Erik G <erikg@noname.invalid> - 2011-10-18 16:25 +0200
                Re: TaskWindow -txt &xxxxxxxx Martin Wuerthner <spamtrap@mw-software.com> - 2011-10-19 10:45 +0200
    Re: TaskWindow -txt &xxxxxxxx Erik G <erikg@noname.invalid> - 2011-09-30 05:47 +0200
      Re: TaskWindow -txt &xxxxxxxx Dave Higton <davehigton@dsl.pipex.com> - 2011-09-30 22:38 +0100
        Re: TaskWindow -txt &xxxxxxxx Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-10-01 05:49 +0200
          Re: TaskWindow -txt &xxxxxxxx Martin Wuerthner <spamtrap@mw-software.com> - 2011-10-01 13:19 +0200
        Re: TaskWindow -txt &xxxxxxxx Dave Higton <davehigton@dsl.pipex.com> - 2011-10-01 20:20 +0100
          Re: TaskWindow -txt &xxxxxxxx Steve Fryatt <news@stevefryatt.org.uk> - 2011-10-01 20:51 +0100
            Re: TaskWindow -txt &xxxxxxxx Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-10-01 22:46 +0200
              Re: TaskWindow -txt &xxxxxxxx Steve Fryatt <news@stevefryatt.org.uk> - 2011-10-01 22:07 +0100
              Re: TaskWindow -txt &xxxxxxxx Steve Fryatt <news@stevefryatt.org.uk> - 2011-10-01 22:04 +0100
              Re: TaskWindow -txt &xxxxxxxx Dave Higton <davehigton@dsl.pipex.com> - 2011-10-01 22:45 +0100
            Re: TaskWindow -txt &xxxxxxxx Dave Higton <davehigton@dsl.pipex.com> - 2011-10-01 22:44 +0100
          Re: TaskWindow -txt &xxxxxxxx Erik G <erikg@noname.invalid> - 2011-10-18 15:23 +0200
            Re: TaskWindow -txt &xxxxxxxx Erik G <erikg@noname.invalid> - 2011-10-18 15:55 +0200
            Re: TaskWindow -txt &xxxxxxxx druck <news@druck.org.uk> - 2011-10-19 20:27 +0100
  Re: TaskWindow -txt &xxxxxxxx Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-10-14 07:53 +0200
    Re: TaskWindow -txt &xxxxxxxx Gavin Wraith <gavin@wra1th.plus.com> - 2011-10-14 11:43 +0100
      Re: TaskWindow -txt &xxxxxxxx Martin Wuerthner <spamtrap@mw-software.com> - 2011-10-14 13:26 +0200
        Re: TaskWindow -txt &xxxxxxxx Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-10-15 20:37 +0200
    Re: TaskWindow -txt &xxxxxxxx druck <news@druck.freeuk.com> - 2011-10-16 18:26 +0100
      Re: TaskWindow -txt &xxxxxxxx Stewart Brodie <stewart.brodie@ntlworld.com> - 2011-10-16 23:28 +0100
        Re: TaskWindow -txt &xxxxxxxx druck <news@druck.org.uk> - 2011-10-19 20:30 +0100

csiph-web