Groups | Search | Server Info | Login | Register


Groups > comp.sys.acorn.misc > #21559

Re: Newshound and NNTPS

From Harriet Bazley <harriet@bazleyfamily.co.uk>
Newsgroups comp.sys.acorn.misc
Subject Re: Newshound and NNTPS
Date 2025-02-08 21:26 +0000
Organization A noiseless patient Spider
Message-ID <902125ec5b.harriet@bazleyfamily.co.uk> (permalink)
References (1 earlier) <5b61a29d6eNews03@avisoft.foard-xM> <780ddbe85b.chris@mytardis> <5be8dd8809News03@avisoft.f9.co.uk> <mpro.sr2nrg034gd3q03qf.news@stevefryatt.org.uk> <236310ec5b.DaveMeUK@BeagleBoard-xM>

Show all headers | View raw


On 8 Feb 2025 as I do recall,
          David Higton  wrote:


> If anyone is interested: NewsHound is old fashioned in that it keeps
> its configuration within the app.  This has been frowned on for years.
> Trouble is, it's going to be difficult to write code that puts the
> config in Choices$Write for new users, but doesn't just blindly look
> there and start up without a configuration if someone simply copies a
> new version over an old.  Thoughts welcome!
>

Most of my apps (having been written to work on RISC OS 3.1 with a !Boot
file instead of a !Boot/Choices structure) function like this.

From Textseek:


DEF FNconfigfilereadname(leaf$)
LOCAL n$,n%
n%=FNwimp_testsysvariable("Choices$Path")
IF n%=FALSE THEN n$=appdir$ ELSE n$="Choices:Textseek"
=n$+"."+leaf$

DEF FNconfigfilewritename(leaf$)
LOCAL n$,n%
n%=FNwimp_testsysvariable("Choices$Write")
IF n%=FALSE THEN n$=appdir$ ELSE n$="<Choices$Write>.Textseek"
=n$+"."+leaf$

'readname' and 'writename' are slight misnomers for historical reasons -
they are actually a 'readpath' and 'writepath' to which the leafname of
the file gets appended!

Every time you want to OPENIN a configuration file you access it via the
path returned by FNconfigfilereadname(leaf$), which may or may not point
to Choices$Path;  every time you want to OPENOUT and write to a
configuration file you access it via the path returned by
FNconfigfilewritename(leaf$).  During the setup process the program
executes

IF FNifthere(FNconfigfilereadname("Config")) THEN PROCrestoreoptions ELSE PROCupdateconfig

Here FNconfigfilereadname reads from Choices:Textseek.Config if the file
exists (not if Choices$Path exists...) and if it doesn't then it falls
back to the copy inside <Textseek$Dir>.Resources (the value of appdir$).
(And if *that* fails because it is a new installation and no
configuration has ever been saved, it reads the default values out of
the current window template data!)


-- 
Harriet Bazley                     ==  Loyaulte me lie ==

The best laid schemes o' mice and men gang oft a-gley.

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


Thread

Newshound and NNTPS David Higton <dave@davehigton.me.uk> - 2024-05-15 22:28 +0100
  Re: Newshound and NNTPS Stuart <Spambin@argonet.co.uk> - 2024-05-15 22:00 +0000
  Re: Newshound and NNTPS "John Williams (News)" <UCEbin@tiscali.co.uk> - 2024-05-15 23:00 +0100
  Re: Newshound and NNTPS Chris Newman <mec@npost.uk> - 2024-05-15 23:08 +0100
    Re: Newshound and NNTPS "Richard Darby (news)" <news@rjdarby.co.uk> - 2024-05-16 10:28 +0100
    Re: Newshound and NNTPS Alan Griffin <ajg@argonet.co.uk> - 2024-05-16 18:15 +0000
  Re: Newshound and NNTPS Martin <News03@avisoft.f9.co.uk> - 2024-05-15 23:25 +0100
    Re: Newshound and NNTPS Chris Newman <mec@npost.uk> - 2024-05-16 10:14 +0100
      Re: Newshound and NNTPS Martin <News03@avisoft.f9.co.uk> - 2024-05-16 11:10 +0100
    Re: Newshound and NNTPS David Higton <dave@davehigton.me.uk> - 2024-05-16 11:17 +0100
      Re: Newshound and NNTPS Martin <News03@avisoft.f9.co.uk> - 2024-05-16 12:49 +0100
      Newshound and NNTPS Evan Clark <news@ejclark.force9.co.uk> - 2024-05-16 17:25 +0100
      Re: Newshound and NNTPS Chris Newman <mec@npost.uk> - 2024-05-16 21:30 +0100
        Re: Newshound and NNTPS David Higton <dave@davehigton.me.uk> - 2024-05-16 21:51 +0100
          Re: Newshound and NNTPS Chris Newman <mec@npost.uk> - 2024-05-16 22:22 +0100
        Re: Newshound and NNTPS Stuart <Spambin@argonet.co.uk> - 2024-05-24 16:30 +0000
  Re: Newshound and NNTPS Dave <dave@triffid.co.uk> - 2024-05-16 07:04 +0100
  Re: Newshound and NNTPS John <newsmcc@blueyonder.co.uk> - 2024-05-16 10:46 +0100
    Re: Newshound and NNTPS Chris Hughes <news13@noonehere.co.uk> - 2024-05-16 11:35 +0100
  Re: Newshound and NNTPS Brian Jordan <brian.jordan9@btinternet.com> - 2024-05-16 11:25 +0100
  Re: Newshound and NNTPS Harriet Bazley <harriet@bazleyfamily.co.uk> - 2024-05-18 20:34 +0100
    Re: Newshound and NNTPS David Higton <dave@davehigton.me.uk> - 2024-05-18 21:09 +0100
  Re: Newshound and NNTPS David Higton <dave@davehigton.me.uk> - 2024-05-19 16:45 +0000
    Re: Newshound and NNTPS Chris Hughes <news13@noonehere.co.uk> - 2024-05-19 18:42 +0100
    Re: Newshound and NNTPS Brian Jordan <brian.jordan9@btinternet.com> - 2024-05-19 18:53 +0100
    Re: Newshound and NNTPS Chris Newman <mec@npost.uk> - 2024-05-20 12:06 +0100
    Re: Newshound and NNTPS Stuart <Spambin@argonet.co.uk> - 2024-05-24 17:00 +0000
  Re: Newshound and NNTPS Rob Hemmings <rhemmings@rgvk.co.uk> - 2024-08-04 15:42 +0100
  Re: Newshound and NNTPS Paul Stewart <phorefaux@gmail.com> - 2025-02-02 11:03 +0000
    Re: Newshound and NNTPS Chris Hughes <news13@noonehere.co.uk> - 2025-02-02 12:08 +0000
      Re: Newshound and NNTPS Chris Newman <newslists@npost.uk> - 2025-02-02 12:30 +0000
      Re: Newshound and NNTPS Martin <News03@avisoft.f9.co.uk> - 2025-02-02 12:36 +0000
        Re: Newshound and NNTPS Steve Fryatt <news@stevefryatt.org.uk> - 2025-02-02 20:04 +0000
          Re: Newshound and NNTPS David Higton <dave@davehigton.me.uk> - 2025-02-08 17:40 +0000
            Re: Newshound and NNTPS Paul Stewart <phorefaux@gmail.com> - 2025-02-08 19:14 +0000
              Re: Newshound and NNTPS Martin <News03@avisoft.f9.co.uk> - 2025-02-08 19:46 +0000
                Re: Newshound and NNTPS David Higton <dave@davehigton.me.uk> - 2025-02-08 21:36 +0000
              Re: Newshound and NNTPS Paul Stewart <phorefaux@gmail.com> - 2025-02-08 20:45 +0000
              Re: Newshound and NNTPS David Higton <dave@davehigton.me.uk> - 2025-02-08 21:34 +0000
                Re: Newshound and NNTPS Paul Stewart <phorefaux@gmail.com> - 2025-02-08 22:11 +0000
            Re: Newshound and NNTPS Harriet Bazley <harriet@bazleyfamily.co.uk> - 2025-02-08 21:26 +0000
      Re: Newshound and NNTPS Paul Stewart <phorefaux@gmail.com> - 2025-02-02 16:27 +0000

csiph-web