Hi,
this must be a bunch of stupid questions but I'm still learning the logic 
of javascript.

1) when is the global $tw variable available?
  - what "module" are required for it to be available ?
  - does it become available after  
`require("$:/core/modules/widgets/widget.js");` ? Why ?
  - how come $tw can be used in the filter.js module ? as show below

exports.getFilterOperators = function() {
    if(!this.filterOperators) {
        $tw.Wiki.prototype.filterOperators = {};
        $tw.modules.applyMethods("filteroperator",this.filterOperators);
    }
    return this.filterOperators;
};

Is it because getFilterOperators is defined inside "exports" ??
 
2) To use the filter API, and in particular the filterTiddler function 
defined in filters.js (see below), must I "require" filter.js, or 
widget.js, or wiki.js or ???

exports.filterTiddlers = function(filterString,widget,source) {
    var fn = this.compileFilter(filterString);
    return fn.call(this,source,widget);
};

3) the `this.wiki` of Widgets is initialized through the option parameters 
in the Widget constructor.
so all the function exported by wiki.js are available through this.wiki ?

4) Is there like a list of "public" function available through $tw, 
$tw.utils and this.wiki ? I am trying to guess by reading through the 
various *.js modules, but I'm my knowledge of JS make this task a bit 
tedious...

Thanks for any hint or explanations or info.
Alain

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/146d14e3-5064-4f2a-933a-3c955fa14c9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to