[jawsscripts] Re: Proposal for more modularity and inheritance of JAWS scripts

For comparison, and to have some good minds help figure out how to
sift the good from the sheer volume of the thing <smile>, I refer
readers to a similarly-motivated proposal I wrote in March of 2003 and
then posted on my web site.  I showed this to FS, but I think its
length may have been part of the reason for its demise.  The other
reason, though, was probably that the ConfigNames.ini file came out
just after I communicated this idea to them--close enough after,
though, to indicate that it was already in the making before I said
anything.

The proposal remains at

http://www.dlee.org/jflprop.htm

On Fri, Sep 19, 2008 at 08:46:14AM -0400, Jamal Mazrui wrote:
This is an idea partly inspired by discussion with Doug Lee over the
desirability of extending the modularity of JAWS scripts, and of doing so
by means of practiced convention if not new, internal capability.  I am
seeking feedback on this initial proposal.

My suggestion is to add a section to ConfigNames.ini in the user script
folder.  Of course, the name should be unlikely to conflict with any
current or anticipated section names used by FS.  Suppose it is named

[Script Components]

Each key in this section would be the name of a configuration set.  That
name need not be an executable name if an association exists in the
[ConfigNames] section of the same file.  The value of each key would be a
vertical bar (|) delimited list of .jsb files.  The order of these would
correspond to the order they are loaded via Use statements in a shell
version of the .jss file with that configuration name.  For example,

[Script Components]
default=default_fs|bx

This would mean that a shell of default.jss is supposed to exist in the
user script folder with content like the following:

[Start of default.jss]

Use "default_fs.jsb"
Use "bx.jsb"

Void Function Dummy()
Return
EndFunction

[End of default.jss]

The shell file contains a dummy function so that it has enough code to be
recognized as a valid .jss file by the JAWS script compiler, regardless of
the JAWS version.  The shell determines what .jsb components are used and
the order they are used, which affects inheritance.  Thus, if bx.jsb
contains a SayLine function or script, it will be used instead of the one
in default_fs.jsb.  Within the bx version, a call to SayLine would
reference the preceding one in the chain, i.e.g, the one in
default_fs.jsb.  By convention, default_fs.jsb refers to a copy of the
FS-supplied default.jsb in the All Users folder, the copy being put in the
user script folder.

A script installer, such as JAWS Script Exchange or others, could then
examine ConfigNames.ini to determine whether it needs to create a shell
version of a script being installed.  If it needs to change the order of
.jsb components loaded, it can do so by changing the appropriate entry in
the [Script Components] section.  It would be assumed that care would be
exercised by developers in choosing such an installation option (and their
reputations would be affected if they did not show consideration for the
presence and order of existing components!).  In the absence of a specific
order instruction, an installer would leave the order of components the
same if the component being installed was already listed, and if not,
would make the new component the last one in the sequence.

If this proposal worked, I think it could open significantly more
potential for JAWS scripts to be modular in nature, whereby a script file
can address a particular aspect of a configuration without having to
replace the whole configuration set.  It would also support more use of
the inheritance capability of JAWS scripting.

Reactions?  What have I missed?  What might improve the proposal?

Jamal

__________?
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: