[twdev] Re: TW5 create a widget that captures message events

2014-04-06 Thread Stephan Hradek
Am Sonntag, 6. April 2014 00:52:14 UTC+2 schrieb Danielo Rodríguez: But if I enclose the button inside a popup reveal widget it launch the event with the tiddlerTitle as the source tiddler. How can I hidde the button but make it think it is in that tiddler? My cristall ball

Re: [twdev] TW5 create a widget that captures message events

2014-04-06 Thread Jeremy Ruston
Hi Danielo Here is what I am trying var MyWidget = function(parseTreeNode,options) { this.initialise(parseTreeNode,options); this.addEventListeners([ {type: tw-custom-event, handler: handleEvent}, {type: tw-custom-custom2, handler: handleEvent}, ]); }; What am I missing? You'd also

Re: [twdev] Re: TW5 creating a widget SyntaxError: Unexpected token {

2014-04-06 Thread Jeremy Ruston
Hi Danielo JSHint is a tool that checks your JS source for syntax errors. There's an online version here that you can just paste your code into: http://www.jshint.com If you're using TW5 under Node.js you may find it useful to install jshint locally, then, on the command line you can easily

Re: [twdev] TW5 create a widget that captures message events

2014-04-06 Thread Danielo Rodríguez
Hello Stephan and Jeremy Thank you for your answers. I promise you that I defined a complete widget code with two different handlers. The evidence that my code is working is that I moved the code into the navigator widget. Obviously with changes and not the functions that are already

[twdev] Re: [TW5] TiddlyWiki as a CouchApp

2014-04-06 Thread Matabele
Hi Many thanks for this -- I have been struggling (unsuccessfully) with something similar using MongoDB -- using CouchDB with PouchDB appears to be a better approach. regards On Monday, March 24, 2014 7:34:45 PM UTC+2, Jon Udell wrote: OK I have an initial CouchDB adaptor that seems to

Re: [twdev] TW5 create a widget that captures message events

2014-04-06 Thread Danielo Rodríguez
OK, I found the solution!! Muahahahaha! I got my inspiration from the add tag component of the editTemplate. I used a normal reveal with a drop down div inside it. I think I will stick myself with the capture message thing. Here is the code that is not working as a widget but working inside

[twdev] Re: TW5 create a widget that captures message events

2014-04-06 Thread Danielo Rodríguez
I'm learning a lot about TW5, really. I discovered that the navigator widget is instantiated on PageTemplate, that's why it is capturing events and mine not. I get my inspiration from the fieldmanglerWidget which mades me suspect. Now I'm pretty sure that I'm in the good way. El sábado, 5 de

Re: [twdev] TW5 create a widget that captures message events

2014-04-06 Thread Eric Shulman
On Sunday, April 6, 2014 1:06:33 AM UTC-7, Jeremy Ruston wrote: var MyWidget = function(parseTreeNode,options) { this.initialise(parseTreeNode,options); this.addEventListeners([ {type: tw-custom-event, handler: handleEvent}, {type: tw-custom-custom2, handler: handleEvent}, ]); };

Re: [twdev] TW5 create a widget that captures message events

2014-04-06 Thread Danielo Rodríguez
Hello everybody. This is now finished and I achieved my goal. I know about the extra comma. In fact it was not there at the beginning. I added it because the navigator widget has that extra comma. I knew that it makes no difference but I was desperate at that moment. ;) Jeremy, please review

Re: [twdev] TW5 create a widget that captures message events

2014-04-06 Thread Jeremy Ruston
Hi Danielo Jeremy, please review the navigator widget code, It has an extra comma. :P regards Doh! Thanks, much appreciated. Fixed for 5.0.9: https://github.com/Jermolene/TiddlyWiki5/commit/b51d851f939b5259020cf04848a6a726df258b9d Best wishes Jeremy El domingo, 6 de abril de 2014