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


Groups > comp.sys.acorn.programmer > #806 > unrolled thread

Quit from TaskManager

Started by"John Williams (News)" <UCEbin@tiscali.co.uk>
First post2011-09-29 19:59 +0200
Last post2011-09-30 09:56 +0200
Articles 4 — 3 participants

Back to article view | Back to comp.sys.acorn.programmer


Contents

  Quit from TaskManager "John Williams (News)" <UCEbin@tiscali.co.uk> - 2011-09-29 19:59 +0200
    Re: Quit from TaskManager Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-09-29 20:07 +0200
    Re: Quit from TaskManager Steve Fryatt <news@stevefryatt.org.uk> - 2011-09-29 20:00 +0100
    Re: Quit from TaskManager "John Williams (News)" <UCEbin@tiscali.co.uk> - 2011-09-30 09:56 +0200

#806 — Quit from TaskManager

From"John Williams (News)" <UCEbin@tiscali.co.uk>
Date2011-09-29 19:59 +0200
SubjectQuit from TaskManager
Message-ID<521a6ee763UCEbin@tiscali.co.uk>
I have 'whipped-up' a quick multitasking application to check my 'Deleted'
SysLog file (AntiSpam deletions) every 5 minutes which opens the file in
the default text editor if it is of more than zero length.

It seems to work OK.

Unfortunately I notice I can't quit it from the task manager.

Does anyone have any hint as to what vital bit I've missed out which allows
this?

The program uses SYS "Wimp_PollIdle" to check every 5 minutes in a
procedure called PROC_pollidle.  Is it that it only returns to be
controlled by the task manager for that brief cycle or three every 5
minutes?

John

-- 
John Williams, Brittany, Northern France - no attachments to these addresses!
Non-RISC OS posters change user to johnrwilliams or put 'risc' in subject!
Who is John Williams? http://petit.four.free.fr/picindex/author/

[toc] | [next] | [standalone]


#807

FromRick Murray <heyrickmail-usenet@yahoo.co.uk>
Date2011-09-29 20:07 +0200
Message-ID<4e84b3f0$0$30748$ba4acef3@reader.news.orange.fr>
In reply to#806
On 29/09/2011 19:59, John Williams (News) wrote:

> The program uses SYS "Wimp_PollIdle" to check every 5 minutes in a
> procedure called PROC_pollidle.  Is it that it only returns to be
> controlled by the task manager for that brief cycle or three every 5
> minutes?

What is your poll (idle) mask?

When you initialise, do you initialise the RO3 way?

If so, what is your list of acceptable message? Is 0 (Quit) one of them?


Best wishes,

Rick.

[toc] | [prev] | [next] | [standalone]


#808

FromSteve Fryatt <news@stevefryatt.org.uk>
Date2011-09-29 20:00 +0100
Message-ID<mpro.lsassu033k7c001d8.news@stevefryatt.org.uk>
In reply to#806
On 29 Sep, John Williams (News) wrote in message
    <521a6ee763UCEbin@tiscali.co.uk>:

> Unfortunately I notice I can't quit it from the task manager.
> 
> Does anyone have any hint as to what vital bit I've missed out which
> allows this?

I assume you're not responding to Poll events 17 and 18 (the user message
ones)?

You should be doing something in your Wimp_PollIdle CASE statement like

  WHEN 17, 18
    IF b%!16 = 0 THEN quit% = TRUE

(assuming that setting quit% to TRUE will cause your app to exit, of
course).  THat way, you exit when Message_Quit (0) is received.

You also need to be careful how you call Wimp_Initialise: passing 310 in R0
is a good idea if you don't want to worry about getting the Wimp to pass the
Message_Quit in to you.
 
> The program uses SYS "Wimp_PollIdle" to check every 5 minutes in a
> procedure called PROC_pollidle.  Is it that it only returns to be
> controlled by the task manager for that brief cycle or three every 5
> minutes?

No, that delay is just for the Null polls.  Other events arrive whenever
they need to, as soon as they are sent.

-- 
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/

[toc] | [prev] | [next] | [standalone]


#812

From"John Williams (News)" <UCEbin@tiscali.co.uk>
Date2011-09-30 09:56 +0200
Message-ID<521abb8f4bUCEbin@tiscali.co.uk>
In reply to#806
On 29 Sep, UCEbin@tiscali.co.uk wrote:

> I have 'whipped-up' a quick multitasking application to check my 'Deleted'
> SysLog file (AntiSpam deletions) every 5 minutes which opens the file in
> the default text editor if it is of more than zero length.

> It seems to work OK.

> Unfortunately I notice I can't quit it from the task manager.

It turns out that my concept of WIMP programming and the required structure
was entirely trousers.

I also failed entirely to handle returned reason codes, so it's not
surprising that I failed to act on the message the WIMP was sending to me!

However, a private tutorial from Rick - always ready to help - sorted me
out.

Thanks also to Steve for spotting the core of the problem, though I needed
a bit more hand-holding.

John

-- 
John Williams, Brittany, Northern France - no attachments to these addresses!
Non-RISC OS posters change user to johnrwilliams or put 'risc' in subject!
Who is John Williams? http://petit.four.free.fr/picindex/author/

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.acorn.programmer


csiph-web