Hi Mario - I'm working through your suggestions (intalled the #InlineJavaScript plugin, Firebug, done some debugging) and I've got a lot more to do, but sadly there was no "easy win". I still get the same message.
Feel free to ignore this, but if you have the time/inclination, here's the link to the code I'm trying to implement. http://code.google.com/p/jspos/ The "string.match is not a function" message comes out of the Lexer. What I've done is put the POSTagger & Lexer functions, as well as the "database" variables, into the systemConfig-tagged tiddler (is its name important, and if so, in what way?). Then I'm implemeting the "body" code snippet as inline Javascript. Thanks, Andrew On Jun 30, 11:58 pm, PMario <pmari...@gmail.com> wrote: > TiddlyWiki is more like an application, than an HTML page. > > Everything in TW is stored inside a tiddler. While tiddlers are only > stored inside the HTML file, they are not automatically handeld by the > browsers script engine. They are handled by the TW core program. So > the "handling" is a bit different. > > One common html way to acitvate libraries and scripts is similar to > this: > > <html> > <head> > <title>Some title text</title> > a) <link rel="stylesheet" href="../lib/externalLibrary.css"> > b) <script src="../lib/externalLibrary.js"></script> > ... > c)</head> > <body> > > d)<script> > externalLib.doSomething = function (externalGlobalVar) { > // do some stuff here. > } > </script> > > </body> > </html> > > If you copy this snippet into a tiddler it will __not__ work and it > shouldn't, because it doesn't fit TWs structure. > > ==== > > In TW terms: (see markers above) > > a) is done with StyleSheet tiddlers, that are activated by the TW > core. > > b) are library tiddlers tagged systemConfig. > > d) is a plugin call > > ========= > The TW way would be similar to this: > > a) > Copy the content of the CSS (only if it is _really_ needed) to a > StyleSheetLibX tiddler. If it says eg: reset.css _don't_ use it. Only > use library specific css. > > Call this tiddler from StyleSheet > > eg: StyleSheet contains > [[StyleSheetLibX]] > > b) > Copy the _content_ of the externalLibrary.js into a tiddler named > externalLibrary.js and tag it systemConfig > > c) Go to tiddlytools.com and find InlineJavascriptPlugin [1] and > import it to your test TW. Be sure to read and understand > InlineJavascriptPluginInfo! > tag it systemConfig. IinlineJavascriptPlugin activates the use of > <script></script> tags inside a tiddler. This is super cool for fast > prototyping, since you can use most of externalLibraries > documentation. If you know how things work, you should create TW > plugins. > > d) copy something similar to > <script> > externalLib.doSomething = function (externalGlobalVar) { > // do some stuff here. > } > </script> > > into a tiddler. __don't__ tag it systemConfig > > If the library documentation says something like: > > <script src="bla bla"> > externalLib.doSomething = function (externalGlobalVar) { > // do some stuff here. > } > </script> > > _remove_ the src="bla bla" it is not needed with inline javascript > plugin, if you did step a) to c) right. > > ==== > You can use > <script label="clickMe"> > </script> > > to create a button. This will make debugging easier. > > For debugging you should use FireBug browser AddOn for FireFox or the > built in DevTools in Chrome and IE9+ > > ==== > > If you would have added a link to your library of desire, the examples > could be more prezise but imo it will give you some hints :) > > have fun! > mario > > [1]http://www.tiddlytools.com/#InlineJavascriptPlugin -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.