src/js/libs/spiritual-gui.js
function(opath, context) {
		var result, struct = context || self;
		if (gui.Type.isString(opath)) {
			if (!opath.contains(".")) {
				result = struct[opath];
			} else {
				var parts = opath.split(".");
				parts.every(function(part) {
					struct = struct[part];
					return gui.Type.isDefined(struct);
				});
				result = struct;
			}
		} else {
			throw new TypeError("Expected string, got " + gui.Type.of(opath));
		}
		return result;
	}
function(opath, context) {
		var result, struct = context || self;
		if (gui.Type.isString(opath)) {
			if (!opath.contains(".")) {
				result = struct[opath];
			} else {
				var parts = opath.split(".");
				parts.every(function(part) {
					struct = struct[part];
					return gui.Type.isDefined(struct);
				});
				result = struct;
			}
		} else {
			throw new TypeError("Expected string, got " + gui.Type.of(opath));
		}
		return result;
	}
function ( opath , context ) { var result , struct = context || self ; if ( gui . Type . isString ( opath ) ) { if ( ! opath . contains ( "." ) ) { result = struct [ opath ] ; } else { var parts = opath . split ( "." ) ; parts . every ( function ( part ) { struct = struct [ part ] ; return gui . Type . isDefined ( struct ) ; } ) ; result = struct ; } } else { throw new TypeError ( "Expected string, got " + gui . Type . of ( opath ) ) ; } return result ; }
Lookup object for string of type "my.ns.Thing" in given context or this window.
@param {String} opath Object path eg. "my.ns.Thing"
@param @optional {Window} context
@returns {object}
Lookup object for string of type my . ns . Thing in given context or this window .