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

Re: [StrongED] filetype &000



In message <a445b95b905d18f09f64f79e64b49038@xxxxxxxxxxxxxxxxxxxx>
          Jeremy Nicoll - ml sed <jn.ml.sed45@xxxxxxxxxxxxxxxxxxxx> wrote:

> On 2016-07-03 11:56, Jim Nagel wrote:
> > Jeremy Nicoll - ml sed  wrote on 3 Jul:
> >> Do you run !Reporter?   It might be worth having it log all
> >> star-commands, to see if some application is issuing an *unset that's
> >> affecting all the filetype vars.
> >
> > Not yet actually established that the filetype vars ARE being unset.
>
> You might also be able to detect when the problem occurs with (if you
> use !Alarm or some equivalent) a command run on a timer, very
> frequently, checking to see that the vars are still defined.

Here's simple Wimp program that monitors File$Type variables as Jeremy
suggested. It could do with some more work to make it more robust but
the basics are there.

------------------------------------------------------------------------

DIM Block% 256
Quit% = FALSE

SYS "Wimp_Initialise",310,&4B534154,"File$Type monitor",0 TO TaskHandle%

REPEAT
  SYS "OS_ReadMonotonicTime" TO PollTime%
  SYS "Wimp_PollIdle",0,Block%,PollTime% + 500 TO Reason%

  CASE Reason% OF
  WHEN 0 : REM Null event
    SYS "XOS_CLI","Show File$Type_* { > <Wimp$Scrap> }"
    SYS "XOS_File",17,"<Wimp$Scrap>" TO ,,,,ObjLen% ; flags%
    IF (ObjLen% < 10) THEN
      Block%!0 = 0 : $(Block%+4) = "Oops, File$Type_XXX variables went awol."
      SYS "Wimp_ReportError",Block%,%11001,0,0,0,0
      Quit% = TRUE
    ENDIF
  WHEN 17,18 : REM User message
    IF Block%!16 = 0 THEN Quit% = TRUE
  ENDCASE
UNTIL (Quit%)

SYS "Wimp_CloseDown",TaskHandle%
END

------------------------------------------------------------------------

Cheers,
Fred.

-- 
StrongED Developer
http://www.stronged.iconbar.com/

--=20
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx
List archives at http://www.Torrens.org.uk/RO/StrongED/index.html