Open (Daemon subroutine)

From m204wiki
Revision as of 04:37, 7 February 2011 by Wiccan (talk | contribs) (1 revision)
Jump to navigation Jump to search

Open a file/group on the Daemon thread (Daemon class)


Open is a member of the Daemon class

This method is used to open a file or group on the daemon thread that is already open on the invoking (master) thread. The file or group is opened with the same privileges with which it is open on the master thread.

Syntax

daemon:Open( string, [Default= boolean]) Throws DaemonLost, IncorrectDaemonState

Syntax terms

%daem A previously defined Daemon object.
fgname The name of the file or group to be opened on the daemon thread. You must use all uppercase characters.
Use the following format for %fgname (note that Temp groups are not allowed):
 [File | [Perm] Group] <i>name</i>] 
Default=bool This NameRequired, optional parameter specifies whether the file or group to be opened will be the default file or group on the daemon thread. Either of the Boolean enumeration values is valid: :lit.True:elit. or False. The default value for Default is False, meaning that, by default, the Open method does not change the default file on the daemon thread.

Exceptions

This subroutine can throw the following exceptions:

DaemonLost
If the daemon object is lost (probably restarted), a DaemonLost exception is thrown. This exception will only be thrown in Sirius Mods.

Usage notes

  • The Open method cannot open a file or group that is not already open on the master thread. To open a file not open on the master thread, issue an OPEN command using the Run (Daemon function).
  • These are example Open calls:
    %daem:open('MYPROC')
    %daem:open('GROUP SIRSYS')
    %daem:open('PERM GROUP MUMBLE')
    %daem:open('FILE SIRLOCAL')
    
  • It is a request-cancelling error to use Open against a file or group that the issuing user does not have open. It is a (catchable) request-cancelling error if a group open fails because of an FTBL full condition.

See also