Re: [tw] TW5 linkcatcher for JSON tiddlers

2014-04-24 Thread Jeremy Ruston
Hi Danielo


I was wondering if it is possible to use the linkcatcher to modify the
 value of a index inside a JSON tiddler.
 Something like $edit-text tiddler=example index=type/


Yes, you should be able to do this:

$linkcatcher set=example##type setTo=myvalue/


 It's to build a control panel where user can set the different options for
 a certain plugin only from drop down lists.


Interesting, I'll look forward to seeing it,

Best wishes

Jeremy




 Thanks in advance.

 --
 You received this message because you are subscribed to the Google Groups
 TiddlyWiki group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to tiddlywiki+unsubscr...@googlegroups.com.
 To post to this group, send email to tiddlywiki@googlegroups.com.
 Visit this group at http://groups.google.com/group/tiddlywiki.
 For more options, visit https://groups.google.com/d/optout.




-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


[tw] TW5 linkcatcher for JSON tiddlers

2014-04-22 Thread Danielo Rodríguez
Hello,

I was wondering if it is possible to use the linkcatcher to modify the 
value of a index inside a JSON tiddler.
Something like $edit-text tiddler=example index=type/

It's to build a control panel where user can set the different options for 
a certain plugin only from drop down lists.

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 Linkcatcher

2014-04-09 Thread Jeremy Ruston
Hi Danielo

 Does that mean that the linkcatcher will intercept any other messache and
change it? or will it deliver both messages? Is it possible to construct a
chain?

The link catcher only responds to navigation messages. It absorbs the
navigation event and just sends the message identified in the `message`
attribute. So, one could create a chain of navigation message handlers, I
think, but not of arbitrary messages.

 I noticed the linkcatcher has a special feature that is not used in any
place

The linkcatcher's ability to forward a message is actually used as part of
the tag drop down handling:

https://github.com/Jermolene/TiddlyWiki5/blob/master/core/ui/EditTemplate/tags.tid#L28

 Other question: Is possible to use a tw-save-tiddler without navigating
to it? I'm editing some drafts from other tiddlers and I don't want to open
the resultant tiddlers after clicking my custom save button.

It sounds like you might be better off displaying these tiddlers in a
custom sub-story. See the interactive version of this tiddler on
tiddlywiki.com:

http://tiddlywiki.com/static/Creating%2520SubStories.html

If you put the tiddlers you're editing in a story you'll still get the
navigation behaviour, but the navigation will take place within the
substory, which is probably what you want.

Best wishes

Jeremy






On Tue, Apr 8, 2014 at 3:18 PM, Danielo Rodríguez rdani...@gmail.comwrote:

 Hello,

 I noticed the linkcatcher has a special feature that is not used in any
 place. The message parameter.

 $linkcatcher message=tw-close-all-tiddlers

 Does that mean that the linkcatcher will intercept any other messache and
 change it? or will it deliver both messages? Is it possible to construct a
 chain?

 Other question: Is possible to use a tw-save-tiddler without navigating to
 it? I'm editing some drafts from other tiddlers and I don't want to open
 the resultant tiddlers after clicking my custom save button.

 Regards.

 --
 You received this message because you are subscribed to the Google Groups
 TiddlyWiki group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to tiddlywiki+unsubscr...@googlegroups.com.
 To post to this group, send email to tiddlywiki@googlegroups.com.
 Visit this group at http://groups.google.com/group/tiddlywiki.
 For more options, visit https://groups.google.com/d/optout.




-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 Linkcatcher

2014-04-09 Thread Danielo Rodríguez



 The link catcher only responds to navigation messages. It absorbs the 
 navigation event and just sends the message identified in the `message` 
 attribute. So, one could create a chain of navigation message handlers, I 
 think, but not of arbitrary messages.

 So it stops the event propagation right? Maybe it could be interesting to 
capture a event, react and raise a secondary event.
 

  I noticed the linkcatcher has a special feature that is not used in any 
 place 

 The linkcatcher's ability to forward a message is actually used as part of 
 the tag drop down handling:


 https://github.com/Jermolene/TiddlyWiki5/blob/master/core/ui/EditTemplate/tags.tid#L28

 Thank you
 

  Other question: Is possible to use a tw-save-tiddler without navigating 
 to it? I'm editing some drafts from other tiddlers and I don't want to open 
 the resultant tiddlers after clicking my custom save button.

 It sounds like you might be better off displaying these tiddlers in a 
 custom sub-story. See the interactive version of this tiddler on 
 tiddlywiki.com:

 http://tiddlywiki.com/static/Creating%2520SubStories.html

 If you put the tiddlers you're editing in a story you'll still get the 
 navigation behaviour, but the navigation will take place within the 
 substory, which is probably what you want.

 Best wishes

 Jeremy



That is very interesting. Is not what I was looking for exactly but it 
could work.
But I see it very interesting for TOC tables. Really really interesting. 

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 Linkcatcher

