[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: violation



** Reply to message from "Martin J. Osborne"  on
Fri, 27 Sep 2002 10:21:06 -0400


>> When I try to copy the new U2 over the existing U2, I receive an error
>> message "sharing violation". What does this mean

> You get the sharing violation because XyWrite is using the U2 file. You
> need to quit XyWrite, and go to DOS and do the copying there, then return to
> XyWrite.

You don't need to quit XyWrite (although of course that does work). Consider:
you couldn't change anything in a LOADed file using XyWrite special characters
and conveniences, because you couldn't save those files prior to quitting and
doing the copy operation that you describe above. How would you work around
this? Well, you could make a copy of the file you're working on, LOAD that
instead, then SAve your file, and reLOAD it. Pretty laborious!

We fixed all this, with U2's LOADHELP command). What we do is construct in
memory a tiny dummy Help file of the same type (i.e. with the same keylabel or
identifier, ;DG; ;U2; ;HL; or whatever) as the current file -- the dummy is
about 30 bytes long -- LOAD that momentarily, SAve the file you want to edit,
then reLOAD it, and finally zap the dummy.

NOTE WELL, that under Win2K and WinXP, and maybe other OpSyses also, you don't
get a "sharing violation" error that inhibits changing a LOADed file! Which is
too darn bad, because you still need it, to protect yourself from yourself. If
you successfully SAve a LOADed Help file of certain types (the ones that
contain programming and make an index of themselves after the Ascii-26 EOF
character), I guarantee your session will be go haywire the next time you try
to use any programming in that file that occurs after the byte location where
you made the changes. You'll have to QUIT and relaunch. If you catch yourself
making this error, IMMEDIATELY go to the CMline and manually issue
LOAD HELPFILENAME.EXT
Hopefully, XyWrite will rewrite the index and you'll be OK.

Note also that not *all* LOADed files require this treatment: KeyBoarD files
(;KB;) and PRinter files (;PR;) (SETTINGS.DFL is technically a PRinter file)
can be freely edited and SAved, because they are stored in toto in memory (read
once, never consult again) -- so if you make changes to these files, and you
want those changes to be recognized, just manually reLOAD them (don't use
LOADHELP).

Here's the beginning of the LOADHELP explanatory text:

-----------
XyWrite IV Help files, when LOADed into the system, are "locked" Read-only
files that may not be changed|SAved (error messages "Access denied"|"Sharing
violation"). LOADHELP works around this restriction. Edit any Help file, then
RUN LOADHELP.PM -- it will SAve and then LOAD your altered Help file.

U2:		LOADHELP[ /NV]
		LH[ /NV]
 where switch /NV=	Overwrite loaded Help file with file in
			current window
-----------
(To read the whole of it, which I advise, command:
HELP LOADHELP )

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------