Open (Daemon subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<span style="font-size:120%"><b>Open a file or group on a daemon thread.</b></span>
{{Template:Daemon:Open subtitle}}


Open is a member of the [[Daemon class]]
Open is a member of the [[Daemon class]]
Line 5: Line 5:
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.
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.


==Open Syntax==
==Syntax==
<pre>
{{Template:Daemon:Open syntax}}
%daem:Open(fgname [, Default=bool])
===Syntax terms===
</pre>
 
===Syntax Terms===
<dl>
<dl>
<dt><i>%daem</i>  
<dt><i>%daem</i>  
Line 34: Line 31:
</dl>
</dl>


==Usage Notes==
==Usage notes==
<ul>
<ul>
<li>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)]].  
<li>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)]].  
Line 48: Line 45:
<li>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.</ul>
<li>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.</ul>


[[Category:Daemon methods|Open]]
==See also==
{{Template:Daemon:Open footer}}

Revision as of 04:37, 7 February 2011

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