[AppBasic] DrawScript Filetype Problem

Fred Graute fjgraute at casema.nl
Mon Mar 24 21:34:49 GMT 2014

In message <6eee7ded53.pittdj+ at iyonix.home>
          David Pitt <pittdj at pittdj.co.uk> wrote:

> In message <159374ed53.fjgraute at casema.nl>
>   Fred Graute <fjgraute at casema.nl> wrote:
> > In message <dbd36ded53.D_Lane at lakeview.demon.co.uk>
> >           David R Lane <D_Lane at Lakeview.demon.co.uk> wrote:
> [snip]
> >> I am no expert, but my guess is that some changes from DrawScript to
> >> DrawScri need to be made in files in Defaults.Modes.DrawScript, or
> >> changes from Drawscri to DrawScript in the !DrawScript application.
> > No changes should be required. Like David, I have updated my copy of
> > DrawScript mode and it's all working fine.
> The problem is that when filetype truncation occurs in the StrongED
> save dialogue then the file is saved with a filetype of &000. To get
> around that the filetype name does need to be restricted to eight
> characters. I have to say that does seem like a bug to me, the
> truncation should not affect the save.

Thanks for the clear description. What happens is this:

When the savebox is opened StrongED puts in the filetype name by passing
the hex filetype through OS_FSControl 18 (filetype number to name). This
return an 8 characters, truncated, filetype name.

When 'Save' is clicked the filetype name is passed to OS_FSControl 31
(filetype name to number) which faults the truncated name. Presumably it
checks the name given against File$Type sysvars, only accepting a full
match. This results in filetype number = 0.

An inconsistency in RISC OS I'd say.

> DrawScript does also need a little fixing.

Yes, the filetype name should be shortened, and registered - I'd be very
surprised if the name as it stands had been accepted.

> I hope this helps and is more accurate than another post of mine that
> impugned StrongED by alleging the truncation to be a bug.

It helped, and contrasting with older version in the other post helped
too. The older versions looked up the name by constructing File$Type_xxx
and reading its value. I couldn't see the point of it so switched to
using OS_FSControl 31. Now I know what the point was! Next, how to solve
this - reinstate old code or find some other way, hmm.

Fred Graute

More information about the Appbasic-list mailing list