2014-04-09 Thread Jeremy Ruston
Hi Danielo


 So it stops the event propagation right? Maybe it could be interesting to
 capture a event, react and raise a secondary event.


That is exactly what the linkcatcher widget does: it captures the
tw-navigate event and raises the event named in the `message` attribute. Do
you mean that you'd like the ability to capture arbitrary messages?

Best wishes

Jeremy


-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 Linkcatcher

2014-04-09 Thread Danielo Rodríguez
Hello Jeremy 

I didn't explained myself. I mean capture an event, react is some way and then 
launch a different one. 
What if I want to react to a navigate event and navigate to that tiddler too? 
For example for clear the search field after clicking a link. Maybe using a 
button? 

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 Linkcatcher

2014-04-09 Thread Jeremy Ruston
Hi Danielo

  I didn't explained myself. I mean capture an event, react is some way
and then launch a different one.
 What if I want to react to a navigate event and navigate to that tiddler
too? For example for clear the search field after clicking a link. Maybe
using a button?

That makes sense.

Right now, as you've discovered, widgets that perform actions in response
to user interface input events are fairly restricted in what they can do:

* Emit a message
* Set a tiddler/field/property to a value
* Apply popup processing to a state tiddler
etc

All of the actions at the moment are canned, without much flexibility. At
the other end of the spectrum, one can always write a JavaScript widget
that performs arbitrary logic. So we need to add some flexibility without
making a mechanism that is more complicated than just dropping down to
JavaScript.

For me, this suggests that any way of encoding action logic that resembles
a conventional program is on the wrong track; people might as well just
write JavaScript.

The present system of canned actions could be made more generic: the
presence of an attribute triggers the instantiation of a canned event
handler (which in some cases is parameterised).

So, one way of handling your initial question would be:

* Refactor $linkcatcher widget to be able to catch any message
* Refactor action attributes (ie set/setTo, message, navigateTo etc.) so
that they can be applied to all relevant widgets (including the generic
linkcatcher above)

Then your original example might be:

$eventcatcher catch=tw-navigate set=$:/search setTo=
message=tw-navigate/$eventcatcher

Best wishes

Jeremy






On Wed, Apr 9, 2014 at 2:37 PM, Danielo Rodríguez rdani...@gmail.comwrote:

 Hello Jeremy

 I didn't explained myself. I mean capture an event, react is some way and
 then launch a different one.
 What if I want to react to a navigate event and navigate to that tiddler
 too? For example for clear the search field after clicking a link. Maybe
 using a button?

 --
 You received this message because you are subscribed to the Google Groups
 TiddlyWiki group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to tiddlywiki+unsubscr...@googlegroups.com.
 To post to this group, send email to tiddlywiki@googlegroups.com.
 Visit this group at http://groups.google.com/group/tiddlywiki.
 For more options, visit https://groups.google.com/d/optout.




-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 Linkcatcher

2014-04-09 Thread Danielo Rodríguez
Hello Jeremy. 

Thank you for your explanation. I agree with you that is not possible to 
support all the posible use cases. It's just that I used to stick to TW basic 
core functionalities for compatability reasons  and some times I miss some more 
options. It's not too hard to make a specific widget for this functionality and 
I prefer that rather than editing the core. In fact that is the actual power of 
TW

Again, thank you very much. 

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 Linkcatcher

2014-04-09 Thread Jeremy Ruston
Hi Danielo


 It's not too hard to make a specific widget for this functionality and I
 prefer that rather than editing the core. In fact that is the actual power
 of TW


What's the specific functionality you're after? My proposal covered the use
case as I understood it:

* Refactor $linkcatcher widget to be able to catch any message
* Refactor action attributes (ie set/setTo, message, navigateTo etc.) so
that they can be applied to all relevant widgets (including the generic
linkcatcher above)

Then your original example might be:

$eventcatcher catch=tw-navigate set=$:/search setTo=
message=tw-navigate/$eventcatcher

Best wishes

Jeremy



 Again, thank you very much.

 --
 You received this message because you are subscribed to the Google Groups
 TiddlyWiki group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to tiddlywiki+unsubscr...@googlegroups.com.
 To post to this group, send email to tiddlywiki@googlegroups.com.
 Visit this group at http://groups.google.com/group/tiddlywiki.
 For more options, visit https://groups.google.com/d/optout.




-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


[tw] TW5 Linkcatcher

2014-04-08 Thread Danielo Rodríguez
Hello,

I noticed the linkcatcher has a special feature that is not used in any 
place. The message parameter.

$linkcatcher message=tw-close-all-tiddlers

Does that mean that the linkcatcher will intercept any other messache and 
change it? or will it deliver both messages? Is it possible to construct a 
chain?

Other question: Is possible to use a tw-save-tiddler without navigating to 
it? I'm editing some drafts from other tiddlers and I don't want to open 
the resultant tiddlers after clicking my custom save button.

Regards.

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.