[softwarelist] Re: SparkFS 1.41 & RO 6

  • From: Johan Heuseveldt <johan@xxxxxxxxxxxxxxxxx>
  • To: davidpilling@xxxxxxxxxxxxx
  • Date: Sat, 2 Jun 2007 14:49:13 +0200 (BST)

Hi David, all of you/us,

I hope you all don't mind when I step in here. Just something
that could be worth mentioning it... 

On Fri 01 Jun, David Pilling wrote:

[snip]

> However it is not uncommon for people to install more than one copy of 
> an application and then get odd results. Often the fact that the spare 
> is tucked away in some obscure directory doesn't stop it being booted 
> (Desktop boot file) and just makes locating the problem harder.

Years back I spoke to a Dutch programmer, and he claimed that most
software writers doesn't write the !Boot file the proper way, or words
like that! :-)
It's just the nature of RISC OS that boots everything when a new dir
is opened, and which should be taken into account in the !Boot file.
For that reason the !Boot file should check if the appdir is already
set. If the app pointers are empty/don't exist, it should inhibit any
further action on/with the app pointers.
So the !Boot file (for 'MyApp') should contain lines like:

 | > !MyApp.!Boot
 |
 If "<MyApp$Path>" = "" Then IconSprites <Obey$Dir>.!Sprites
 If "<MyApp$Path>" = "" Then Set MyApp$Dir <Obey$Dir>
 If "<MyApp$Path>" = "" Then Set MyApp$Path <Obey$Dir>.

but the !Run file is as usual like:

 | > !MyApp.!Run
 |
 IconSprites <Obey$Dir>.!Sprites
 Set MyApp$Dir <Obey$Dir>
 Set MyApp$Path <Obey$Dir>.

This way the app pointers do not get reset if a dir is opened
the first time (during the current session) and having another copy
of '!MyApp' in it, when '!MyApp' is already seen, or even running.
App pointers /do/ get reset when the user double clicks on it.
Both bahaviours are as the user would expect. Isn't it?

If others things are catered for, like not having a wrong/old entry
in the 'Desktop Boot file' - as you (Dave) mentioned above - or in
'Boot' etc., then this 'soft' version of the !Boot file is all you
need to prevent the problems mentioned. It means, you can locate any
other/older version of the app, and investigate the contents of the
appdir, wether or not running the app version you want, just before
or after that investigation!


When I did the same in my own apps, indeed all those problems mentioned
in this thread were history, as the expression seems to be! :-)

Just see the applications from XAT (<http://www.xat.nl>), and most
likely many others as well?


FWIW

greetings,
Johan

-- 
Johan Heuseveldt <johan@xxxxxxxxxxxxxxxxx>
  aka  waarland

  The best place is a Riscy place
 
I'm now at an age where I have to prove that
I'm just as good as I never was. - Rex Harrison



Other related posts: