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

2014-11-30 Thread Tobias Beer
Just don't worry. You are lacking a use case to understand it. At one point it will make sense, also its not really as important as you think it is. Just use it as it is. I'm sure of it, and many thanks for the pointers. One day, that usecase will come by. :) -- You received this

[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

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

2014-11-24 Thread Tobias Beer
Hi Felix, This is probably best discussed at... https://groups.google.com/forum/#!forum/tiddlywikidev ...so as to not overload people who wish to focus on using tw. Best wishes, Tobias. -- You received this message because you are subscribed to the Google Groups TiddlyWikiDev group. To

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

2014-11-24 Thread Tobias Beer
Does... $tw.wiki.compileFilter(filter) ...return a function? If not then tell me what this is supposed to do... iterator(tObj, tRefs[i]); Best wishes, Tobias. -- You received this message because you are subscribed to the Google Groups TiddlyWikiDev group. To unsubscribe from this group

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

2014-11-24 Thread Felix Küppers
Does... $tw.wiki.compileFilter(filter) ...return a function? If not then tell me what this is supposed to do... iterator(tObj, tRefs[i]); Best wishes, Tobias. Hi Tobias, compileFilter returns a compiled filter function. see code at github or topics:

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

2014-11-24 Thread Felix Küppers
Ok, I think it is a misunderstanding on my side. Using all[tiddlers+shadows] prevents source() from being executed. Simply ommiting the all[tiddlers+shadows] part makes tw inject the iterator into the provided source. Hope my explanation is correct. Regards Felix -- You received this message

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

2014-11-24 Thread Tobias Beer
Hi Felix, I thought we are at tiddlywikidev :) Early in the mrning ^^ I already looked at https://github.com/Jermolene/TiddlyWiki5/core/modules/filters/prefix.js https://github.com/Jermolene/TiddlyWiki5/blob/112a9a95d95e9f62f110c97a4faaf537c5c100b1/core/modules/filters/prefix.js

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

2014-11-24 Thread Tobias Beer
Yes, I just figured the same. Any pointers as to all this iterator magic and why it would be executed for some but not for all filters? Best wishes, Tobias. -- You received this message because you are subscribed to the Google Groups TiddlyWikiDev group. To unsubscribe from this group and

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

2014-11-24 Thread Jeremy Ruston
Hi Felix What's going on is that the all filter operator acts as a selector, rather than a filter. It ignores the incoming list of tiddlers, and creates a new list from the store. If you want to filter incoming tiddlers then try the is filter operator. Best wishes Jeremy. On Mon, Nov 24,

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

2014-11-24 Thread Tobias Beer
Hi Jeremy, What's going on is that the all filter operator acts as a selector, rather than a filter. It ignores the incoming list of tiddlers, and creates a new list from the store. Ok, selector vs. filter... - What are the precise processing implications? - What does it have to

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

2014-11-24 Thread Jeremy Ruston
Hi Tobias Ok, selector vs. filter... What are the precise processing implications? What do you mean? What does it have to do with iterator? What is iterator used for? The iterator function is the way that the source list of tiddlers is passed to the compiled filter function. Perhaps

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

2014-11-24 Thread Felix Küppers
Moin Moin, I thought we are at tiddlywikidev :) Early in the mrning ^^ I feel you man :) [$:/library/sjcl.js] What's that telling me? I really don't know. Haha nice. this is the first result picked from the result set of all tiddlers. -- You received this message because

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

2014-11-24 Thread Felix Küppers
Hi Jeremy, What's going on is that the all filter operator acts as a selector, rather than a filter. It ignores the incoming list of tiddlers, and creates a new list from the store. thanks for that explanation! This is also how I understood it in the end: Ok, I think it is a

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

2014-11-24 Thread Felix Küppers
Hi Tobias, this is not so easy you need to read the files at github to get the picture. It has nothing to do with daily filter usage and is only relevant if you want to use a filter on a set of tiddlers - What are the precise processing implications? Selectors decide what tiddlers to

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

2014-11-24 Thread Tobias Beer
Hi Jeremy and Felix, Please ignore my ignorance... [$:/library/sjcl.js] this is the first result picked from the result set of all tiddlers. That I sure figured, but what I still fail to understand is... - What iterator is or does ...and for what purpose I would call it in my

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

2014-11-24 Thread Jeremy Ruston
Hi Tobias The iterator is a JavaScript function that takes a callback as its parameter. It invokes the callback once for each tiddler that is in the source set. Your source function is an iterator; you wouldn't be calling it from your source function. and which is fired in one case but not in

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

2014-11-24 Thread Felix Küppers
- and which is fired in one case but not in the other = Why? It is ignored because the selector all[...] already defines a set of tiddlers and thus does not look at the set of tiddlers by the source function -- You received this message because you are subscribed to the Google

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

2014-11-24 Thread Tobias Beer
Hi Jeremy, Felix, I'd like to understand filtering better which is why I am still asking noob-like questions. So, I'm afraid this might take a bit. I can understand if it's a bit much to ask you to drill a little deeper in the underlying paradigms... taking a closer look at the procedural /

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

2014-11-24 Thread Felix Küppers
How come *[all[]* is a selector defining a set and *[all[shadows]]* or *[all[shadows+tiddlers]]* are not? all[] seems to be just a dummy placeholder which serves no function but to return the source, when you provide a source, you can just ommit it. Is it that, sometimes, source is

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

2014-11-24 Thread Felix Küppers
So many talented developers talking about pre-compiled filters raises my curiosity. Is there any place to read about them? I'm familiar with callbacks and some JavaScript design patterns such as the module pattern. Is that enough to understand this ? Danielo, you understand everything