Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

burst.runtime.SpiderMonkeyRuntime Class Reference

Inheritance diagram for burst.runtime.SpiderMonkeyRuntime:

burst.runtime.AbstractRuntime List of all members.

Detailed Description

Singleton subclass of AbstractRuntime for SpiderMonkey.


Static Public Member Functions

void readEvalSync (String fpath)
 Read a local file synchronously and evaluate its contents.

String readFile_xpcshell (String fname)
 Read a local file synchronously and return its contents.


Member Function Documentation

void burst.runtime.SpiderMonkeyRuntime.readEvalSync String  fpath  )  [static, virtual]
 

Read a local file synchronously and evaluate its contents.

This function relies on a global load() function, such as is available in SpiderMonkey and Rhino.

The shell load() evaluates and puts symbols into the global namespace. This function has no useful return value; any result from the evaluation must be done by a callback within the loaded file contents.

Todo:
How does load() handle runtime syntax errors?

How does load() handle a non-existent or unreadable file?

Parameters:
fpath The absolute or relative path to pass in to load()
Exceptions:
BurstError if load() returns false

Implements burst.runtime.AbstractRuntime.

String burst.runtime.SpiderMonkeyRuntime.readFile_xpcshell String  fname  )  [static]
 

Read a local file synchronously and return its contents.

This function only works in XPCShell.

Our implementation basically came Kevin Burton's weblog: http://www.peerfear.org/rss/permalink/2003/01/21/1043160037-File_IO_in_MozillaJavaScript.shtml


The documentation for this class was generated from the following file:
Generated on Tue Nov 30 04:03:09 2004 for BurstProject by doxygen 1.3.4