Starting with version 2.0, you can edit routines within Serenji. However, some sites may wish to block all such editing, for example so that their Serenji users cannot bypass local source-control procedures.
Here is a way to do this:
Create a routine like the following, choosing a name which will be accessible from namespaces or UCIs in exactly the same way as the global ^%SerenjC. The simplest way to achieve this on most M or Caché servers is to begin the name with the '%' character.
%Ser0012 ; Read-only hook Q RO(context) Q "All read-only"
Install this hook by setting the following global node. (You might need to be in your MGR UCI to avoid getting a global protection error when issuing the SET command.):
set ^%SerenjC("C","SIL-$$RO")="RO^%Ser0012"
(Note that the global name is ^%SerenjC not ^%SerenjiC.)
Serenji only requires read access to this global, so you can use global protection strategies to prevent rogue users from trying to defeat the restriction.
Now when you invoke File\Open in Serenji, all the routines in the list should be ghosted, and Open for Edit should remain grayed-out no matter which you select.
For further information about what can be done using Serenji's hooks, look in the product's on-line help. Open the Editing book and look at the section entitled "Integrating the Editor with your Development Environment".
Last reviewed: Nov 15, 2004
Copyright 1997, 2005 George James Software.