Sorry... too fast. Taking some steps outside gave me the solution : I
forgot some ":" at a file name.

But, another problem :
In node.js, the following line is causing problem
var isFirefox = *window*.mozInnerScreenX != null;

because, I guess, the global var *window* is only defined if using a
browser.

What is the usual way of dealing with this within node.js ??

Thx,
Alain

On Mon, Dec 28, 2015 at 9:39 AM, Alain Dutech <[email protected]> wrote:

> @Felix : thx for the suggestion and the link to Danielo's work.
>
> @All : I have a problem "compiling" my files into a proper plugin
>
> ~/Projets/TW5[master]
> =*> nodejs ./tiddlywiki.js editions/tw5.com <http://tw5.com> --build
> index*
> Error executing boot module
> $:/plugins/snowgoon88/edit-comptext/edit-comptext.js:
> *Error: Cannot find module
> '$:/plugins/snowgoon88/edit-comptext/cursor-position.js'*
>     at Function.Module._resolveFilename (module.js:338:15)
>     at Function.Module._load (module.js:280:25)
>     at Module.require (module.js:364:17)
>     at require (module.js:380:17)
>     at Object.$tw.modules.execute
> (/home/dutech/Projets/TW5/boot/boot.js:695:11)
>     at sandbox.require (/home/dutech/Projets/TW5/boot/boot.js:654:24)
>     at $:/plugins/snowgoon88/edit-comptext/edit-comptext.js:21:27
>     at $:/plugins/snowgoon88/edit-comptext/edit-comptext.js:442:3
>     at $tw.utils.evalSandboxed
> (/home/dutech/Projets/TW5/boot/boot.js:450:5)
>     at Object.$tw.modules.execute
> (/home/dutech/Projets/TW5/boot/boot.js:707:15)
>
> Question : where are the plugins files taken from ? my local hard drive or
> directly on "my"github, master branch ?
>
> *Here is hat I did* :
>
> 1) edited* TW5/editions/tw5.com/tiddlywiki.info
> <http://tw5.com/tiddlywiki.info>* to add "snowgoon88/edit-comptext" in
> the "plugins" array.
>
> 2) in the *TW5/plugins/snowgoon88/edit-comptext* directory
> 2.1) one edit-comptext.js file that start with
> /*\
> title: $:/plugins/snowgoon88/edit-comptext/edit-comptext.js
> type: application/javascript
> module-type: widget
>
> Taken from original Edit-text widget
> Version 5.1.9 of TW5
> Add link-to-tiddler completion
>
> \*/
> (function(){
>
> /*jslint node: true, browser: true */
> /*global $tw: false */
> "use strict";
>
> var DEFAULT_MIN_TEXT_AREA_HEIGHT = "100px"; // Minimum height of textareas
> in pixels
>
> var Widget = require("$:/core/modules/widgets/widget.js").widget;
> // to compute pixel coordinates of cursor
> var getCaretCoordinates = require("
> *$:/plugins/snowgoon88/edit-comptext/cursor-position.js*");
> ....
>
> 2.2) one "*plugin.info <http://plugin.info>*" file with
> {
>         "title": "$:/plugins/snowgoon88/edit-comptext",
>         "description": "Editor with some on-line completion capabilities",
>         "author": "AlainD",
>         "version": "1.0",
>         "core-version": ">=5.0.8",
>         "source": "https://github.com/snowgoon88/TW5-extendedit";,
>         "plugin-type": "plugin",
>         "list": "readme"
> }
>
> 3) in the directory *TW5/plugins/snowgoon88/edit-comptext/files*
> 3.1) one "tiddlywiki.files" with
> {
>         "tiddlers": [
>                 {
>                         "file": "cursor-position.js",
>                         "fields": {
>                                   "type": "application/javascript",
>                                   "title": "
> *$/plugins/snowgoon88/edit-comptext/cursor-position.js*",
>                                   "module-type": "library"
>                         }
>                 }
>         ]
> }
> 3.2) one "*cursor-position.js*" file
>
> On Sun, Dec 27, 2015 at 1:34 PM, Felix Küppers <[email protected]>
> wrote:
>
>> Hi Alain,
>>
>> very glad you picked this up.
>>
>> Would be great if you could also add an autocompletion trigger. When I
>> am inside a word that starts with `[[abc` and I hit a keycombo, then the
>> list pops up with tiddler names matching "abc".
>>
>> In IDEs (Eclipse, Netbeans, Atom, Geany etc.) it is a convention to have
>> ctrl+space trigger autocompletion. But preferably users could pick their
>> own hotkey.
>>
>> For a way to add keycombos, it may be worth considering to extend the
>> textwidget (have a look at Danielo's hotkeys widget:
>>
>> https://github.com/danielo515/TW5-KeyboardSnippets/blob/master/wiki/plugins/extendTextWidget/keyboardSnippets.js#L20
>> ).
>> However, the postRender function is a bit problematic as it can only be
>> overridden once…
>>
>> > What I will consider in the (near) futur :
>> >  - using arrows to select one choice among the listed choices. => I
>> > guess I'll have to dynamically change the css style of the element in
>> > my popup window to achieve this ?
>>
>> Yes, and you need to store the selection index internally of course.
>>
>> > Still a lot to learn :o)
>>
>> I think this plugin is not easy to implement so take your time! ;)
>>
>> -Felix
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "TiddlyWikiDev" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/tiddlywikidev/BXGldH6YK78/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/tiddlywikidev.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/tiddlywikidev/BLU436-SMTP172C5DDED7B1C5C60D1F70CCEFA0%40phx.gbl
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/CAFF9YEGfqhtBGa%3DQ-qYRFXhypJKsKK7e_ygCG8BDt93jwSvAHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to