Basics of browsing the core code 2

26 views
Skip to first unread message

Yakov

unread,
Feb 4, 2012, 4:22:24 PM2/4/12
to TiddlyWikiDev
All right, google.groups don't let me go on with the old thread [1],
so I'll start another one.

So, my question was if there's some way to conveniently search through
the code. For instance, I'd like to find the definition of the
createTiddlyElement. Eric's insideTW [2] suggests that it should be in
Dom.js but Dom.js itself suggests otherwise [3]. As insideTW is
outdated I'd like to check if createTiddlyElement still doesn't allow
to insert elements instead of appending (ok, for my task in a micro-
plugin I just went more low-level and used insertBefore Dom
interface).

Now, I installed git and SmartGit under Windows. I successfully cloned
tiddlywiki from GitHub, but, to my surprise, SmartGit doesn't have a
search tool either. So now I have to find some software which can
search through the TiddlyWiki folder and also allow to conveniently
open and highlignt the syntax in files.

Is anyone aware of such tool (it's ok if it allow to open files with
another editor)? I guess not many developers use Windows.. but perhaps
some web-technology/just cross-platform tool?

[1] http://groups.google.com/group/tiddlywikidev/browse_thread/thread/3f1e19bdecfeee7c
[2] http://tiddlytools.com/insideTW/#createTiddlyElement
[3] https://github.com/TiddlyWiki/tiddlywiki/blob/master/js/Dom.js

PMario

unread,
Feb 4, 2012, 5:46:13 PM2/4/12
to TiddlyWikiDev
git grep is a command line command. low level but powerfull - no other
software needed.
http://book.git-scm.com/4_finding_with_git_grep.html
-m

PMario

unread,
Feb 4, 2012, 6:27:49 PM2/4/12
to TiddlyWikiDev
This may be an option. Many features. Needs some learning. Testing is
free ..
http://www.sublimetext.com/2

Yakov

unread,
Feb 5, 2012, 3:44:44 PM2/5/12
to TiddlyWikiDev
Thanks Mario. I'll start from git grep. Although, I have to figure out
how point which project to look through first.

Jeremy Ruston

unread,
Feb 8, 2012, 11:46:36 AM2/8/12
to tiddly...@googlegroups.com
My habit for browsing the TW source code is to navigate to
tiddlywiki.com, do a view source, and then search through the file
using the browser search function. If you want to find a function
definition, you can usually do so by searching for "n
createTiddlyElem" (ie, a lowercase 'N', a space, and then the function
name). This matches definitions such as:

function createTiddlyElement()

I find that I can generally find stuff much quicker than if I have to
hunt through several different files to find it.

Best wishes

Jeremy

On Sun, Feb 5, 2012 at 8:44 PM, Yakov <yakov.litv...@gmail.com> wrote:
> Thanks Mario. I'll start from git grep. Although, I have to figure out
> how point which project to look through first.
>

> --
> 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.
>

PMario

unread,
Feb 8, 2012, 5:06:50 PM2/8/12
to TiddlyWikiDev
On Feb 8, 5:46 pm, Jeremy Ruston <jeremy.rus...@gmail.com> wrote:
> ... If you want to find a function
> definition, you can usually do so by searching for "n
> createTiddlyElem" (ie, a lowercase 'N', a space, and then the function
> name). This matches definitions such as:
>
> function createTiddlyElement()

There is a similar approach to find the prototype definitions.

pe.gettiddlertext

will find
TiddlyWiki.prototype.getTiddlerText = function(title,defaultText)

-m
Reply all
Reply to author
Forward
0 new messages