[twdev] Re: [TW5] How to correctly use compiled filters not on $tw.wiki but on a given list of titles?

2014-11-25 Thread Felix Küppers
By the way here is an updated version of the utils function which does not redecide on every operation whether to deal with an object or an array, also you may leave out the source to run the filter on the whole wiki. /** * This function facilitates to check whether a list (tRefs) of tiddlers

[twdev] Moving to github as discussion board?

2014-11-25 Thread Felix Küppers
Hi, I think Jeremy mentioned it and it makes a lot of sense. * Sharing code * marking topics * editing posts and topic titles Putting the google board in the github readme as read-only legacy reference. Just wanted to say, I support the idea. This board sometimes makes it hard to be

Re: [twdev] TW5 why use getTextReference instead of getTiddlerText

2014-11-25 Thread Jeremy Ruston
Hi Danielo One would normally use getTextReference() when wants to parse a full text reference (ie including field or index specifier). GetTiddlerText() would be used when is using just a tiddler title, without a field or index specifier. The cases you've pointed to could be implemented with

Re: [twdev] Moving to github as discussion board?

2014-11-25 Thread Jeremy Ruston
Hi Felix For clarity, my suggestion relates to this TiddlyWikiDev discussion group, and not the end-user TiddlyWiki discussion group. The intended audience of TiddlyWikiDev is those doing JS development in or with TiddlyWiki and I don't think it's unreasonable for JS developers to have a GitHub

Re: [twdev] Re: [TW5] How to correctly use compiled filters not on $tw.wiki but on a given list of titles?

2014-11-25 Thread Jeremy Ruston
I've added a basic browser compatibility tiddler: https://github.com/Jermolene/TiddlyWiki5/commit/d52dd870ddad04d59bd59a41d581c81a15b8a2e1 I haven't made any attempt to dig back and figure out which versions of Firefox and Chrome work OK - contributions welcome! Best wishes Jeremy. On Tue,

[twdev] Re: [TW5] how to create a library

2014-11-25 Thread Danielo Rodríguez
I'm going crazy again trying to setup a library. this seems correct, but I got undefined is not a function when I try to execute function returned by the library. Here is the lib code: /*\ title: $:/plugins/danielo515/GASuploader/lib/utils.js type: application/javascript module-type: library

Re: [twdev] Re: [TW5] how to create a library

2014-11-25 Thread Jeremy Ruston
Hi Danielo On Tue, Nov 25, 2014 at 12:19 PM, Danielo Rodríguez rdani...@gmail.com wrote: I found the problem. It was the way I was accessing the property. Instead of use utils.getURL i used utils[getURL] and it worked. Does anybody know why? Is an error in the export module? Those two

Re: [twdev] Re: [TW5] how to create a library

2014-11-25 Thread Danielo Rodríguez
Hello Jeremy, that Is what I thought, but the experience show me that it does not. Here is the library: /*\ title: $:/plugins/danielo515/GASuploader/lib/utils.js type: application/javascript module-type: library Helper function useful for plugin global scope \*/ function utils(){ var GAS_URL

Re: [twdev] Re: [TW5] how to create a library

2014-11-25 Thread Jeremy Ruston
Hi Danielo var utils = require($:/plugins/danielo515/GASuploader/lib/utils.js).utils; this.utils.getURL();// --- ERROR I think this.utils should be utils? Best wishes Jeremy On Tue, Nov 25, 2014 at 2:40 PM, Danielo Rodríguez rdani...@gmail.com wrote: Hello Jeremy, that Is what I

Re: [twdev] Re: [TW5] how to create a library

2014-11-25 Thread Danielo Rodríguez
El martes, 25 de noviembre de 2014 15:42:33 UTC+1, Jeremy Ruston escribió: Hi Danielo var utils = require($:/plugins/danielo515/GASuploader/lib/utils.js).utils; this.utils.getURL();// --- ERROR I think this.utils should be utils? Yes, but it is just an error trying to adapt the

Re: [twdev] Re: [TW5] how to create a library

2014-11-25 Thread Danielo Rodríguez
GOD!! Damm!! How stupid I feel. the answer was in front of me: In fact, if I make a console.log(utils) I get the function in the console. But if I trye console.log(utils.*getUr*l) it fails with undefined is not a function. WH The method is getURL!! STUPID STUPID!!! -- You

[twdev] Re: [TW5] Filter on array doesn't work with prefix filter?

2014-11-25 Thread Danielo Rodríguez
Danielo, you understand everything man, don't worry :) Thank you for your kind words Its no magic. If you often use the same filter just use filter = []; $tw.wiki.compileFilter(filter); filter.call($tw.wiki); you dont need a source. a source is just important when you want to

[twdev] Re: [TW5] Filter on array doesn't work with prefix filter?

2014-11-25 Thread Felix Küppers
Hi Danielo, $tw.wiki.getFilterTiddes() is just a wrapper to compile the filter string for you. take a look at this biiig function that is executed everytime you execute a filter