Event on tiddler open/close

24 views
Skip to first unread message

Arlen Beiler

unread,
Feb 7, 2012, 6:47:30 PM2/7/12
to tiddlywikidev
Is there anyway to detect when a tiddler is opened or closed? I need
it to update a list of opened tiddlers. I checked the Story section,
but I couldn't find any events. Thanks

Eric Shulman

unread,
Feb 7, 2012, 8:03:13 PM2/7/12
to TiddlyWikiDev
Here's the two TWCore functions that you will need to hijack:

story.prototype.displayTiddler(place,title)
story.prototype.closeTiddler(title)

enjoy,
-e


colmjude

unread,
Feb 8, 2012, 6:57:07 AM2/8/12
to TiddlyWikiDev
Just wondering how you are getting on with this and how you are
tackling it?

Seen as TW comes with jQuery integrated I'd probably use the observer
pattern[1] and something like the trigger[2] method to fire custom
events such as openTiddler and closeTiddler.

Anyway just curious to see how you decide to do it.

Colm

[1] - http://addyosmani.com/resources/essentialjsdesignpatterns/book/#observerpatternjavascript
[2] - http://api.jquery.com/trigger/

Arlen Beiler

unread,
Feb 8, 2012, 7:26:33 AM2/8/12
to tiddly...@googlegroups.com
First of all, I have been sleeping over it, as I asked about quitting
time. Second, is there anyway to concatenate a second function onto a
variable? that would be useful.

> --
> You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
> To post to this group, send email to tiddly...@googlegroups.com.
> To unsubscribe from this group, send email to tiddlywikide...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.
>

Reply all
Reply to author
Forward
0 new messages