Open (Daemon subroutine): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (match syntax table to syntax template, tags and edits) |
||
Line 1: | Line 1: | ||
{{Template:Daemon:Open subtitle}} | {{Template:Daemon:Open subtitle}} | ||
<var>Open</var> 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== | ||
Line 9: | Line 6: | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>% | <tr><th>%daemon</th> | ||
<td>A previously defined Daemon object. </td></tr> | <td>A previously defined <var>[[Daemon class|Daemon]]</var> object. </td></tr> | ||
<tr><th> | <tr><th>string</th> | ||
<td>The name of the file or group to be opened on the daemon thread. | <td>The name of the file or group to be opened on the daemon thread. <var>string</var> <b><i>is</i></b> case sensitive, you must use all uppercase characters. | ||
<p>Use the following syntax for <var class="term">string</var> (note that Temp groups are not allowed):</p> | |||
<p class="code"> [File | [Perm] Group] <i>name</i>] </p></td></tr> | |||
<tr><th>Default | <tr><th>Default</th> | ||
<td> | <td>An optional, but <var>[[Methods#Named parameters|Name-Required]]</var>, parameter which specifies whether the file or group to be opened will be the default file or group for this the daemon thread. <var class="term">Default</var> is a [[Boolean enumeration]] which defaults to <code>False</code>, meaning that the <var>Open</var> method does not change the default file on the daemon thread.</td></tr> | ||
</table> | </table> | ||
==Exceptions== | ==Exceptions== | ||
This subroutine can throw the following exceptions:<dl> | This subroutine can throw the following exceptions:<dl> | ||
<dt><var>[[DaemonLost_class|DaemonLost]]</var> | |||
<dt>DaemonLost | <dd>If the daemon object is lost (probably restarted), a <var>DaemonLost</var> exception is thrown. This exception will only be thrown in <var class="product">[[Sirius Mods|"Sirius Mods"]]</var> Version 7.6 and later. | ||
<dd>If the daemon object is lost (probably restarted), a | |||
</dl> | </dl> | ||
==Usage notes== | ==Usage notes== | ||
<ul> | <ul> | ||
<li> | <li><var>Open</var> 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> | <li>It is a request-cancelling error to use <var>Open</var> against a file or group that the issuing user does not have open. | ||
<li>It is a (catchable) request-cancelling error if a group open fails because of an FTBL full condition.</ul> | |||
==Examples== | |||
<ol><li>These are all valid <var>Open</var> calls: | |||
<p class="code">%daem:open('MYPROC') | <p class="code">%daem:open('MYPROC') | ||
%daem:open('GROUP SIRSYS') | %daem:open('GROUP SIRSYS') | ||
%daem:open('PERM GROUP MUMBLE') | %daem:open('PERM GROUP MUMBLE') | ||
%daem:open('FILE SIRLOCAL') | %daem:open('FILE SIRLOCAL') | ||
</p> | </p></ol> | ||
==See also== | ==See also== | ||
{{Template:Daemon:Open footer}} | {{Template:Daemon:Open footer}} |
Revision as of 02:25, 14 March 2011
Open a file/group on the Daemon thread (Daemon class)
Open 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
%daemon | A previously defined Daemon object. |
---|---|
string | The name of the file or group to be opened on the daemon thread. string is case sensitive, you must use all uppercase characters.
Use the following syntax for string (note that Temp groups are not allowed): [File | [Perm] Group] name] |
Default | An optional, but Name-Required, parameter which specifies whether the file or group to be opened will be the default file or group for this the daemon thread. Default is a Boolean enumeration which defaults to False , meaning that 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" Version 7.6 and later.
Usage notes
- Open 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).
- 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.
Examples
- These are all valid Open calls:
%daem:open('MYPROC') %daem:open('GROUP SIRSYS') %daem:open('PERM GROUP MUMBLE') %daem:open('FILE SIRLOCAL')