Skip to content

Instantly share code, notes, and snippets.

@davestewart
Created March 21, 2012 00:19
Show Gist options
  • Save davestewart/2142917 to your computer and use it in GitHub Desktop.
Save davestewart/2142917 to your computer and use it in GitHub Desktop.
Source output from the xJSFL main class
> xjsfl: loading "{core}jsfl/libraries/text/template.jsfl"
> xjsfl: loading "{core}jsfl/libraries/text/source.jsfl"
Processing: "E:/05 - Commercial Projects/xJSFL/3 - development/xJSFL/core/jsfl/xjsfl.jsfl" ...
> Processing path "E:/05 - Commercial Projects/xJSFL/3 - development/xJSFL/core/jsfl/xjsfl.jsfl"
> HEADING: Settings
> VALUE: xjsfl.settings
> VALUE: app
> VALUE: folders
> VALUE: uris
> FUNCTION: add
> FUNCTION: get
> VALUE: searchPaths
> FUNCTION: get
> VALUE: newLine
> HEADING: Debug
> VALUE: xjsfl.debug
> FUNCTION: file
> FUNCTION: func
> FUNCTION: error
> FUNCTION: load
> FUNCTION: log
> FUNCTION: clear
> ACCESSOR: state
> ACCESSOR: state
> HEADING: File
> VALUE: xjsfl.file
> FUNCTION: find
> FUNCTION: load
> FUNCTION: save
> FUNCTION: copy
> HEADING: Classes
> VALUE: xjsfl.classes
> VALUE: uris
> FUNCTION: load
> VALUE: tokens
> FUNCTION: register
> FUNCTION: restore
> HEADING: Modules
> VALUE: xjsfl.modules
> VALUE: manifests
> VALUE: modules
> VALUE: xjsfl.modules
> FUNCTION: getManifest
> FUNCTION: getModule
> FUNCTION: find
> FUNCTION: init
> FUNCTION: load
> FUNCTION: create
> HEADING: UI
> VALUE: xjsfl.ui
> FUNCTION: show
> FUNCTION: getState
> HEADING: Initialisation
> FUNCTION: init
Saving 54 members to: "W:/sites/commercial/www.xjsfl.com/wp-content/documentation/drafts/api/jsfl/xjsfl.html"
Inspect: Array (depth:10, objects:309, values:616, time:0.1 seconds)
--------------------------------------------------------------------------------
array => Array
[0] => DocComment
class: "DocComment"
line: 23
[text] => Array
0: "xJSFL Framework for Adobe Flash"
1: ""
[flags] => Object
[tags] => Object
[author] => Array
[0] => Tag
class: "Tag"
text: "Dave Stewart: dave@xjsfl.com"
[see] => Array
[0] => Tag
class: "Tag"
text: "Main website: http://www.xjsfl.com"
[1] => Tag
class: "Tag"
text: "Support: http://www.xjsfl.com/support"
[2] => Tag
class: "Tag"
text: "License: http://www.xjsfl.com/license"
[1] => DocComment
class: "DocComment"
line: 29
[text] => Array
0: "Fake xjsfl instantation for Komodo autocomplete"
[flags] => Object
[tags] => Object
[2] => Heading
class: "Heading"
line: 65
[text] => Array
0: "Settings"
[3] => Variable
class: "Variable"
line: 71
name: "xjsfl.settings"
object: "xjsfl"
type: undefined
[text] => Array
0: "Core settings and cached variables"
[flags] => Object
class: true
[tags] => Object
[class] => Array
[0] => Tag
class: "Tag"
text: "Settings"
[4] => Variable
class: "Variable"
line: 77
name: "app"
object: "xjsfl.settings"
type: undefined
[text] => Array
0: "Application data"
1: "Information about the Flash version the user is currently running"
[flags] => Object
[tags] => Object
[5] => Variable
class: "Variable"
line: 102
name: "folders"
object: "xjsfl.settings"
type: undefined
[text] => Array
0: "Folder URIs"
1: "Common folders which may be used as placeholders in URI references, i.e. '{core}path/to/file.txt'"
[flags] => Object
[tags] => Object
[6] => Variable
class: "Variable"
line: 142
name: "uris"
object: "xjsfl.settings"
type: "Object"
[text] => Array
0: "URIs"
1: "An ordered list of base URIs which xJSFL uses when searching for files"
2: "module uris are updated automatically when new modules are added"
3: ""
[flags] => Object
[tags] => Object
[7] => Function
class: "Function"
line: 156
name: "add"
object: "xjsfl.settings"
[text] => Array
0: "Adds URIs to the URIs list"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "pathOrURI"
type: "String"
text: "A valid path or URI"
[1] => Param
class: "Param"
name: "type"
type: "String"
text: "The type of URI to add. Valid types are user, module, or core"
signature: "add(pathOrURI, type)"
[8] => Function
class: "Function"
line: 183
name: "get"
object: "xjsfl.settings"
[text] => Array
0: "Gets all URIs in order"
[flags] => Object
[tags] => Object
[return] => Array
[0] => Value
class: "Value"
type: "Array"
text: "An Array or URIs"
name: " "
signature: "get()"
[9] => Variable
class: "Variable"
line: 195
name: "searchPaths"
object: "xjsfl.settings"
type: undefined
[text] => Array
0: "Search paths"
1: "A cache of folder paths which xJSFL searches when loading files"
[flags] => Object
[tags] => Object
[10] => Function
class: "Function"
line: 227
name: "get"
object: "xjsfl.settings"
[text] => Array
0: "returns an Array or URILists"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "Filter"
type: "String"
text: "all paths by the first folder"
[return] => Array
[0] => Value
class: "Value"
type: "Array"
text: "An Array of URILists"
name: " "
signature: "get(filter)"
[11] => DocComment
class: "DocComment"
line: 231
[text] => Array
0: "A list of URIs"
[flags] => Object
[tags] => Object
type: "URIList"
[12] => Variable
class: "Variable"
line: 260
name: "newLine"
object: "xjsfl.settings"
type: "String"
[text] => Array
0: "Newline character depending on PC or Mac"
1: ""
[flags] => Object
[tags] => Object
[13] => Heading
class: "Heading"
line: 277
[text] => Array
0: "Debug"
[14] => Variable
class: "Variable"
line: 283
name: "xjsfl.debug"
object: "xjsfl"
type: "Object"
[text] => Array
0: "The xJSFL Debug object"
[flags] => Object
class: true
[tags] => Object
[15] => Function
class: "Function"
line: 328
name: "file"
object: "xjsfl.debug"
[text] => Array
0: "Debugs script files by loading and eval-ing them"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "pathOrURI"
type: "String"
text: "The URI or path of the file to load"
signature: "file(pathOrURI)"
[16] => Function
class: "Function"
line: 416
name: "func"
object: "xjsfl.debug"
[text] => Array
0: "Tests a callback and outputs the error stack if the call fails. Add additional parameters after the callback reference"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "fn"
type: "Function"
text: "The function to test"
[1] => Param
class: "Param"
name: "params"
type: "Array"
text: "An optional Array of arguments or Arguments object to pass to the function"
[2] => Param
class: "Param"
name: "scope"
type: "Object"
text: "An optional scope to run the function in"
[return] => Array
[0] => Value
class: "Value"
type: "Value"
text: "The result of the function if successful"
name: " "
signature: "func(fn, params, scope)"
[17] => Function
class: "Function"
line: 439
name: "error"
object: "xjsfl.debug"
[text] => Array
0: "Traces a human-readable error stack to the Output Panel"
1: ""
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "error"
type: "Error"
text: "A JavaScript Error object"
[1] => Param
class: "Param"
name: "log"
type: "Boolean"
text: "An optional Boolean to log the error"
[2] => Param
class: "Param"
name: "testing"
type: "Boolean"
text: "Internal use only. Removes test() stack items"
signature: "error(error, log, testing)"
[18] => Function
class: "Function"
line: 506
name: "load"
object: "xjsfl.debug"
[text] => Array
0: "Detects errors in loaded files"
[flags] => Object
[tags] => Object
signature: "load(path)"
[19] => Function
class: "Function"
line: 549
name: "log"
object: "xjsfl.debug"
[text] => Array
0: "Logs the results of an error to the temp directory so Komodo can read in the data"
1: ""
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "uri"
type: "String"
text: "The URI of the erroring file"
[1] => Param
class: "Param"
name: "line"
type: "Number"
text: "The line number of the error"
[2] => Param
class: "Param"
name: "name"
type: "String"
text: "The name of the error"
[3] => Param
class: "Param"
name: "message"
type: "String"
text: "The error message"
signature: "log(error)"
[20] => Function
class: "Function"
line: 558
name: "clear"
object: "xjsfl.debug"
[text] => Array
0: "Clears any existing error logs"
[flags] => Object
[tags] => Object
signature: "clear()"
[21] => Accessor
class: "Accessor"
line: 568
name: "state"
object: "xjsfl.debug"
type: "Boolean"
readable: true
writable: true
[text] => Array
0: "Set the file debugging state"
1: "Get the file debugging state"
[flags] => Object
[tags] => Object
acesss: ""
[22] => Heading
class: "Heading"
line: 619
[text] => Array
0: "File"
[23] => Variable
class: "Variable"
line: 625
name: "xjsfl.file"
object: "xjsfl"
type: undefined
[text] => Array
0: "Methods to load framework assets, or handle common filesystem functionality"
[flags] => Object
class: true
[tags] => Object
[24] => Function
class: "Function"
line: 645
name: "find"
object: "xjsfl.file"
[text] => Array
0: "Finds all files of a particular type within the cascading file system"
1: ""
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "type"
type: "String"
text: "The folder in which to look in to find the files, @see switch statement"
[1] => Param
class: "Param"
name: "name"
type: "String"
text: "A file name (pass no extension to use default), or partial file path"
[2] => Param
class: "Param"
name: "returnType"
type: "Number"
text: "An optional 0, 1 or -1; 0: all files (default), -1: the last file (user), 1:the first file (core)"
[return] => Array
[0] => Value
class: "Value"
type: "String"
text: "A single file path if found and return type is 1 or -1, or null if not"
name: " "
[1] => Value
class: "Value"
type: "Array"
text: "An Array of file uris if found, and return type is 0, or null if not"
name: " "
signature: "find(type, name, returnType)"
[25] => Function
class: "Function"
line: 761
name: "load"
object: "xjsfl.file"
[text] => Array
0: "Attempts to find and run or return files from the cascading file structure."
1: "Parameters and return type vary depending on file type!"
2: ""
3: ""
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "path"
type: "String"
text: "The relative or absolute path, or uri to the file"
[1] => Param
class: "Param"
name: "path"
type: "String"
text: "The name or path fragment to a file, with or without the file extension"
[2] => Param
class: "Param"
name: "type"
type: "String"
text: "The folder type in which to look (i.e. settings) for the file(s)"
[3] => Param
class: "Param"
name: "quiet"
type: "Boolean"
text: "Loads the file quietly, without tracing to the Outupt panel"
[return] => Array
[0] => Value
class: "Value"
type: "Boolean"
text: "A Boolean indicating Whether the file was successfully found and loaded"
name: " "
[1] => Value
class: "Value"
type: "XML"
text: "An XML object of the content of the file, if XML"
name: " "
[2] => Value
class: "Value"
type: "String"
text: "The string content of the file otherwise"
name: " "
signature: "load(path, type, quiet)"
[26] => Function
class: "Function"
line: 888
name: "save"
object: "xjsfl.file"
[text] => Array
0: "Saves data to file"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "pathOrURI"
type: "String"
text: "The path or URI to save data to"
[1] => Param
class: "Param"
name: "contents"
type: "String"
text: "The data to save"
[return] => Array
[0] => Value
class: "Value"
type: "Boolean"
text: "true or false depending on the result"
name: " "
signature: "save(pathOrURI, contents)"
[27] => Function
class: "Function"
line: 902
name: "copy"
object: "xjsfl.file"
[text] => Array
0: "Copies a file from one location to another"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "srcPathOrURI"
type: "String"
text: "The source path or URI"
[1] => Param
class: "Param"
name: "trgPathOrURI"
type: "String"
text: "The target path or URI"
[return] => Array
[0] => Value
class: "Value"
type: "Boolean"
text: "true or false depending on whether the copy was successful or not"
name: " "
signature: "copy(srcPathOrURI, trgPathOrURI)"
[28] => Heading
class: "Heading"
line: 920
[text] => Array
0: "Classes"
[29] => Variable
class: "Variable"
line: 926
name: "xjsfl.classes"
object: "xjsfl"
type: undefined
[text] => Array
0: "Core methods to load and register framework libraries and classes"
[flags] => Object
class: true
[tags] => Object
[30] => Variable
class: "Variable"
line: 931
name: "uris"
object: "xjsfl.classes"
type: "Object"
[text] => Array
0: "A hash of class/object name:uris"
[flags] => Object
[tags] => Object
[31] => Function
class: "Function"
line: 942
name: "load"
object: "xjsfl.classes"
[text] => Array
0: "Load a class or array of classes from disk"
1: ""
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "fileRef"
type: "String"
text: "A class filename or path, relative to any jsfl/libraries folder"
[1] => Param
class: "Param"
name: "fileRef"
type: "String"
text: "A wildcard string pointing to a folder, i.e. '//user/jsfl/libraries/*.jsfl'"
[2] => Param
class: "Param"
name: "fileRef"
type: "Array"
text: "An Array of class filepaths"
[3] => Param
class: "Param"
name: "reload"
type: "Boolean"
text: "An optional Boolean to force all files to reload if already loaded"
[return] => Array
[0] => Value
class: "Value"
type: "xjsfl"
text: "The main xJSFL object"
name: " "
signature: "load(fileRef, reload)"
[32] => Variable
class: "Variable"
line: 948
name: "tokens"
object: null
type: "Array"
[text] => Array
0: "An Array of filename tokens / URIs"
[flags] => Object
[tags] => Object
[33] => Function
class: "Function"
line: 1027
name: "register"
object: "xjsfl.classes"
[text] => Array
0: "Registers a class/function for later retrieval"
1: ""
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "name"
type: "String"
text: "The name of the class / function / object to register"
[1] => Param
class: "Param"
name: "obj"
type: "Object"
text: "The actual class / function / object"
[2] => Param
class: "Param"
name: "uri"
type: "String"
text: "An optional URI to the object's file, defaults to the calling file's URI"
[return] => Array
[0] => Value
class: "Value"
type: "xjsfl"
text: "The main xJSFL object"
name: " "
signature: "register(name, obj, uri)"
[34] => Function
class: "Function"
line: 1051
name: "restore"
object: "xjsfl.classes"
[text] => Array
0: "Internal function that restores a class/function to the supplied namespace"
1: ""
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "scope"
type: "Object"
text: "The scope to which the class should be restored to (defaults to window)"
[1] => Param
class: "Param"
name: "name"
type: "string"
text: "An optional name of the class to restore. if this is omitted, all classes are restored"
[return] => Array
[0] => Value
class: "Value"
type: "xjsfl"
text: "The main xJSFL object"
name: " "
signature: "restore(scope, name)"
[35] => Heading
class: "Heading"
line: 1087
[text] => Array
0: "Modules"
[36] => Variable
class: "Variable"
line: 1103
name: "xjsfl.modules"
object: "xjsfl"
type: undefined
[text] => Array
0: "Core methods to handle the initialization and loading of modules"
1: ""
2: "A namespace in which to store module code to prevent pollution of global"
3: "scope as well as a couple of methods to add and load module code"
4: ""
5: "Needs to be created in a closure to keep the modules and manifests private"
6: ""
7: "The syntax below is somewhat convoluted, in order to trick Komodo into"
8: "displaying the members correctly in autocomplete. Nothing else :)"
9: ""
[flags] => Object
ignore: true
class: true
[tags] => Object
[37] => DocComment
class: "DocComment"
line: 1132
[text] => Array
0: "The module lazy-loading process goes like this..."
1: ""
2: "1 - All modules reside in their own folder, with a manifest.xml in the root, and a"
3: "bootstrap.jsfl in jsfl. The manifest stores all information about the module, and"
4: "the bootstrap contains optional JSFL code that the module needs to run on startup."
5: ""
6: "2 - During the main xJSFL bootstrap, xjsfl.modules.find() is called, to search the main"
7: "modules folder for modules' manifest.xml files. Note that find() can also be called"
8: "manually from the user bootstrap to initialize modules external to the xJSFL modules"
9: "folder."
10: ""
11: "3 - For any modules that are found, xjsfl.modules.init(path) is called and the module's"
12: "manifest information is cached, and any files in <module>/flash/ are copied to the"
13: "main Flash folder."
14: ""
15: "Note that no modules instances are instantiated yet!"
16: ""
17: "4 - When any panels are opened, xjsfl.modules.load(namespace) is called via MMExecute()"
18: "from the AbtractModule.initialize() function. This loads the module's bootstrap.jsfl"
19: "file, which should in turn load the module's main JSFL file which contains the module's"
20: "JSFL properties and methods. This file then calls..."
21: ""
22: "5 - ...xjsfl.modules.create(), which creates and registers the module internally, so it"
23: "can be retrieved if necessary via xjsfl.modules.getModule(namespace)"
24: ""
[flags] => Object
[tags] => Object
[38] => Variable
class: "Variable"
line: 1137
name: "manifests"
object: null
type: undefined
[text] => Array
0: "A private reference to all found manifests"
[flags] => Object
[tags] => Object
[39] => Variable
class: "Variable"
line: 1142
name: "modules"
object: null
type: undefined
[text] => Array
0: "A private reference to all loaded modules"
[flags] => Object
[tags] => Object
[40] => Variable
class: "Variable"
line: 1147
name: "xjsfl.modules"
object: "xjsfl"
type: undefined
[text] => Array
0: "The property object that will be returned as xjsfl.modules"
[flags] => Object
[tags] => Object
[41] => Function
class: "Function"
line: 1154
name: "getManifest"
object: "xjsfl.modules"
[text] => Array
0: "Gets the manifest for a particular module namespace"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "namespace"
type: "String"
text: "The namespace of the manifest to get"
[return] => Array
[0] => Value
class: "Value"
type: "XML"
text: "The manifest XML"
name: "&nbsp;"
signature: "getManifest(namespace)"
[42] => Function
class: "Function"
line: 1169
name: "getModule"
object: "xjsfl.modules"
[text] => Array
0: "Gets the Module instance for a particular module namespace"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "namespace"
type: "String"
text: "The namespace of the module (should match the AS3 and manifest values)"
[return] => Array
[0] => Value
class: "Value"
type: "Module"
text: "An xJSFL Module instance"
name: "&nbsp;"
signature: "getModule(namespace)"
[43] => Function
class: "Function"
line: 1185
name: "find"
object: "xjsfl.modules"
[text] => Array
0: "Finds and stores information about all module manifests in the xJSFL/modules (or supplied) folder."
1: "Called in the main bootstrap, and can be called manually in the user bootstrap to add other folders."
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "uri"
type: "String"
text: "An optional folder URI to search in, defaults to xJSFL/modules/"
[return] => Array
[0] => Value
class: "Value"
type: "xjsfl"
text: "The main xJSFL object"
name: "&nbsp;"
signature: "find(uri)"
[44] => Function
class: "Function"
line: 1225
name: "init"
object: "xjsfl.modules"
[text] => Array
0: "Initializes, but does not instantiate a module, by caching its manifest files, and copying"
1: "any panel resources to the Flash/WindowSWF folder, and commands to the Commands folder"
2: ""
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "folderNameOrURI"
type: "String"
text: "The module folder name or path, relative to xJSFL/modules/ i.e. "Snippets", or an absolute URI"
signature: "init(folderNameOrURI)"
[45] => Function
class: "Function"
line: 1330
name: "load"
object: "xjsfl.modules"
[text] => Array
0: "Runs the module bootstrap to load code locally into the host panel"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "namespace"
type: "String"
text: "The namespace of the module to initialize"
signature: "load(namespace)"
[46] => Function
class: "Function"
line: 1350
name: "create"
object: "xjsfl.modules"
[text] => Array
0: "Factory method to create an xJSFL module instance"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "namespace"
type: "String"
text: "The namespace of the module (should match the AS3 and manifest values)"
[1] => Param
class: "Param"
name: "properties"
type: "Object"
text: "The properties of the module"
[2] => Param
class: "Param"
name: "window"
type: "Window"
text: "A reference to the window the function was called from"
[return] => Array
[0] => Value
class: "Value"
type: "Module"
text: "An xJSFL Module instance"
name: "&nbsp;"
signature: "create(namespace, properties, window)"
[47] => Heading
class: "Heading"
line: 1401
[text] => Array
0: "UI"
[48] => Variable
class: "Variable"
line: 1408
name: "xjsfl.ui"
object: "xjsfl"
type: "Object"
[text] => Array
0: "Global access to XUL UI dialogs"
1: "Description"
[flags] => Object
class: true
[tags] => Object
[49] => Function
class: "Function"
line: 1417
name: "show"
object: "xjsfl.ui"
[text] => Array
0: "Show a new XUL dialog, nesting if one is already shown"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "xul"
type: "XUL"
text: "A valid XUL object"
[return] => Array
[0] => Value
class: "Value"
type: "Object"
text: "The settings object from the XMLUI"
name: "&nbsp;"
signature: "show(xul)"
[50] => Function
class: "Function"
line: 1471
name: "getState"
object: "xjsfl.ui"
[text] => Array
0: "Lightweight function to return the current UI state"
[flags] => Object
[tags] => Object
signature: "getState()"
[51] => Heading
class: "Heading"
line: 1528
[text] => Array
0: "Initialisation"
[52] => DocComment
class: "DocComment"
line: 1533
[text] => Array
0: "Final setup"
[flags] => Object
[tags] => Object
[53] => Function
class: "Function"
line: 1552
name: "init"
object: "xjsfl.ui"
[text] => Array
0: "Initialize the environment by extracting variables / objects / functions to global scope"
[flags] => Object
[tags] => Object
[param] => Array
[0] => Param
class: "Param"
name: "scope"
type: "Object"
text: "The scope into which the framework should be extracted"
[1] => Param
class: "Param"
name: "scopeName"
type: "String"
text: "An optional id, which when supplied, traces a short message to the Output panel"
signature: "init(scope, scopeName)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment