hihi,
You want to have a deep dive session :)
Let's prepare the Trimix
FF with
* Firebug, latest version
* Tiddly sandbox space
ServerSettings contains:
twrelease: alpha
external: true
* you can use aassddff [1]
I did prepare it allready :)
If you didn't use firebug breakpoints yet, you should read it's
breakpoints stuff first [3].
(This will work with chrome's dev tools too. But I don't know them
well. So I use Firebug. If you create your own sandbox you'll have
write access for the test tiddler. Write access isn't needed for the
deep dive session :)
Open firebug script window at aassddff space [1]
<shift> relaod the browser
Above (top-right) the FF console, there is a search box
search for "Formatter" in "alpha_twcore.js" line 820
set a breakpoint
reload browser to enter the main.js again.
it will break at 820
single step _into_ -> alpha_twcore.js
it will jump to line 1137
set a breakpoint at 1144
in line 1140 you'll see the construction of a big this.formatterRegExp
finished at 1144
now search for "list" (including ") line 1367
it will stop several times, till the whole TW is started
just press the "run" button until the TW starts working.
just open the "test" tiddler or
create a new tiddler eg: test that contains the following in your own
space.
* asdf {{asdf{
> some comment
}}}
save or open "test" tiddler
it will stop/brakpoint at 1367
now _single step_ through the source and you'll see, what happens.
if you hover over the "w" variable you'll see, that it is
the ...... :)
if you hover the "w.source" variable you'll see the source of "test"
seen above ...
if you single step through it, you'll see what the stack is for,
how the list html needs to be built with createTiddly.. stuff
(push and pop functions are borrowed from assambler language, where
you have a stack to temporarily store registers. It is a "LIFO" [2]
storage. In js you can use it with arrays). Single step will tell
it :)
.....
And you'll see that you'll need an other breakpoint at: 1681, search:
"customFormat"
and why {{asdf{{...}}} works, ...
_step into_ w.subWikifyTerm(e,this.termRegExp); at line 1410 !!!
have fun!
PS: If all breakpoints are set as described above, and you do a new
"reload browser", it will behave slightly different, at statup, since
some TS formatters are initialized first. It will stop at 1144 first
and then at 820.
PPS: Dealing with breakpoints is described here. basic[3]
[1] http://aassddff.tiddlyspace.com/
[2] http://en.wikipedia.org/wiki/LIFO_%28computing%29
[3] http://getfirebug.com/javascript
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywikidev?hl=en.