Class: Queue

Queue()

A queue is an app made of other apps: a .jtq file that, when added to a session, adds its apps
to that session in its place. It sits in the app catalogue next to the apps, and is added to a
session with Session#addApp like any app.

A .jtq file is a script run with the session in scope as session. Paths it gives to
session.addApp are relative to the .jtq file, and may name other queues. The script can also
declare session options (session.addNumberOption(...)) and set session fields and hooks
(session.getApp = ...), as these act on the whole session.

An older format is JSON, {displayName, apps: [appId | {appId, options}]}, where an appId
without an extension is a .jtt file next to the queue.

A queue the admin should not list among the apps says so: queue.listed = false; in a script,
"listed": false in JSON, jtree_listed=False in an oTree session config.

Constructor

new Queue()

Source:

Members

appjs

The file's contents.

Source:

apps

The apps this queue adds, as {appId, options}, with appId resolved to a full path.

Source:

json

For a JSON queue, its parsed contents, otherwise null.

Source:

listed

Whether the admin lists this queue among the apps (see App#listed).

Source:

options

The session options this queue declares.

Source:

Methods

addApp()

Adds an app at the end of this queue's file. Reload the queue to see it.

Source:

dir()

The folder this queue's app paths are relative to.

Source:

metaData()

What the admin interfaces read about an app, see App#metaData.

Source:

run()

Runs this queue against target, a Session or a QueueRecorder, whose addApp
resolves paths relative to this queue.

Source:

shell()

The shape older admin interfaces read from their list of queues.

Source:

(static) isQueueId()

Whether id is a queue's: a .jtq file, or an oTree project's session config.

Source:

(static) load()

Reads the .jtq file at filePath, and lists the apps and options it declares.

Source: