[tw] Re: html javascript not working in TW?
Hi Andrew, It's up for testing :) INTRO post: http://groups.google.com/group/tiddlywiki/browse_thread/thread/8b7705e9545ef63a For feedback you can use the INTRO thread have fun! mario -- 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.
[tw] Re: html javascript not working in TW?
I got it working yesterday. You are right, there is a problem with the lexer.js and the TW core program. So it didn't work out of the box. I try to get in contact with the original author now, about the patches, I did. I didn't make a test (yet), if the modified library has the same results, as the unmodified. So it's not sure, if it does work at all. But there is no error message any more :) TiddlySpace is much easier to handle and distribute (at least for me) than a file TW. That's why the question. There are some other questions left: Do you plan to use it, or did you just want to play with the library and see what's possible? As I wrote, I got it working without this nasty error message you encountered. But the whole stuff imo isn't usefull in a TiddlyWiki context. IOM there will be some work to do, to make it usefull. see [a] I also found some info about ESL teachers [1]. Is this, what you do? [a] So if ESL stands for English as a second language, and me as an ELL English Language Learner, I'd find it diffucult to work with such stuff, since the tagger uses MLA's (Multi letter acronyms) to discribe a tagged sentence. I as a user, would want to have some more description about: /DT /VBZ /NN on mouse over. Does this make sense? regards mario [1] http://www.wisegeek.com/what-does-an-esl-teacher-do.htm -- 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.
[tw] Re: html javascript not working in TW?
Hi Mario - with the amount of help you are providing, you can work anywhere you like. I reckon I can 'port' anything you do in Tiddlyspace back to Tiddlywiki file if necessary. I'll certainly be playing around with it a LOT before using it as a teaching aid. You are absolutely right, all those MLAs would kill most students (my most high level student today admitted he doesn't really understand the difference between a noun and a verb - a big lesson for me to learn! - And in fact he is right, the distinction is not 100% simple). Initially I think I will use it to color-code certain classes of words; for example, all finite verbs vs all non-finite verbs, an important distinction. Or perhaps, all determiners in RED for the eastern Europeans (Actually I did this already, since DTs are easy to identify). I want to use authentic materials as source, but mark them up automatically to assist students with reading, or to illustrate features so students can postulate their own rules. I imagine a situation where a student can copy/paste a text they are interested in, and it turns into a kind of lesson. I think illustration is more important than rules. (so in the case of NOUN vs VERB, I can use this tool - modded slightly - to paint the picture. Then the student can make his own rule, just like a native speaker has to) So, anyway, it's a starting point. (mouse-over's are a good idea) It will also help me prepare lessons - a student asked me about modal verbs, and I know they are interested in Italian art. So I can quickly identify sample sentences to illustrate a class on modals. Plus, in experimenting, ideas come. Is there a principled reason why the code doesn't function? My next plan was to re-write in MY code, because a.) Javascript lesson b.) my code is so simple it wouldn't challenge a kindergarten student. Yes, that is my job, pretty much. You might be interested that the most acceptable term these days is TESOL - Speakers of Other Languages, because let's be honest, many people already speak 2/3/4 languages before starting on English. I mainly teach students who are competent how to reach a standard suitable for university - newspapers, blogs, journal articles are the main texts we work with. I'll polish my Tiddlyspace up a bit, and invite you to join it. Thanks again for your time/interest. Andrew On Wednesday, July 4, 2012 5:59:19 PM UTC+10, PMario wrote: I got it working yesterday. You are right, there is a problem with the lexer.js and the TW core program. So it didn't work out of the box. I try to get in contact with the original author now, about the patches, I did. I didn't make a test (yet), if the modified library has the same results, as the unmodified. So it's not sure, if it does work at all. But there is no error message any more :) TiddlySpace is much easier to handle and distribute (at least for me) than a file TW. That's why the question. There are some other questions left: Do you plan to use it, or did you just want to play with the library and see what's possible? As I wrote, I got it working without this nasty error message you encountered. But the whole stuff imo isn't usefull in a TiddlyWiki context. IOM there will be some work to do, to make it usefull. see [a] I also found some info about ESL teachers [1]. Is this, what you do? [a] So if ESL stands for English as a second language, and me as an ELL English Language Learner, I'd find it diffucult to work with such stuff, since the tagger uses MLA's (Multi letter acronyms) to discribe a tagged sentence. I as a user, would want to have some more description about: /DT /VBZ /NN on mouse over. Does this make sense? regards mario [1] http://www.wisegeek.com/what-does-an-esl-teacher-do.htm -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/4ZtppPi-SqkJ. 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.
[tw] Re: html javascript not working in TW?
Thanks again. I did check the supplied snippet and was struck by the similarity - standards,eh :-) Anyway, I've got the three tiddlers setup as you suggest - I assume the fact that the error comes from Lexer.js means that the function has at least been found. I'll play around with a few things, but I do appreciate your assistance. I'm an ESL teacher: my students probably feel about English the way I feel about TW -powerful, but a bit tricky! On Tuesday, 3 July 2012 10:10:19 UTC+10, PMario wrote: On Jul 3, 12:30 am, tejjyid andrew.x.w...@gmail.com wrote: 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. systemConfig tagged tiddlers are ordered by name and started in that order by the TW core. So aa.js has higher priority than bb.js. Did you have a look into sample.html with a text editor? it's quite similar to my general description. script type=text/javascript src=lexer.js/script script type=text/javascript src=lexicon.js_/script script type=text/javascript src=POSTagger.js/script If you name your tiddlers Lexer.js, Lexicon.js_ and POSTagger.js they will be started in the right order. Uppercase has higher priority than lowercase. I'll have a closer look but not now :) -m -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/eiJ8wrcH-8sJ. 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.
[tw] Re: html javascript not working in TW?
Andrew, Do you need this stuff with a file TiddlyWiki or as a TiddlySpace space? Where did you start from? http://tiddlywiki.com or http://tiddlyspace.com On 3 Jul., 12:18, tejjyid andrew.x.w...@gmail.com wrote: Thanks again. I did check the supplied snippet and was struck by the similarity - standards,eh :-) q:-) I'm an ESL teacher: my students probably feel about English the way I feel about TW -powerful, but a bit tricky! ESL? It seems TW is quite attractive for any type of teaching ... -m -- 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.
[tw] Re: html javascript not working in TW?
It's hard to choose; I've been developing a space (for which I've written some simple macros) but this I thought I'd develop this in a file (in case it went pear-shaped). I guess that a Space is not strictly speaking required, unless I get my staffroom involved in a collaborative project. The flexibility of TW makes it perfect for teachers, sort of. Although with freedom comes responsibility... Andrew On Tuesday, 3 July 2012 23:24:33 UTC+10, PMario wrote: Andrew, Do you need this stuff with a file TiddlyWiki or as a TiddlySpace space? Where did you start from? http://tiddlywiki.com or http://tiddlyspace.com On 3 Jul., 12:18, tejjyid andrew.x.w...@gmail.com wrote: Thanks again. I did check the supplied snippet and was struck by the similarity - standards,eh :-) q:-) I'm an ESL teacher: my students probably feel about English the way I feel about TW -powerful, but a bit tricky! ESL? It seems TW is quite attractive for any type of teaching ... -m -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/L-ABpZbzkLsJ. 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.
[tw] Re: html javascript not working in TW?
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 titleSome 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.
[tw] Re: html javascript not working in TW?
On Jul 3, 12:30 am, tejjyid andrew.x.w...@gmail.com wrote: 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. systemConfig tagged tiddlers are ordered by name and started in that order by the TW core. So aa.js has higher priority than bb.js. Did you have a look into sample.html with a text editor? it's quite similar to my general description. script type=text/javascript src=lexer.js/script script type=text/javascript src=lexicon.js_/script script type=text/javascript src=POSTagger.js/script If you name your tiddlers Lexer.js, Lexicon.js_ and POSTagger.js they will be started in the right order. Uppercase has higher priority than lowercase. I'll have a closer look but not now :) -m -- 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.
[tw] Re: html javascript not working in TW?
I had a feeling it might be something like that - I understand that there is a TW handler involved, but it's a bit hairy trying to piece it together from the extant doco. Anyway, I'll work through all this here, and update as I go. Appreciate the scope of the detail in the response. Thanks, Andrew On Saturday, 30 June 2012 23:58:42 UTC+10, PMario 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 titleSome 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 view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/XysZnRBGTX0J. 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.
[tw] Re: html javascript not working in TW?
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 titleSome 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.