Re: [twdev] Re: TWC: Is it a good idea to save asynchronously?

2019-08-29 Thread BJ
with the latest code both twc and tw5 are supported on ff and chrome, but
only versions of twc that support the html5 download mechanism (I think a
html5 twc plugin could be written for olderversion).

cheers

BJ
On Wed, 28 Aug 2019 at 22:37, Yakov  wrote:

> Hi BJ,
>
> thanks for both the update/release and the TiddlyTools link. I'll update
> the latter on classic.tiddlywiki.com; I can't predict how soon I'll try
> SaveTiddlers by itself, but the codebase is quite valuable since it covers
> FF *and* Chrome. Did I get the readme.md right that TW5 is saved in both
> Chrome and FireFox while for TWC only FF is supported?
>
> Best regards,
> Yakov.
>
> вторник, 6 августа 2019 г., 13:09:47 UTC+3 пользователь BJ написал:
>>
>> I have made a new version of savetiddlers for classic tw to work with the
>> lastest firefox - I would appreciate it if you (or others) could try it.
>>
>> thanks
>>
>> bj
>>
>> https://github.com/buggyj/savetiddlers/releases/tag/0.9
>>
>> On Tuesday, July 23, 2019 at 9:15:44 AM UTC+2, Yakov wrote:
>>>
>>> Hi BJ,
>>>
>>> when saving the function recreateOriginal() is used to create the new
>>>> twc image
>>>>
>>>
>>> yeah, yesterday I figured too that its the source of the problem. I use
>>> a plugin which overwrites loadOriginal to remove using recreateOriginal
>>> because TiddlyFox wrongly always reports successful saving and I have some
>>> TWs on an ejectable USB storage, so I need to be sure that if saving failed
>>> TW reports fail (TW may be still opened but the storage may be ejected).
>>> That's why I overlooked the issue.
>>>
>>> With chrome and now with firefox (since version 68) loading files from
>>>> 'file:/' is blocked due to security concerns
>>>>
>>>
>>> That's not quite true, setting security.fileuri.strict_origin_policy in
>>> FF still makes it possible to load files via xhr through file: schema (I
>>> haven't tested much, but launching Chrome with the
>>> --allow-file-access-from-files param should do so as well).
>>>
>>> It would be better to remove the message box from the new image. At
>>>> present savetiddlers will not work with a twc that already has a message
>>>> box div - I will work around this and produce a new release.
>>>>
>>>
>>> Could you provide some more details on why it doesn't work now? Because
>>> I'm considering even adding the message box to the core so that development
>>> of future savers that use the event-driven saving is easier.
>>>
>>> *Pengju Yan wrote*
>>>>
>>>> A really serious problem in savetiddlers is the mechanism of avoiding
>>>> saving the same file while a previous saving is not finished. Check the
>>>> dict "debouncing" in "contentscript.js".
>>>>
>>>>
>>> In several cases, the dict "debouncing" was not cleared as expected then
>>>> all my subsequent work was lost without my awareness (I enabled autosave
>>>> and savebackups). I've been suffering from this time by time.
>>>>
>>>
>>> Oh gosh, do you mean you had 2 subsequent saves with a little time gap
>>> between them? (could you describe your scenario so that I'm more aware of
>>> this potential problem? MainTiddlySaver hasn't debouncing implemented yet,
>>> but I never experienced this problem with content, only with options
>>> storage) If there's such problem, we should describe it in detail and refer
>>> to this in future development; I wasn't expecting anything like this in an
>>> extension saver (or may be the source of the problem is a bit different
>>> from what you describe?) We really need a reproducible scenario.
>>>
>>> Also, the dirty flags of successive savings should be managed in a stack
>>>> and cleaned in a proper way (delete certain dirty flags upon receiving
>>>> certain "save-successful" messages).
>>>>
>>>
>>> Yeah, I second this proposal (thinking about it for some time already),
>>> but this is a second level of IO improving which I'd address when a) I
>>> finish making TWC saving async and b) some documentation about
>>> IO/developing savers and editing (collaborating) workflow/infrastructure is
>>> established – because this is a more complicated idea and is less trivial
>>> to implement, especially when there's no docs describing it.
>>>
>>> Best regards,
>>> Y

[twdev] Re: TWC: Is it a good idea to save asynchronously?

2019-08-15 Thread BJ
just to mention that tiddlytools is here:

http://tiddlytools.github.io/

cheers

BJ

On Monday, July 22, 2019 at 9:04:41 AM UTC+2, Yakov wrote:
>
>
>
>> However, for TWC there's one more issue which is only applies to 
>>> upgrading the core. In my tests of upgrading when Timimi is used as a 
>>> saver, I've figured that the script is injected too late when the upgrading 
>>> already tried to save and failed. Though, that was true for the script in 
>>> dev environment and things (like you've noticed) may be different for 
>>> production extension and I should retest this next week with the Timimi 
>>> released with my patch for TWC support.
>>>
>>
>> Cool, looking forward to the solution to the upgrading support.
>>
>
> By the way, I'm not sure about other savers (browser extensions), but 
> TiddlyFox supports upgrading already (I've fixed some issues of the core in 
> 2.9.2); may be I'll implement support of upgrading via download saving in 
> the next release(s) but yeah, it requires more tweaking for wide support.
>  
>
>> Other aspects (you may have already tested) we may need to pay attention 
>> to is to make sure the saver works for importing and exporting (I use 
>> ExportTiddlersPlugin for exporting, although it can't be found since 
>> http://www.tiddlytools.com/ is no longer accessible).
>>
>
> Like many other repos, TiddlyTools is still accessible via web archive 
> <https://web.archive.org/web/20190203140059/http://tiddlytools.com/#ExportTiddlersPlugin>;
>  
> I've tried to contact Eric to learn what happened via email but he hasn't 
> replied. Are there any problems with ExportTiddlersPlugin? Import should 
> work fine without any saver since it uses standart web API. Also, you may 
> want to check out TiddlerInFilePlugin 
> <https://groups.google.com/forum/#!topic/tiddlywikiclassic/9m21gQ7o0EQ> 
> and SharedTiddlersPlugin <http://yakovl.bplaced.net/TW/STP/STP.html>. 
> Basically the support of export may be extended to supporting download 
> saving; in other aspects it's the same as support of saving arbitrary 
> [text] files which depends on a saver engine. Some forms of "importing" 
> (like those in TIFP and STP) in certain use-cases require support of 
> loading files automatically from outside of current folder which normally 
> relies on browser support (xhr restrictions is governed by the 
> security.fileuri.strict_origin_policy setting in FireFox and Chrome can 
> be launched with the --allow-file-access-from-files setting although I 
> haven't tested it for a long time) – that's an ok approach but ideally we 
> need a "saver" which proxies loading and makes it stable (well, 
> MainTiddlyServer implements that partially; perhaps I'll propose that for 
> Timimi too but for now I don't know how to setup and test it 
> <https://github.com/ibnishak/Timimi/issues/25>).
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/43c20f69-957b-49fd-858d-e415a49b2a54%40googlegroups.com.


[twdev] Re: Weird behavior of File Backups with TWc

2019-08-08 Thread BJ
in firefox they fixed a serurity issue, (which now prohibits downloading 
local files)

https://www.mozilla.org/en-US/security/advisories/mfsa2019-21/#CVE-2019-11730

I modified savetiddlers get around this but, now only the latest 
tiddlyclassics with work (those that have the html5 download modifications)

all the best

BJ


On Wednesday, August 7, 2019 at 8:34:19 AM UTC+2, PMario wrote:
>
>  Hi Ton, 
>
> I'll have a closer look. 
>
> -m
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/33750857-bf25-4230-b66a-32e98fb99836%40googlegroups.com.


[twdev] Re: TWC: Is it a good idea to save asynchronously?

2019-08-06 Thread BJ
I have made a new version of savetiddlers for classic tw to work with the 
lastest firefox - I would appreciate it if you (or others) could try it.

thanks

bj 

https://github.com/buggyj/savetiddlers/releases/tag/0.9

On Tuesday, July 23, 2019 at 9:15:44 AM UTC+2, Yakov wrote:
>
> Hi BJ,
>
> when saving the function recreateOriginal() is used to create the new twc 
>> image
>>
>
> yeah, yesterday I figured too that its the source of the problem. I use a 
> plugin which overwrites loadOriginal to remove using recreateOriginal 
> because TiddlyFox wrongly always reports successful saving and I have some 
> TWs on an ejectable USB storage, so I need to be sure that if saving failed 
> TW reports fail (TW may be still opened but the storage may be ejected). 
> That's why I overlooked the issue.
>
> With chrome and now with firefox (since version 68) loading files from 
>> 'file:/' is blocked due to security concerns
>>
>
> That's not quite true, setting security.fileuri.strict_origin_policy in 
> FF still makes it possible to load files via xhr through file: schema (I 
> haven't tested much, but launching Chrome with the 
> --allow-file-access-from-files param should do so as well).
>
> It would be better to remove the message box from the new image. At 
>> present savetiddlers will not work with a twc that already has a message 
>> box div - I will work around this and produce a new release.
>>
>
> Could you provide some more details on why it doesn't work now? Because 
> I'm considering even adding the message box to the core so that development 
> of future savers that use the event-driven saving is easier.
>
> *Pengju Yan wrote*
>>
>> A really serious problem in savetiddlers is the mechanism of avoiding 
>> saving the same file while a previous saving is not finished. Check the 
>> dict "debouncing" in "contentscript.js".
>>  
>>
> In several cases, the dict "debouncing" was not cleared as expected then 
>> all my subsequent work was lost without my awareness (I enabled autosave 
>> and savebackups). I've been suffering from this time by time.
>>
>
> Oh gosh, do you mean you had 2 subsequent saves with a little time gap 
> between them? (could you describe your scenario so that I'm more aware of 
> this potential problem? MainTiddlySaver hasn't debouncing implemented yet, 
> but I never experienced this problem with content, only with options 
> storage) If there's such problem, we should describe it in detail and refer 
> to this in future development; I wasn't expecting anything like this in an 
> extension saver (or may be the source of the problem is a bit different 
> from what you describe?) We really need a reproducible scenario.
>
> Also, the dirty flags of successive savings should be managed in a stack 
>> and cleaned in a proper way (delete certain dirty flags upon receiving 
>> certain "save-successful" messages).
>>
>
> Yeah, I second this proposal (thinking about it for some time already), 
> but this is a second level of IO improving which I'd address when a) I 
> finish making TWC saving async and b) some documentation about 
> IO/developing savers and editing (collaborating) workflow/infrastructure is 
> established – because this is a more complicated idea and is less trivial 
> to implement, especially when there's no docs describing it.
>
> Best regards,
> Yakov.
>
> вторник, 23 июля 2019 г., 4:43:17 UTC+3 пользователь Pengju Yan написал:
>>
>>
>> On Saturday, July 20, 2019 at 11:14:55 PM UTC+8, Pengju Yan wrote:
>>>
>>> Continue the title with "Or we need to modify TWC core substantially?"
>>>
>>> To enable asynchronous loading and saving, I think we need to modify TWC 
>>> core so that only if a "save-successful" message is received then the dirty 
>>> flag could be set to false.
>>>
>>>
>> Also, the dirty flags of successive savings should be managed in a stack 
>> and cleaned in a proper way (delete certain dirty flags upon receiving 
>> certain "save-successful" messages).
>>
>>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/fee14dc3-dc23-4f82-bfe3-e32e2c356a67%40googlegroups.com.


[twdev] Re: TWC: Is it a good idea to save asynchronously?

2019-07-24 Thread BJ
HI Pengju,
savetiddlers uses the download mechanism. With firefox on linux if 2 
downloads to the same file are attempted (that is another download to the 
same file is started before the first has finished) both will fail and the 
original file will have be lost, this is why the de-bounce  was added. I do 
not have access to a mac so cannot test on the mac. I understand that you 
are using version 0.6. I cannot try and fix older version of the extension. 
If you can tell me the problem you have with current version I will 
investigate.

cheers
BJ

On Wednesday, July 24, 2019 at 6:37:05 AM UTC+2, Pengju Yan wrote:
>
>
>
> On Tuesday, July 23, 2019 at 3:15:44 PM UTC+8, Yakov wrote:
>>
>> Oh gosh, do you mean you had 2 subsequent saves with a little time gap 
>> between them? (could you describe your scenario so that I'm more aware of 
>> this potential problem? MainTiddlySaver hasn't debouncing implemented yet, 
>> but I never experienced this problem with content, only with options 
>> storage) If there's such problem, we should describe it in detail and refer 
>> to this in future development; I wasn't expecting anything like this in an 
>> extension saver (or may be the source of the problem is a bit different 
>> from what you describe?) We really need a reproducible scenario.
>>
>
> Yes, exactly. I enabled both autosave and savebackups so that I don't need 
> to worry about any minor mistaken typings (you know we don't have a REDO 
> right?). My TWC file is of >6M size so saving takes seconds to finish. 
> savetidllers work like this way: When the user triggers a saving, it puts 
> file name in the "debouncing" dict and will remove it from the dict once 
> the saving finishes. But in several cases, it just doesn't removed my file 
> name from the "debouncing" dict and then all my subsequent savings will 
> just don't happen. I guess this problem will happen if I trigger successive 
> savings with just a very short time period in between, although I'm not 
> very sure.
>
> After several cases of catastrophic losses, I wrote a local crontab (macOS 
> launchctl) script to monitor my backup folders to check whether subsequent 
> backup files are of the same length (indicating that the main TWC file is 
> not successfully changed). That's how I survived before Timimi+TWC appeared.
>
> Seems like BJ is the developer of savetiddlers? I suggest the author takes 
> a serious look at this issue (if the author likes to maintain it in a long 
> term) and I'll help to discuss about the reproduction.
>  
> Anyway, I don't think "debouncing" is necessary. It does not hurt even if 
> the user saves too frequently. So in my own (unsuccessful) modified 
> savetiddlers, I simply removed this mechanism (Though it doesn't not work 
> under FireFox 68.0.1).
>
> I don't think we need any documentation talking about this problem, 
> because it happens just within a specific saver.
>
> Yeah, I second this proposal (thinking about it for some time already), 
>> but this is a second level of IO improving which I'd address when a) I 
>> finish making TWC saving async and b) some documentation about 
>> IO/developing savers and editing (collaborating) workflow/infrastructure is 
>> established – because this is a more complicated idea and is less trivial 
>> to implement, especially when there's no docs describing it.
>>
>>  Great. We can first make asynchronous saving work and then improves it.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/651b87ee-6a10-4bb6-9c58-72355c8ae0cf%40googlegroups.com.


[twdev] Re: TWC: Is it a good idea to save asynchronously?

2019-07-23 Thread BJ
Hi Yakov,
savetiddlers assumes that if there is a message box then another saver has 
added it and therefore savetiddlers will deactive as it is not needed. I 
will change this to check to the attribute "data-message-box-creator" 
having value "savetiddlers". This means you can add the message box to the 
core twc, just make the "data-message-box-creator" an empty string.

The main problem I see with the saving is the twc assume that saving is 
synchronous when it is in fact asynchronous. Tiddlyfox and savetiddler fire 
the event "tiddlyfox-have-saved-file" when the tiddlywiki is saved, - in 
tw5 this is listened for and only when it fires is the message displayed 
that says the tw is saved.


On Tuesday, July 23, 2019 at 9:15:44 AM UTC+2, Yakov wrote:

Hi BJ,
>
> when saving the function recreateOriginal() is used to create the new twc 
>> image
>>
>
> yeah, yesterday I figured too that its the source of the problem. I use a 
> plugin which overwrites loadOriginal to remove using recreateOriginal 
> because TiddlyFox wrongly always reports successful saving and I have some 
> TWs on an ejectable USB storage, so I need to be sure that if saving failed 
> TW reports fail (TW may be still opened but the storage may be ejected). 
> That's why I overlooked the issue.
>
> With chrome and now with firefox (since version 68) loading files from 
>> 'file:/' is blocked due to security concerns
>>
>
> That's not quite true, setting security.fileuri.strict_origin_policy in 
> FF still makes it possible to load files via xhr through file: schema (I 
> haven't tested much, but launching Chrome with the 
> --allow-file-access-from-files param should do so as well).
>
> It would be better to remove the message box from the new image. At 
>> present savetiddlers will not work with a twc that already has a message 
>> box div - I will work around this and produce a new release.
>>
>
> Could you provide some more details on why it doesn't work now? Because 
> I'm considering even adding the message box to the core so that development 
> of future savers that use the event-driven saving is easier.
>
> *Pengju Yan wrote*
>>
>> A really serious problem in savetiddlers is the mechanism of avoiding 
>> saving the same file while a previous saving is not finished. Check the 
>> dict "debouncing" in "contentscript.js".
>>  
>>
> In several cases, the dict "debouncing" was not cleared as expected then 
>> all my subsequent work was lost without my awareness (I enabled autosave 
>> and savebackups). I've been suffering from this time by time.
>>
>
> Oh gosh, do you mean you had 2 subsequent saves with a little time gap 
> between them? (could you describe your scenario so that I'm more aware of 
> this potential problem? MainTiddlySaver hasn't debouncing implemented yet, 
> but I never experienced this problem with content, only with options 
> storage) If there's such problem, we should describe it in detail and refer 
> to this in future development; I wasn't expecting anything like this in an 
> extension saver (or may be the source of the problem is a bit different 
> from what you describe?) We really need a reproducible scenario.
>
> Also, the dirty flags of successive savings should be managed in a stack 
>> and cleaned in a proper way (delete certain dirty flags upon receiving 
>> certain "save-successful" messages).
>>
>
> Yeah, I second this proposal (thinking about it for some time already), 
> but this is a second level of IO improving which I'd address when a) I 
> finish making TWC saving async and b) some documentation about 
> IO/developing savers and editing (collaborating) workflow/infrastructure is 
> established – because this is a more complicated idea and is less trivial 
> to implement, especially when there's no docs describing it.
>
> Best regards,
> Yakov.
>
> вторник, 23 июля 2019 г., 4:43:17 UTC+3 пользователь Pengju Yan написал:
>>
>>
>> On Saturday, July 20, 2019 at 11:14:55 PM UTC+8, Pengju Yan wrote:
>>>
>>> Continue the title with "Or we need to modify TWC core substantially?"
>>>
>>> To enable asynchronous loading and saving, I think we need to modify TWC 
>>> core so that only if a "save-successful" message is received then the dirty 
>>> flag could be set to false.
>>>
>>>
>> Also, the dirty flags of successive savings should be managed in a stack 
>> and cleaned in a proper way (delete certain dirty flags upon receiving 
>> certain "save-successful" messages).
>>
>>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/b741f216-963b-43bb-b776-8dc8e858b139%40googlegroups.com.


[twdev] Re: TWC: Is it a good idea to save asynchronously?

2019-07-22 Thread BJ
Hi Yakov,
savetiddlers overrides the functions mozillaLoadFile()  and 
mozillaSaveFile() the same as tiddlyfox. With chrome and now with firefox 
(since version 68) loading files from 'file:/' is blocked due to security 
concerns, this means that when saving the function recreateOriginal() is 
used to create the new twc image. There is a problem with this function, in 
that it uses what is in the dom for the new image, this will include the 
message box div that has been injected by savetiddlers. It is possible that 
other browser plugins will inject in the dom as well. It would be better to 
remove the message box from the new image. At present savetiddlers will not 
work with a twc that already has a message box div - I will work around 
this and produce a new release.

cheers
BJ

On Sunday, July 21, 2019 at 10:54:24 PM UTC+2, Yakov wrote:
>
> Hi Pengju,
>
> суббота, 20 июля 2019 г., 18:14:55 UTC+3 пользователь Pengju Yan написал:
>>
>> Continue the title with "Or we need to modify TWC core substantially?"
>>
>> actually, I'm currently working on this and certain changes will be 
> present in TW 2.9.3. I'm certain that async *loading* will make it into 
> the next release (loadFile will try to load in an async fashion when it 
> gets a second argument which should be a callback; and if XMLHttpRequest 
> fails it will fallback to sync loading; also the async part will be in a 
> separate method which can be overwritten by some event-driven loader or any 
> other service).
>
> Once async loading is implemented (note: loading is used by saving; 
> actually, I've already implemented async loading, but I have to test it 
> before committing), saving will work "faster" ("hanging" will be shorter) 
> and also the road to async saving will be clear.. more or less: saving is 
> more tricky because of download saving. Still, I think I have an idea how 
> to approach the issue correctly.
>
> When async saving is implemented, savers will be able to overwrite it as 
> well and the IO functionality will be consistent (although some work on 
> documenting 
> the approach 
> <https://groups.google.com/forum/#!topic/tiddlywikidev/e8hAHYLWUbQ> is 
> also required so that the dev ecosystem becomes stable and there's as 
> little need to distinguish TWC and TW5 as possible). However, for TWC 
> there's one more issue which is only applies to upgrading the core. In my 
> tests of upgrading when Timimi is used as a saver, I've figured that the 
> script is injected too late when the upgrading already tried to save and 
> failed. Though, that was true for the script in dev environment and things 
> (like you've noticed) may be different for production extension and I 
> should retest this next week with the Timimi released with my patch for TWC 
> support.
>
> I also have to notice that saving methods in TWC should be refactored in 
> another aspect: they wrongly mix file manipulation and various reporting 
> stuff which makes those difficult to tweak for certain purposes; but that's 
> not that important for now.
>
> I used savetiddlers <https://github.com/buggyj/savetiddlers> (only 
>> version 0.6 worked on my FireFox with macOS while 0.8 simply didn't) to 
>> save my TWC until FireFox was automatically updated to 68.0.1 last week.
>>
>> I learned all the code of savetiddlers and the saving mechanism of TWC 
>> while I was trying to fix some problems in savetiddlers. Although I'm not 
>> 100% sure, I'm suspicious about the asynchronous philosophy (as Yakov 
>> mentioned several times), at least for the current implementation of TWC 
>> core.
>>
>> To my understanding, saveMain() in TWC will set the dirty flag to false 
>> after saveFile() returns. Consider you are working a big TWC file, and 
>> saving take several seconds to accomplish. Between subsequent 2 savings, 
>> something will happen this way:
>>
>> 1. You finish editing a tiddler A and click the done button. A save 
>> message will send to a saver.
>>
>> 2. Because the saving operation is asynchronous, saveFile() immediately 
>> returns and then the dirty flag is set to false.
>>
>> 3. The saver is downloading the new TWC file with the update tiddler A.
>>
>> 4. Before the new TWC file downloading finishes, you edit another tiddler 
>> B and finish editing it and click the done button. The TWC core will load 
>> the original TWC file from the local file system *WITHOUT* the updated 
>> tiddler A, and send another saving message to the saver. Because in step 2 
>> the dirty flag is set to false, this time the updated content contains only 
>> updated tiddler B and the *ORIGINAL* tidder A (tiddler A is thought to 
>&

[twdev] Re: TWC: Is it a good idea to save asynchronously?

2019-07-20 Thread BJ
there is a work around for using savetiddlers with ff 68 see

https://github.com/buggyj/savetiddlers/issues/44

bj

On Saturday, July 20, 2019 at 5:14:55 PM UTC+2, Pengju Yan wrote:
>
> Continue the title with "Or we need to modify TWC core substantially?"
>
> I used savetiddlers <https://github.com/buggyj/savetiddlers> (only 
> version 0.6 worked on my FireFox with macOS while 0.8 simply didn't) to 
> save my TWC until FireFox was automatically updated to 68.0.1 last week.
>
> I learned all the code of savetiddlers and the saving mechanism of TWC 
> while I was trying to fix some problems in savetiddlers. Although I'm not 
> 100% sure, I'm suspicious about the asynchronous philosophy (as Yakov 
> mentioned several times), at least for the current implementation of TWC 
> core.
>
> To my understanding, saveMain() in TWC will set the dirty flag to false 
> after saveFile() returns. Consider you are working a big TWC file, and 
> saving take several seconds to accomplish. Between subsequent 2 savings, 
> something will happen this way:
>
> 1. You finish editing a tiddler A and click the done button. A save 
> message will send to a saver.
>
> 2. Because the saving operation is asynchronous, saveFile() immediately 
> returns and then the dirty flag is set to false.
>
> 3. The saver is downloading the new TWC file with the update tiddler A.
>
> 4. Before the new TWC file downloading finishes, you edit another tiddler 
> B and finish editing it and click the done button. The TWC core will load 
> the original TWC file from the local file system *WITHOUT* the updated 
> tiddler A, and send another saving message to the saver. Because in step 2 
> the dirty flag is set to false, this time the updated content contains only 
> updated tiddler B and the *ORIGINAL* tidder A (tiddler A is thought to be 
> already up-to-date).
>
> 5. The saver makes a new download operation where the TWC file to be saved 
> contains only the original content with the updated tiddler B.
>
> 6. A few seconds later, the first downloading finishes, now the local TWC 
> file contains original content and updated tiddler A.
>
> 7. Another few seconds later, the second downloading finishes, now the 
> local TWC file contains original content and updated tiddler B.
>
> 8. Note that ultimately you lose your work on tiddler A.
>
> To be honest, I haven't done any test to check whether the situation above 
> will happen. But anyway, I think asynchronous saving needs more thorough 
> thinking.
>
> To enable asynchronous loading and saving, I think we need to modify TWC 
> core so that only if a "save-successful" message is received then the dirty 
> flag could be set to false.
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/2d7ecd11-3d42-48c3-9516-e3a5f030de68%40googlegroups.com.


[twdev] Re: widget complex attribute

2019-07-19 Thread BJ
this is the normal behavior of macros - they act differently when used as 
parameter values to widget then when used alone.

When used alone the return values are 'wikified' but not when used as 
parameter values

hope this helps 

BJ

On Thursday, July 18, 2019 at 10:20:35 PM UTC+2, Sebastian Ovide wrote:
>
> Hello All
>
> I'm building by first widget. It accepts an attribute and it works. Now 
> I'm trying to create that attribute from a macro but the value from the 
> macro, even if displayed correctly, it is not converted into text inside 
> the attribute. 
>
> /define macro_good()
> 1,2,3,4,5,6
> /end
> /define macro_bad()
> 1,2,3,{{blabla!!blabla}},5,6
> /end
>
> <>
> <>
>
> <$myWidget att=<>>
> <$myWidget att=<>>
>
>
>
> <> and <> display exactly the same result on the 
> tiddler but the attribute that <$myWidget att=<>> gets is the 
> string "1,2,3,{{blabla!!blabla}},5,6" instead of "1,2,3,4,5,6"
>
> any ideas ?
>
> thanks
>  
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/bc795480-c45f-46ec-9252-30930c074314%40googlegroups.com.


[twdev] Re: Diff comparison for hacked shadow tids?

2019-06-25 Thread BJ
In the per-release, if you edit a shadow tid, there is an output option, in 
the preview panel, to view the difference to the orignal

https://tiddlywiki.com/prerelease/

BJ

On Tuesday, June 25, 2019 at 10:52:49 PM UTC+2, Mat wrote:
>
> Is there a native or plugin way to see diffs between two tids, in 
> particular hacked shadow tids vs original?
>
> Thanks
>
> <:-)
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/74a68655-a6de-4972-a205-cce2461a5b42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] [Node] How to add a javascript at main page in node (chat)

2019-05-27 Thread BJ
HI Daniel,
the html page is created using the template
$:/core/templates/tiddlywiki5.html
(location of file is at core\templates\tiddlywiki5.html.tid)

so you could add you stuff in there I guess

all the best

BJ

On Monday, May 27, 2019 at 9:07:39 PM UTC+2, Daniel G wrote:
>
> Hi!
>
> I'm trying to add a javascript at main page that opens a chat window at 
> the bottom and maintain all time while the page is opened, but in node. In 
> the single file option I just added my javascript before the \body tag and 
> works well, but in node I really don't know how to do it.
>
> I tried a lot of ways and with various tags but without sucess.
>
> Anybody can help me? (I'm a noob in tiddlywiki)
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/1ce27bd7-4941-4f90-b8d1-e85cd45f4ac7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: What is that browser-messaging in the console?

2019-05-02 Thread BJ
$:/core/modules/browser-messaging.js -its a startup module (module-type: 
startup )you could try and change the module type (or delete it)


On Thursday, May 2, 2019 at 3:32:00 PM UTC+2, LinOnetwo wrote:
>
> Hi,
>
> I'm running 
>
> tiddlywiki demo-wiki --listen host=localhost
>
> Maybe it's from some filesystem syncadaptor?
>
> I'm overwhelmed by the message generated, my own debug console.log are 
> washed away by those logs...
>
>
> 在 2019年5月2日星期四 UTC+8下午5:54:14,PMario写道:
>>
>> Hi, 
>>
>> There is no browser-messaging.js module in the TW core.  Which system 
>> do you use?
>>
>> -m
>>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/07048501-8115-4858-9e55-406b71735702%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: How to deal with window is not defined

2019-05-02 Thread BJ
maybe you can put the condition around all the code:

if ($tw && $tw.browser){
function .

etc


exports.adaptorClass = SoLiDTiddlyWikiSyncAdaptor
}


On Wednesday, May 1, 2019 at 6:36:07 PM UTC+2, LinOnetwo wrote:
>
> if ($tw && $tw.browser) exports.adaptorClass = SoLiDTiddlyWikiSyncAdaptor
>
> But when starting tiddlywiki from command line, it still throws 
>
> ReferenceError: window is not defined
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/4dbc924a-6c1f-4a4f-9f51-384fd14b1ed4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Getting a tiddler's fields from a widget plugin (JS)?

2019-03-05 Thread BJ
it can be obtained from the transclusion variable:

mywidget.getTidName = function() {
var transclusion = this.getVariable("transclusion");
if (transclusion) {
return transclusion.split('|')[1];
}
else {
return "";
}
}


On Monday, March 4, 2019 at 1:37:56 AM UTC+1, stefano franchi wrote:
>
> I am sure this is stupid question whose answer is staring at me, but I 
> can't find it:
>
> How do you access a tiddler from within a widget plugin's code?
>
> All I was able to find is that 
> 1. All tiddlers are accessible by title from $tw.wiki
> 2. The title of a tiddle is stored in the widget's parent's 
> transcludeTitle 
>
> So, when I need the value of myField I end up with this expression in the 
> plugin code:
>
> myFieldValue = 
> $tw.wiki(this.parentWidget.transcludeTitle).fields["myField"]
>
> which looks to me as going from New York to Boston via Tokyo. Besides, I 
> dislike using globals and would rather have the widget telling me the 
> tiddler data it is working on. 
>
> Surely there's a better way?
>
> Cheers,
>
> Stefano
>
> -- 
> __
> Stefano Franchi
>
> stefano...@gmail.com 
> http://stefano.cleinias.org
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/64cc13a0-1ce2-4f47-8d67-4352b65cad01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Plugin works only in the example wiki

2018-08-29 Thread BJ
note that tiddlywiki is not like other node apps. When using tiddlywiki on 
node, usually this means to be running a server instance of tiddlywiki in 
node which is serving a client instant of tiddlywiki in the browser. The 
client is very similar to the standalone version of tiddlywiki. Does you 
parser need to work in the server and client instances of tiddlywiki?

note also that when  tiddlywiki starts it creates its own version of the 
'require' functionally. 

On Wednesday, August 29, 2018 at 8:33:29 AM UTC+2, bimlas wrote:
>
> Found the root of the problem: Asciidoctor.js does not works without 
> dependencies on Node. For details, see 
> https://github.com/asciidoctor/asciidoctor.js/issues/539
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/830c6d63-fb4f-400c-ae20-c1d6ca21d021%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Plugin works only in the example wiki

2018-08-27 Thread BJ
Hi Bimlas,
 I downloaded an empty tw from tiddlywiki.com and then dragged your plugin 
from https://bimlas.gitlab.io/tw5-asciidoctor/ and dropped it in the empty 
tw - it works ok -- in chrome 68 on xubuntu 18.04

cheers

BJ

On Monday, August 27, 2018 at 10:05:48 AM UTC+2, bimlas wrote:
>
> Hi!
>
> I just created a plugin to parse Asciidoctor in TiddlyWiki:
>
> http://bimlas.gitlab.io/tw5-asciidoctor/
>
> It works but only in this wiki - when I trying to install to my own, then 
> it prints the following error after restart:
>
> Internal JavaScript Error 
> Well, this is embarrassing. It is recommended that you restart TiddlyWiki 
> by refreshing your browser 
> Uncaught TypeError: Cannot read property 'call' of undefined
>
>
> Screenshot:  https://i.imgur.com/0EEC32l.png
>
> Somebody can help me to find the problem? The source code of the plugin 
> can be found at https://gitlab.com/bimlas/tw5-asciidoctor
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/8a3a81f2-ee33-4a40-b450-1bf82adabde7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Creating widgets

2018-07-10 Thread BJ
Hi Tony,

There are two aspects (at least) to widgets - creating the widget tree and 
creating the dom tree.

I think the vars widget (vars.js) shows the main features of constructing 
the widget tree: 

the main construction part of a widget is the render() function (which 
calls execute):



VarsWidget.prototype.execute = function() {
// Parse variables
var self = this;
$tw.utils.each(this.attributes,function(val,key) {
if(key.charAt(0) !== "$") {
self.setVariable(key,val); //-> create variables in this 
widget
}
});
// Construct the child widgets
this.makeChildWidgets(); //> create the immediate child widgets -- 
this will use this.parseTreeNode as the source for the child widgets 
};




then render the created child widgets (this calls their render() functions):



this.renderChildren(parent,nextSibling);



this.parseTreeNode is the nodes  between the <$vars> and 



If you look in the transclusion, or macrocall widget,  you will see

this.makeChildWidgets(parseTreeNodes); 

- here instead of using the nodes between <$transclude> and  
the transclude widget creates a new parse tree from the transcluded tiddler 
and inserts its nodes.











On Tuesday, July 10, 2018 at 2:14:16 AM UTC+2, TonyM wrote:
>
> Folks,
>
> As my expertise develops, I would be interested in moving a couple of my 
> macros into widgets. I understand widgets could be anything, but many can 
> also be similar.
>
> I am particularly interested in widgets that have an open and close like 
> the <$list and 
> Are their any primers or guides in addition to 
> https://tiddlywiki.com/dev/#WidgetModules ? 
>
> I am interested in a template widget that encode the critical items and 
> indicates where some changes can be applied, kind of for the "script 
> kiddies".
>
> thanks Tony 
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/a6867b8d-b053-4cb7-948f-6c87aa117e03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Embedding Java Script

2018-06-19 Thread BJ
you also need a 'module-type' field on the macro and set the value to 
'macro'

On Wednesday, June 20, 2018 at 1:47:05 AM UTC+2, TonyM wrote:
>
> Bj,
>
> That "obvious mistake was fixed but still no result.
> I am not sure how to "debug" this, but I will try inspect.
>
> Regards
> Tony
>
>
> On Monday, June 18, 2018 at 8:42:44 PM UTC+10, BJ wrote:
>>
>> the tid $:/PSaT/yammer/embed.js needs to be type "application/javascript" 
>> not json
>>
>> On Monday, June 18, 2018 at 2:08:33 AM UTC+2, TonyM wrote:
>>>
>>> Bj, et al..
>>>
>>> I have followed your instructions and built the three tiddlers and 
>>> reading through I kind of follow what is happening, however I am only 
>>> getting a multi-row blank tiddler.
>>>
>>> If you join yammer https://www.yammer.com/tiddlywiki you could see the 
>>> conversion as well, in yammer, and I would love your review of Yammer as 
>>> well.
>>>
>>> I have attached the three tiddlers in a JSON file, The $:/PSaT/yammer/embed 
>>> tiddler should be displaying the view.
>>>
>>> Further assistance would be appreciated.
>>>
>>> Regards
>>> Tony
>>>
>>> On Saturday, June 16, 2018 at 7:22:13 AM UTC+10, BJ wrote:
>>>>
>>>> you can use a js macro (set module-type to macro, and type to 
>>>> application/javascript):
>>>>
>>>> /*jslint node: true, browser: true */
>>>> /*global $tw: false */
>>>> "use strict";
>>>>
>>>> exports.name = "yam";
>>>>
>>>> exports.params = [{name: "container"},{name: "id"}
>>>> ];
>>>> /*
>>>> Run the macro
>>>> */
>>>>
>>>> exports.run = function(container,id) {
>>>> yam.connect.embedFeed({
>>>>  container: "#"+container,
>>>>  network: "tiddlywiki",
>>>>  feedType: "group",
>>>>  feedId: id
>>>> });
>>>> return "";
>>>> }
>>>>
>>>>
>>>> and as Jed said put
>>>>
>>>>
>>>> https://s0.assets-yammer.com/assets/platform_embed.js&quot</a>;>
>>>>
>>>>
>>>> in a tid tagged with 
>>>> $:/tags/RawMarkup
>>>>
>>>> then call it from a tid:
>>>>
>>>> 
>>>> <>
>>>>
>>>> all the best 
>>>> BJ
>>>>
>>>>
>>>> On Friday, June 15, 2018 at 4:36:48 AM UTC+2, TonyM wrote:
>>>>>
>>>>> Hi Folks,
>>>>>
>>>>> I am trying to determine how to make the following work in TiddlyWiki, 
>>>>> It allows a user to embed a Yammer conversation into a TiddlyWiki.
>>>>>
>>>>> 
>>>>> https://s0.assets-yammer.com/assets/platform_embed.js&quot</a>;>
>>>>> 
>>>>> yam.connect.embedFeed({
>>>>>   container: "#embedded-feed",
>>>>>   network: "tiddlywiki",
>>>>>   feedType: "group",
>>>>>   feedId: "15224909"
>>>>> });
>>>>> 
>>>>>
>>>>> Of Course in the above, the display occurs with
>>>>> 
>>>>>
>>>>> It will make discussing a specific wiki simple. I can past this into 
>>>>> Raw HTML on a website, or in a WordPress Post and it works. It uses 
>>>>> external script code, So I imagine it would be easy to implement.
>>>>>
>>>>> However imbeding java script is out side my skills in TiddlWiki so far.
>>>>>
>>>>> I have tried placing the contents of 
>>>>> https://s0.assets-yammer.com/assets/platform_embed.js
>>>>> then
>>>>> yam.connect.embedFeed({
>>>>>   container: "#embedded-feed",
>>>>>   network: "tiddlywiki",
>>>>>   feedType: "group",
>>>>>   feedId: "15224909"
>>>>> });
>>>>>
>>>>> in a tiddler of type application, to no effect
>>>>>
>>>>> Thanks in advance
>>>>> Tony
>>>>>
>>>>>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/fa13c78d-1d98-4ba6-90ea-361761e9afbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Embedding Java Script

2018-06-18 Thread BJ
the tid $:/PSaT/yammer/embed.js needs to be type "application/javascript" 
not json

On Monday, June 18, 2018 at 2:08:33 AM UTC+2, TonyM wrote:
>
> Bj, et al..
>
> I have followed your instructions and built the three tiddlers and reading 
> through I kind of follow what is happening, however I am only getting a 
> multi-row blank tiddler.
>
> If you join yammer https://www.yammer.com/tiddlywiki you could see the 
> conversion as well, in yammer, and I would love your review of Yammer as 
> well.
>
> I have attached the three tiddlers in a JSON file, The $:/PSaT/yammer/embed 
> tiddler should be displaying the view.
>
> Further assistance would be appreciated.
>
> Regards
> Tony
>
> On Saturday, June 16, 2018 at 7:22:13 AM UTC+10, BJ wrote:
>>
>> you can use a js macro (set module-type to macro, and type to 
>> application/javascript):
>>
>> /*jslint node: true, browser: true */
>> /*global $tw: false */
>> "use strict";
>>
>> exports.name = "yam";
>>
>> exports.params = [{name: "container"},{name: "id"}
>> ];
>> /*
>> Run the macro
>> */
>>
>> exports.run = function(container,id) {
>> yam.connect.embedFeed({
>>  container: "#"+container,
>>  network: "tiddlywiki",
>>  feedType: "group",
>>  feedId: id
>> });
>> return "";
>> }
>>
>>
>> and as Jed said put
>>
>>
>> https://s0.assets-yammer.com/assets/platform_embed.js&quot</a>;>
>>
>>
>> in a tid tagged with 
>> $:/tags/RawMarkup
>>
>> then call it from a tid:
>>
>> 
>> <>
>>
>> all the best 
>> BJ
>>
>>
>> On Friday, June 15, 2018 at 4:36:48 AM UTC+2, TonyM wrote:
>>>
>>> Hi Folks,
>>>
>>> I am trying to determine how to make the following work in TiddlyWiki, 
>>> It allows a user to embed a Yammer conversation into a TiddlyWiki.
>>>
>>> 
>>> https://s0.assets-yammer.com/assets/platform_embed.js&quot</a>;>
>>> 
>>> yam.connect.embedFeed({
>>>   container: "#embedded-feed",
>>>   network: "tiddlywiki",
>>>   feedType: "group",
>>>   feedId: "15224909"
>>> });
>>> 
>>>
>>> Of Course in the above, the display occurs with
>>> 
>>>
>>> It will make discussing a specific wiki simple. I can past this into Raw 
>>> HTML on a website, or in a WordPress Post and it works. It uses external 
>>> script code, So I imagine it would be easy to implement.
>>>
>>> However imbeding java script is out side my skills in TiddlWiki so far.
>>>
>>> I have tried placing the contents of 
>>> https://s0.assets-yammer.com/assets/platform_embed.js
>>> then
>>> yam.connect.embedFeed({
>>>   container: "#embedded-feed",
>>>   network: "tiddlywiki",
>>>   feedType: "group",
>>>   feedId: "15224909"
>>> });
>>>
>>> in a tiddler of type application, to no effect
>>>
>>> Thanks in advance
>>> Tony
>>>
>>>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/6826f0bc-92b6-45de-ab17-e9303164daf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Embedding Java Script

2018-06-15 Thread BJ
you can use a js macro (set module-type to macro, and type to 
application/javascript):

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

exports.name = "yam";

exports.params = [{name: "container"},{name: "id"}
];
/*
Run the macro
*/

exports.run = function(container,id) {
yam.connect.embedFeed({
 container: "#"+container,
 network: "tiddlywiki",
 feedType: "group",
 feedId: id
});
return "";
}


and as Jed said put


https://s0.assets-yammer.com/assets/platform_embed.js&quot</a>;>


in a tid tagged with 
$:/tags/RawMarkup

then call it from a tid:


<>

all the best 
BJ


On Friday, June 15, 2018 at 4:36:48 AM UTC+2, TonyM wrote:
>
> Hi Folks,
>
> I am trying to determine how to make the following work in TiddlyWiki, It 
> allows a user to embed a Yammer conversation into a TiddlyWiki.
>
> 
> https://s0.assets-yammer.com/assets/platform_embed.js&quot</a>;>
> 
> yam.connect.embedFeed({
>   container: "#embedded-feed",
>   network: "tiddlywiki",
>   feedType: "group",
>   feedId: "15224909"
> });
> 
>
> Of Course in the above, the display occurs with
> 
>
> It will make discussing a specific wiki simple. I can past this into Raw 
> HTML on a website, or in a WordPress Post and it works. It uses external 
> script code, So I imagine it would be easy to implement.
>
> However imbeding java script is out side my skills in TiddlWiki so far.
>
> I have tried placing the contents of 
> https://s0.assets-yammer.com/assets/platform_embed.js
> then
> yam.connect.embedFeed({
>   container: "#embedded-feed",
>   network: "tiddlywiki",
>   feedType: "group",
>   feedId: "15224909"
> });
>
> in a tiddler of type application, to no effect
>
> Thanks in advance
> Tony
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/1ecb3cfe-45b4-4411-b701-f7d62a8d38fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: How does TW find the plugins folder ?

2018-05-02 Thread BJ
The default plugin location is next to the core folder -

tw\core
tw\editions
tw\plugins

then you put plugins as

tw\plugins\bj\flexitype\pluginsfiles
tw\plugins\bj\visualeditor\pluginsfiles
etc


all the best 
BJ
On Tuesday, May 1, 2018 at 11:45:15 AM UTC+2, Danielo Rodríguez wrote:
>
> Hello,
>
> I'm trying to setup a multi-plugin development workflow, but, as usual, 
> I'm confused about how TW works.
> What I want, ideally, is a plugin folder containing all my built plugins 
> on an hierarchical way, and then an editions folder where, on each edition 
> I can decide which plugins to include.
>
> Currently the only thing I'm getting is targeting built my plugins inside 
> the plugins folder of the edition. This is far from ideal. I am aware of 
> the env variable TIDDLYWIKI_PLUGIN_PATH but that can get cumbersome 
> because I already have that pointing to a different location, and including 
> more than one means problems when switching between windows and linux.
>
> So, how does the official tiddlywiki find the plugins folder ? It does not 
> have any env variable set, the plugins folder it's outside of any folder 
> so... how ?
>
> I know that from time to time I come here asking something similar, but it 
> happens to me that each time I come back to tw development I spend one day 
> or two trying to figure what's the best way.
>
>
> Regards
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/c4036474-0463-44c7-b57b-4a1fb9c90c71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Forloop plugin by ibnishak.github.io

2018-04-29 Thread BJ
you need to do it like this:

var re = new RegExp(forvar, 'g');for (; i <= max; i += iter) {
   textBuffer.push(text.replace(re, i));
}

all the best BJ
On Sunday, April 29, 2018 at 4:03:52 PM UTC+2, Bala Chandra wrote:
>
> It replaces only the first instance of the forvar .. So i tried to modify 
> the code of $:/plugins/tesseract/forloop/forloop.js  (
> https://ibnishak.github.io/Tesseract/pluginsandmacros/index.html#Simple%20for-loop%20macro
> )
>
>
> for (; i <= max; i += iter) {
> textBuffer.push(text.replace(forvar, i));
> }
>
>
> to
>
> for (; i <= max; i += iter) {
> textBuffer.push(text.replace(/forvar/gi, i));
> }
>
>
> However, even then the code doesnt do a global replace ... any ideas?
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/b8fd3de8-14af-4da8-be28-47b906e25c62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Any chance for a single-tiddler story "river"?

2018-02-08 Thread BJ
you can hack the  $:/core/ui/PageTemplate tiddler to do this by the 'close 
all other tiddlers' message.

add this link catcher widget under the navigate widget like so


<$linkcatcher message="tm-navigate"  actions=<>>
<$dropzone>

<$list 
filter="[all[shadows+tiddlers]tag[$:/tags/PageTemplate]!has[draft.of]]" 
variable="listItem">

<$transclude tiddler=<>/>







and add  this definition at the top:

\define closeother()
<$action-sendmessage $message="tm-close-other-tiddlers" 
$param=<>/>
\end

all the best 
BJ

On Thursday, February 8, 2018 at 6:06:18 PM UTC+1, TheDiveO wrote:
>
> Is there any chance for a single-tiddler story river, where only one 
> tiddler is shown in the river?
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/8273a9cb-5614-448e-bccd-0dbc59108a7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: An "errors and warnings" display for tiddlers?

2018-01-19 Thread BJ
Another possibility would be to have an error log tiddler - this would be a 
temp tiddler - not saved, to stop it becoming large. All widgets and js 
macros could write to this tiddler, it could even be a 'virtual' tiddler, 
not stored in the store but connected to $tw - this would be for 
performance reasons.

On Thursday, January 18, 2018 at 7:20:09 PM UTC, Evan Balster wrote:
>
> Hey, all —
>
> I've been thinking recently about how TiddlyWiki could benefit from 
> something like the "errors and warnings" list provided by a compiler.  When 
> displayed or previewed, the tiddler would display a small "problems" badge 
> that could be expanded to display an accumulated list of any problems 
> detected in the course of parsing, execution and rendering.  This would 
> help with a number of situations where TiddlyWiki simply doesn't do what is 
> expected.
>
> At a baseline this could be a very simple listing of each error message, 
> paired with a line number indicating where the originating widget lies.  
> Some kind of "catcher" widget enclosing the tiddler could accumulate these 
> messages as they're generated.  Other widgets like transclude and macrocall 
> could catch and modify the messages to note any indirections in their 
> origin.  But bells and whistles aren't really necessary in the short term — 
> just a way to see the information in the first place.  Improvements can be 
> made gradually.
>
> I'm mainly thinking about this because it's becoming increasingly apparent 
> I need a better way to indicate various errors in formula computation, 
> which is often used to generate attribute values or placed inside SVGs 
> (making any error text output invisible).
>
>
> As a sidenote, this mechanism might be useful for implementing refresh 
> integrity checks.  When those diagnostics are active, any discrepancy in 
> the refresh could be noted as a critical error.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/959e6d06-b962-4be6-acab-7c9b8174ef1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Implementing a timer to trigger action widgets?

2018-01-08 Thread BJ

In case you haven't see it, there is a ticket to implement a destroy() 
function to be called before widgets are removed. 

https://github.com/Jermolene/TiddlyWiki5/issues/1784


On Sunday, January 7, 2018 at 8:54:19 PM UTC+1, Evan Balster wrote:
>
> Hey, Jeremy —
>
> As we discussed on today's dev call, I'm not asking for a refresh timer 
> but a timer that triggers action widgets.  I've been working on a prototype 
> as of last night, and it uses the old "setTimeout" and "setInterval" 
> methods.  I have a mechanism in place to check that the widget has not been 
> destroyed or refreshed by the time the timer goes off, to prevent "zombie 
> timers" from having any effect.
>
> With my prototype timer, I have been able to implement a simple simulation 
> of a bouncing ball.  A more generally useful algorithm I'd like to write is 
> a self-organizing map to visualize relationships among some tiddlers.  
> Unsurprisingly framerate is quite poor when using the tiddler store as a 
> state mechanism, with filter re-invocations consuming a large amount of 
> time and processing power.
>
> I'll share my demos in a little bit.
>
> On Saturday, 6 January 2018 07:08:11 UTC-6, PMario wrote:
>>
>> On Friday, January 5, 2018 at 8:10:24 PM UTC+1, Evan Balster wrote:
>>>
>>> Is there any prior art for this?  Are there gotchas related to 
>>> server-side rendering I should be aware of?
>>>
>>
>> There may be some gotchas, except battery problems. 
>>
>> see: 
>> https://stackoverflow.com/questions/6032429/chrome-timeouts-interval-suspended-in-background-tabs
>>
>> -m
>>
>>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/fdd86bf3-8a39-435f-b291-3e1518a87125%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] [TW5/TWX] Replacing macros with WikiText functions

2018-01-04 Thread BJ


On Thursday, January 4, 2018 at 9:40:09 PM UTC+1, BJ wrote:
>
>
>
> On Thursday, January 4, 2018 at 8:56:29 PM UTC+1, Evan Balster wrote:
>>
>> there is caching in the core - see 'getCacheForTiddler' 
>>>
>>
>> Haha, I almost bit my tongue when I sent that E-mail — I was aware of the 
>> cache mechanism but hadn't seen that it was implemented for parse trees as 
>> well.
>>
>> Trouble is, transclusions *don't* use the parse tree cache.  They call 
>> parseTextReference, which parses the transcluded tiddler with the current 
>> ruleset.  Part of the trouble with implementing a parse-caching 
>> optimization is that the context where the tiddler is transcluded might 
>> define different parse rules, resulting in a different parse tree for that 
>> context.  As noted by other users 
>> <https://groups.google.com/forum/#!topic/tiddlywiki/eQRf8Wun3Zo>, 
>> however, this "feature" can be unexpected or undesirable.
>>
> There is no 'context for transclusions' in tiddlywiki, the parsing is 
determined by the content of the tiddler (includings the pragmas).
 

>
> if the transclusion is for a 'text' then  parseTextReference calls 
> parseTiddler which uses the caches. 
>
>>
>> On Thursday, 4 January 2018 13:09:18 UTC-6, BJ wrote:
>>>
>>>
>>>
>>> On Thursday, January 4, 2018 at 7:48:00 PM UTC+1, Evan Balster wrote:
>>>>
>>>> Hey, all —
>>>>
>>>> I have a plugin that defines parametrized tiddlers as components, there 
>>>>> is a demo here:
>>>>>
>>>>
>>>> Neat!  So under the hood this is functionally equivalent to 
>>>> <$vars><$transclude/> right?
>>>>
>>>
>>> that correct -its to avoid the parsing of macros, but also to make 
>>> wikitext components to be more like equivalents to widgets.
>>>
>>>>
>>>> What I'd really like to see in the future is a "parse-tree cache" for 
>>>> more efficient transclusions.
>>>>
>>>
>>> there is caching in the core - see 'getCacheForTiddler' 
>>>
>>>>
>>>>
>>>> ...Turning to another aspect of TWX, my idea is that it should be 
>>>>> written in C, and compiled to WebAssembly...
>>>>>
>>>>
>>>> ...I'd love to go with rust here...
>>>>
>>>>
>>>> Hmmm...  I've got thoughts on this but I'd rather start a new thread so 
>>>> this one doesn't veer off-topic.
>>>>
>>>>
>>>> On Thursday, 4 January 2018 06:20:18 UTC-6, Jeremy Ruston wrote:
>>>>>
>>>>>
>>>>> IMO creating a new kernel should use a language that was designed to 
>>>>> create kernels :) ... I'd love to go with rust here.
>>>>>
>>>>>
>>>>> Indeed, Rust would probably be a better choice these days.
>>>>>
>>>>> Best wishes
>>>>>
>>>>> Jeremy.
>>>>>
>>>>>
>>>>> Just a thought
>>>>>
>>>>> -m
>>>>>
>>>>> -- 
>>>>> 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 tiddlywikide...@googlegroups.com.
>>>>> To post to this group, send email to tiddly...@googlegroups.com.
>>>>> 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/2e218423-1c94-4f75-ad6d-784824a9b972%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/tiddlywikidev/2e218423-1c94-4f75-ad6d-784824a9b972%40googlegroups.com?utm_medium=email_source=footer>
>>>>> .
>>>>> 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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/b1f28adf-2d8c-41b9-b269-dde089880efe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] [TW5/TWX] Replacing macros with WikiText functions

2018-01-04 Thread BJ


On Thursday, January 4, 2018 at 8:56:29 PM UTC+1, Evan Balster wrote:
>
> there is caching in the core - see 'getCacheForTiddler' 
>>
>
> Haha, I almost bit my tongue when I sent that E-mail — I was aware of the 
> cache mechanism but hadn't seen that it was implemented for parse trees as 
> well.
>
> Trouble is, transclusions *don't* use the parse tree cache.  They call 
> parseTextReference, which parses the transcluded tiddler with the current 
> ruleset.  Part of the trouble with implementing a parse-caching 
> optimization is that the context where the tiddler is transcluded might 
> define different parse rules, resulting in a different parse tree for that 
> context.  As noted by other users 
> <https://groups.google.com/forum/#!topic/tiddlywiki/eQRf8Wun3Zo>, 
> however, this "feature" can be unexpected or undesirable.
>

if the transclusion is for a 'text' then  parseTextReference calls 
parseTiddler which uses the caches. 

>
> On Thursday, 4 January 2018 13:09:18 UTC-6, BJ wrote:
>>
>>
>>
>> On Thursday, January 4, 2018 at 7:48:00 PM UTC+1, Evan Balster wrote:
>>>
>>> Hey, all —
>>>
>>> I have a plugin that defines parametrized tiddlers as components, there 
>>>> is a demo here:
>>>>
>>>
>>> Neat!  So under the hood this is functionally equivalent to 
>>> <$vars><$transclude/> right?
>>>
>>
>> that correct -its to avoid the parsing of macros, but also to make 
>> wikitext components to be more like equivalents to widgets.
>>
>>>
>>> What I'd really like to see in the future is a "parse-tree cache" for 
>>> more efficient transclusions.
>>>
>>
>> there is caching in the core - see 'getCacheForTiddler' 
>>
>>>
>>>
>>> ...Turning to another aspect of TWX, my idea is that it should be 
>>>> written in C, and compiled to WebAssembly...
>>>>
>>>
>>> ...I'd love to go with rust here...
>>>
>>>
>>> Hmmm...  I've got thoughts on this but I'd rather start a new thread so 
>>> this one doesn't veer off-topic.
>>>
>>>
>>> On Thursday, 4 January 2018 06:20:18 UTC-6, Jeremy Ruston wrote:
>>>>
>>>>
>>>> IMO creating a new kernel should use a language that was designed to 
>>>> create kernels :) ... I'd love to go with rust here.
>>>>
>>>>
>>>> Indeed, Rust would probably be a better choice these days.
>>>>
>>>> Best wishes
>>>>
>>>> Jeremy.
>>>>
>>>>
>>>> Just a thought
>>>>
>>>> -m
>>>>
>>>> -- 
>>>> 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 tiddlywikide...@googlegroups.com.
>>>> To post to this group, send email to tiddly...@googlegroups.com.
>>>> 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/2e218423-1c94-4f75-ad6d-784824a9b972%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/tiddlywikidev/2e218423-1c94-4f75-ad6d-784824a9b972%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>> 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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/2bb979d0-a9f7-4846-b73f-fdca372b2ddf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] [TW5/TWX] Replacing macros with WikiText functions

2018-01-04 Thread BJ


On Thursday, January 4, 2018 at 7:48:00 PM UTC+1, Evan Balster wrote:
>
> Hey, all —
>
> I have a plugin that defines parametrized tiddlers as components, there is 
>> a demo here:
>>
>
> Neat!  So under the hood this is functionally equivalent to 
> <$vars><$transclude/> right?
>

that correct -its to avoid the parsing of macros, but also to make wikitext 
components to be more like equivalents to widgets.

>
> What I'd really like to see in the future is a "parse-tree cache" for more 
> efficient transclusions.
>

there is caching in the core - see 'getCacheForTiddler' 

>
>
> ...Turning to another aspect of TWX, my idea is that it should be written 
>> in C, and compiled to WebAssembly...
>>
>
> ...I'd love to go with rust here...
>
>
> Hmmm...  I've got thoughts on this but I'd rather start a new thread so 
> this one doesn't veer off-topic.
>
>
> On Thursday, 4 January 2018 06:20:18 UTC-6, Jeremy Ruston wrote:
>>
>>
>> IMO creating a new kernel should use a language that was designed to 
>> create kernels :) ... I'd love to go with rust here.
>>
>>
>> Indeed, Rust would probably be a better choice these days.
>>
>> Best wishes
>>
>> Jeremy.
>>
>>
>> Just a thought
>>
>> -m
>>
>> -- 
>> 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 tiddlywikide...@googlegroups.com.
>> To post to this group, send email to tiddly...@googlegroups.com.
>> 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/2e218423-1c94-4f75-ad6d-784824a9b972%40googlegroups.com
>>  
>> 
>> .
>> 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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/3038b263-aadd-4e16-8001-5105081303fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5/TWX] Replacing macros with WikiText functions

2018-01-03 Thread BJ
I have a plugin that defines parametrized tiddlers as components, there is 
a demo here:

http://components.tiddlyspot.com/

The demo overrides the implementation of the tabs macro as an example.

BJ

On Wednesday, January 3, 2018 at 8:01:05 AM UTC+1, Evan Balster wrote:
>
> Hey, all —
>
> A while ago I noticed Jeremy expressing some regrets about how TiddlyWiki 
> has become dependent on text substitution macros, and suggesting that TWX 
> will do something differently:
>
> *Jeremy Ruston:*
>
> Thus, there are lots of quite prominent features that were introduced 
>> early on and that I would now handle differently (eg, the fact there is a 
>> difference between transclusion and the view widget, or the presence of 
>> text substitution macros which I now think was a mistake).
>>
>
> Having developed a lot of things in TW *and* reviewed the widget 
> architecture with an eye for performance, I have to agree.  People across 
> the experience gamut seem to routinely stumble on the order-of-operations 
> involved in parsing widgets and expanding macros.  I'm also speaking as a 
> compiler-designer:  I've made the mistake of letting macros stand in for 
> functions in a language I've designed, and it was a problem for both 
> maintainability and performance.
>
> I view TiddlyWiki as a functional programming system, where each widget is 
> a node with some parameters (attributes, parse tree / children) and a 
> result (DOM tree).  Macros are the de-facto stand in for programmable 
> subroutines, but they are unstructured and must be re-parsed whenever they 
> appear.  Transcluded tiddlers may also behave like subroutines, and while 
> they're structured they don't support explicit parameters.
>
>
> The solution I anticipate would be to introduce a "wiki-function" entity 
> which is pre-parsed and whose invocation does nothing more than set a few 
> variables and instantiate its parse tree into widgets.  Perhaps something 
> like this, widget-wise, with a WikiText syntax to get rid of the 
> boilerplate:
>
> <$function $name="tablerows" filter>
> <$list filter=<> >
> 
> {{!!title}}
> {{!!field1}}
> {{!!field2}}
> 
> 
> 
>
>
> 
> 
> Title
> field1
> field2
> 
> Important Stuff
> <$call $name="tablerows" filter="[tag[Tag1]tag[Important]]" />
> Less-Important Stuff
> <$call $name="tablerows" filter="[tag[Tag1]!tag[Important]]" />
> 
>
> Now, this *does* look basically the same as a macro call.  The 
> differences are crucial, though: lower parsing and refresh overhead, only 
> <> for variables, and no gotchas with quoting, whitespace, 
> order-of-operations or open markup.  As far as I'm concerned, the 
> similarity in usage could make transitioning trivial in many cases and the 
> more consistent behavior could make TiddlyWiki "programming" much easier to 
> learn.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/962d34c7-dcf7-41bd-82f9-84332bc463e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Build Process for TiddlyWiki Classic

2017-11-02 Thread BJ
what version of the core can be used to build TWC?

On Wednesday, November 1, 2017 at 6:03:54 PM UTC+1, Jeremy Ruston wrote:
>
> Hi Yakov
>
> Apologies for the late response.
>
> I'm afraid I can't help with cook/ginsu; I always found them difficult to 
> use because I'm not familiar with Ruby. That was what drove me to rewrite 
> the TWC build process with TW5 back in 2011.
>
> I've just tried to get the TW5-based build process running and found that 
> it is currently broken due to a minor change in TW5 since it was last used.
>
> I'm happy to get things fixed up again, or should I wait to see how you 
> get on with cook/ginsu?
>
> Best wishes
>
> Jeremy.
>
>
>
>
> On Sun, Oct 29, 2017 at 11:40 PM, Yakov  > wrote:
>
>> Hello everyone,
>>
>> not sure if it's worthy to post here since the thread is very old; still 
>> it seems to have almost every reference I've found so far, so...
>>
>> I'm on Windows (10) and I'd like to build TWc core. I've pulled 
>> TiddlyWiki Classic repo (my branch 
>>  that I'd like to build 
>> and test), installed Ruby (v2.4.2 x64), pulled 
>> https://github.com/TiddlyWiki/cooker to a separate folder, tried run to 
>> biuld and got an error that takes place even if I just run cook.rb -h:
>>
>> > installations>/Ruby_2_4__x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in
>>  
>> `require': cannot load such file -- recipe (LoadError)
>> from > installations>/Ruby_2_4__x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in
>>  
>> `require'
>> from /cook.rb:7:in `'
>>
>> Can anybody help me with that? I'd like to take maintainance of TWc, but 
>> for that (and for my own needs) I have to learn how to build TWc core!
>>
>> Guidance regarding building TWC with TW5 is also appreciated, but it 
>> seems that using cook should be quite simple and there's either something 
>> that's broken or I'm missing some simple detail. I have no knowledge of 
>> Ruby yet, though.
>>
>> Best regards,
>> Yakov.
>>
>> суббота, 9 марта 2013 г., 14:24:06 UTC+3 пользователь Jeremy Ruston 
>> написал:
>>>
>>> Hi Tobias
>>>
>>> I've made a couple of pull requests that get the TW2 tests running with 
>>> the new build environment:
>>>
>>> https://github.com/TiddlyWiki/tiddlywiki/pull/119 - updates the test 
>>> recipe and tiddler format to the latest versions understood by the new tools
>>>
>>> https://github.com/TiddlyWiki/tiddlywiki.com/pull/10 - adds a line to 
>>> bld.sh to build the tests.html file
>>>
>>> (I also made some changes to TW5 to get things working, so you'll need 
>>> the latest version of that too).
>>>
>>> At the moment you can run the tests by opening tests.html in the 
>>> browser. The next step is to use phantom.js to run the tests automatically.
>>>
>>> Best wishes
>>>
>>> Jeremy
>>>
>>>
>>>
>>> On Thu, Mar 7, 2013 at 11:26 PM, Tobias Beer  wrote:
>>>
 Thanks Jeremy,

 I'll try to...

- dig into this
- see if I can get to set up my machine and build the thing
   - perhaps using both, the old and new process
- see what I can bring over to TiddlyWikiDev 
   - I like things at one place (less scattered)

 Cheers, Tobias.

>>>
>>>
>>>
>>> -- 
>>> Jeremy Ruston
>>> mailto:jeremy...@gmail.com
>>>
>> -- 
>> 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 tiddlywikide...@googlegroups.com .
>> To post to this group, send email to tiddly...@googlegroups.com 
>> .
>> 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/44bd4148-caf3-44b4-b552-1f82d641bf86%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Jeremy Ruston
> mailto:jeremy...@gmail.com 
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/31de5d30-70bb-484a-a94e-6990e04ea447%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Trying to create an action widget... and failing.

2017-10-16 Thread BJ
Hi 

I gave it a try like this

<$mytest>
<$button message="myTest-message">
x



you need to delete 'tiddler' here



var newTiddler = new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,{

all the best
BJ

On Monday, October 16, 2017 at 4:40:24 AM UTC+2, myst...@gmail.com wrote:
>
> I am trying to create a simple testing widget that listens for a message, 
> and creates a new tiddler.
>
> I've had no louck with this, and as best i can tell, my widgets event 
> handler is never triggering.
>
> Any assistance in pointing out what i am doing wrong would be greatly 
> appreciated.
>
> Thanks,
>   -- Kenn
>
> /*\
>
> title: myTestWidget
> type: application/javascript
> module-type: widget
>
> myTest widget
>
> \*/
> (function(){
>
> /*jslint node: true, browser: true */
> /*global $tw: false */
> "use strict";
>
> var Widget = require("$:/core/modules/widgets/widget.js").widget;
>
> var myTestWidget = function(parseTreeNode,options) {
> this.initialise(parseTreeNode,options);
> this.addEventListeners([
> {type: "myTest-message", handler: "handlemyTestEvent"}
> ]);
> };
>
> /*
> Inherit from the base widget class
> */
> myTestWidget.prototype = new Widget();
>
> /*
> Render this widget into the DOM
> */
> myTestWidget.prototype.render = function(parent,nextSibling) {
> this.parentDomNode = parent;
> this.computeAttributes();
> this.execute();
> this.renderChildren(parent,nextSibling);
> };
>
> /*
> Compute the internal state of the widget
> */
> myTestWidget.prototype.execute = function() {
> // Get attributes
>
> // Construct the child widgets
> this.makeChildWidgets();
> };
>
> /*
> Selectively refreshes the widget if needed. Returns true if the widget or any 
> of its children needed re-rendering
> */
> myTestWidget.prototype.refresh = function(changedTiddlers) {
> var changedAttributes = this.computeAttributes();
> if(changedAttributes.story || changedAttributes.history) {
> this.refreshSelf();
> return true;
> } else {
> return this.refreshChildren(changedTiddlers);
> }
> };
>
>
> myTestWidget.prototype.handlemyTestEvent = function(event){
> var loginTiddler = this.wiki.getTiddler("$:/state/login");
>
> var newTiddler = new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,{
>   title: "DebugTiddler",
>   "draft.title": undefined,
>   "draft.of": undefined
> },this.wiki.getModificationFields());
> this.wiki.addTiddler(newTiddler);
> };
>
> exports.mytest = myTestWidget;
>
> })();
>
>
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/abfa7bf1-3111-4196-853c-b86f00b8d4db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Changing the Rendering of Html?

2017-10-07 Thread BJ
I don't know of any rules about where to post question

I think that question involving overriding core functionality provided by 
javascript can be answered here.

Firstly do you wish the extra markup to be applied globally, that is 
including the tiddlywiki UI or just to some tiddlers?

There are a number of ways of achiving this,

1) prepass the wikitext and add in the extra markup
2) override the parser rules 
3) the parser produces a AST, apply changes to the AST before the rendering
4) override the element widget.

I feel that 3 is the least hacky approch.

if you want non-global effect then 1 is simplest as the solution already 
exits.

If you want global effect 4 is the easiest

I would Monkey patch the tw5 parser (global effect) option 3:

The parses are loaded in the startup module 
$:/core/modules/startup/load-modules.js
by calling $tw.wiki.initParsers() which populates the array 
$tw.Wiki.parsers[].

the parser refrenced by $tw.Wiki.parsers["text/vnd.tddlywiki"] needs to be 
replaced with the new parser.
This is best achieved by including an extra startup module that runs after 
$:/core/modules/startup/load-modules.js 
with the simple code to replace this item in the array.

you can see an example of changing the AST in the markdown plugin: 
$:/plugins/tiddlywiki/markdown/wrapper.js, you 
can follow this pattern to produce the new parser.

all the best 

BJ

On Saturday, October 7, 2017 at 3:09:46 AM UTC+1, A X. wrote:
>
> I think I posted it in the wrong section:
>
> I want to change the way h? tags are rendered. Logic: If H? tag, then add 
> element after.  Do I have to write a widget or is there a much more simple 
> way to do this?
>
> Possible place: $:/core/modules/widgets/element.js
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/f47e32c2-a13d-44f1-9cd7-b578ac4e891e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: TWC: Tiddlyfox - it happened again

2017-09-29 Thread BJ
It is possible to run javascript inline, however, tw5 have a different 
structure to twc so it is unlikely that javascript running under twc would 
work on tw5. If you show the javascript I can tell you what options would 
be available to reproduce the same in tw5

all the best 

BJ

On Friday, September 29, 2017 at 5:25:49 PM UTC+2, Shankar Swamy wrote:
>
>
> Does the Macro  (I think Eric Shulman wrote it) work the same way 
> in TW5?  If you don't use that macro in TWC, the macro runs the code 
> between the <SCRIPT> ...  markup as JavaScript.
>
> I have a Python system that emits JSON from a Sqlite repository.  The JSON 
> file is read by a JavaScript in TWC and processed and displayed in a very 
> useful manner.   This is one of the many critical functions that I use TWC 
> for.
>
> Thanks!
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/adfb1218-29b5-459c-b28c-5771c5d07124%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] addEventListener to links

2017-09-14 Thread BJ
create you list like this:


<$list filter="[tag[tests]]">
<$button class="tc-btn-invisible tc-tiddlylink">
<>
<$action-navigate/>
<$list filter="[tag]">
<$action-sendmessage $message="tm-close-tiddler"/>





all the best

BJ
On Thursday, September 14, 2017 at 8:26:18 AM UTC+2, Aigars Rogozovs wrote:
>
> I want to add feature, when user click on link in tiddler, script take 
> tags from new tiddler and close already opened tags with same tiddler
>
> Maybe this can explain more: http://prntscr.com/gky4y1 :D
>
> A.
>
> trešdiena, 2017. gada 13. septembris 22:43:30 UTC+3, Mat rakstīja:
>>
>> If what you want is some action to take place when you click a link, then 
>> the easiest is to make a button (see buttonwidget) that you style to *look 
>> *like a link.
>> tiddlywiki.com has instructions for this.
>>
>> <:-)
>>
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/5ab907d3--4b6d-8dd8-b90d34ff4ce7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Tooltip on tag dropdown hover possible?

2017-09-13 Thread BJ
you can modify $:/core/macros/list adding a tooltip to the link surrounding 
the name:

\define list-tagged-draggable(tag,itemTemplate,elementTag:"div")
<$set name="tag" value="""$tag$""">
<$list filter="[tagging[]]">
<$elementTag$ class="tc-menu-list-item">
<$droppable actions=<>>
<$elementTag$ class="tc-droppable-placeholder">


<$elementTag$>
<$transclude tiddler="""$itemTemplate$""">
<$link to={{!!title}} tooltip={{hovertext}}>
<$view field="title"/>


where hovertext is a tiddler containing you text...

All the best 

BJ

On Monday, September 4, 2017 at 4:19:14 AM UTC+2, leancoder wrote:
>
> I found tiddlywiki a month ago and its amazing! Thanks a lot!!
> I do have a question, I am making a reference application and I want to be 
> able to have a hover of the content of a tiddler which shows up when you 
> hover of the tiddlers title in the dropdown of a tag. The actual tiddler 
> text is only 1 paragraph long as it is so the tooltip would not overwhelm 
> the GUI /design. Can it be done?
> The answer I suppose lies somehow in interjecting a tooldtip macro in 
> either $:/core/macros/list or $:/core/ui/TagTemplate (overridding the core 
> - yikkes!).
> Problem is I have no idea where to start. I am new in this.
> If anyone could pitch in with some pointers would be great!
> Thank you!
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/4f7dd1c1-9951-41d4-a5a1-dca99612899c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Newby plugin dev request: Why my plugin is not recognized (dev in Browser) ?

2017-09-13 Thread BJ
sorry that no one has replied earlier.

The contents of plugins are 'unpacked' as shadow tiddlers but the plugin 
itself is a normal tiddler

you might want to do a search for the tinka plugin in the main tiddlywiki 
forum, a lot of people use this to develop plugins in the  browser (I use 
nodejs mostly).

all the best 

On Sunday, July 30, 2017 at 12:48:34 PM UTC+2, Profess Vpl wrote:
>
> Hi,
>
> Newby in the dev of plugin I'm using the method "in browser" as descrived 
> in the Tiddly Dev guide (http://tiddlywiki.com/dev/)
>
> I've first tested a macro in javascript that works properly
> Then I've tried to create a plugin with this macro
>
> Following the instruction on the Dev guide I've created the following 
> tiddler
> - $:/plugins/vpl/progresstest   and
> - $:/plugins/vpl/progresstest/bartest.js
> (bartest.js containing my macro code that I've tested on another tiddywiki)
>
> On Chrome I've successfully run the following command. 
> $tw.utils.repackPlugin('$:/plugins/vpl/progresstest', 
> ['$:/plugins/vpl/progresstest/bartest.js'])
>
> My $:/plugins/vpl/progresstest tiddler was filled with the bartest.js 
> tiddler.
> bartest.js tiddler disappeared (is that normal ?)
>
> I've saved and reloaded
> The plugin tiddler version field was incremented.
>
> Then I've tried to run the macro <> as I was running it 
> when I tested it outside of a plugin, on another tiddywiki
> Unfortunately the marco is not recognized ...
>
> What surprising me is that I *can't find* my $:/plugins/vpl/progresstest 
> in the shadows tiddlers list
>
> But my plugin seems nevertheless recognized as I see it from the  
> $:/ControlPanel 
> plugins
>
> Any help would be very useful ...
>
> THanks a lot for your great work 
>
> Regards
>
> Vpl
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/1ba400b4-82c6-44ec-ae50-505de504d65d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] addEventListener to links

2017-09-13 Thread BJ

see here for info on tiddlywiki internals

http://tiddlywiki.com/dev/#TiddlyWiki%20for%20Developers


On Wednesday, September 13, 2017 at 5:04:33 PM UTC+2, BJ wrote:
>
> tiddlywiki uses a dynamic tree of widgets you need to understand how this 
> work in order to use javascript, see here for how to use the link widget 
> with wikitext
>
> http://tiddlywiki.com/#LinkWidget
>
> all the best
> BJ
>
> On Wednesday, September 13, 2017 at 11:40:07 AM UTC+2, Aigars Rogozovs 
> wrote:
>>
>>
>> Hello
>>
>> I try to add to link tags listener:
>>
>> $('body').on('click', 'a', function(e){
>>   console.dir(e);
>> });
>>
>> But nothing happens
>>
>> How I can add event listening to links?
>>
>> A.
>>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/88e736de-9cff-4538-85ff-7c481ceab37a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] addEventListener to links

2017-09-13 Thread BJ
tiddlywiki uses a dynamic tree of widgets you need to understand how this 
work in order to use javascript, see here for how to use the link widget 
with wikitext

http://tiddlywiki.com/#LinkWidget

all the best
BJ

On Wednesday, September 13, 2017 at 11:40:07 AM UTC+2, Aigars Rogozovs 
wrote:
>
>
> Hello
>
> I try to add to link tags listener:
>
> $('body').on('click', 'a', function(e){
>   console.dir(e);
> });
>
> But nothing happens
>
> How I can add event listening to links?
>
> A.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/98cef75e-6bab-4f8e-99a4-caeecde4a900%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] Close tiddler with JavaScript call

2017-09-05 Thread BJ
The concept in tw5 is of a tree build of js widgets (js macros are connect 
to the tree through the macrocall widget), you can send messages up the 
tree, eg

this.dispatchEvent({type: "tm-close-tiddler", tiddlerTitle: "mytid"})

sends a message to the navigator widget to close a tid.

all the best 

BJ

On Tuesday, September 5, 2017 at 9:10:33 AM UTC+2, Aigars Rogozovs wrote:
>
> Thanks for answer
>
> Not Macros, but with JavaScript :)
>
> This Macros I already used, but without result
>
> For example:
>
> function search_by_tag(tag_name) {
>   $('.tc-tiddler-frame').each(function(tiddler_frame) {
> var self = this;
> var tags_label = $(self).find('.tc-tag-label');
> var tags = [];
> $(this).each(function(tag) {
>   var tag_name = $(tag).text().trim();
>   tags.push(tag_name);
> });
> console.log(tags);
>   });
> }
>
> I find all tags
>
> What result I want:
>
> When user open tiddler, other tiddlers with same tags close automatically
>
> I don't known how to make that with Macros, so I make it with jQuery
>
> A.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/98d22dfc-a2ea-4713-96fa-fa7c01434710%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: Writting an index macro

2017-04-27 Thread BJ
Hi Luis,
the current tiddler name  is stored in a variable (usually), use

var currentTiddlerName = this.getVariable("currentTiddler");

then if you want data from a field

var currentTiddler = this.wiki.getTiddler(currentTiddler);

value = currentTiddler.getFieldString("fieldname");

cheers

BJ


On Thursday, April 27, 2017 at 8:51:35 PM UTC+2, Luis Gonzalez wrote:
>
> I wrote my two first macros. 
>
> The first is a WikiText macro, but I think we have no control sentences 
> like *if *or *for *loop in WikiText macros. I access all the tiddler 
> fields: title, text, created, modified, tags
>
> The second is a Javascript macro because I need control sentences. But in 
> it I don't know how to access to the current tiddler fields.
> I try:
>
> * return "Title: " + this.getFieldString(title);*
>
> but it does not work.
>
>
> This is the macro:
> (function(){
>
> "use strict";
>
> exports.name = "ahora";
>
> exports.params = [];
>
> exports.run = function() {
>  return "Title: " + this.getFieldString(title);
> };
>
> })();
>
>
> and I call the macro in other tiddler in this way:
>
> <$macrocall $name="ahora" />
>
> I get: 
>
>
> *Title: undefined *: - (
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/3a992670-8bfe-4c89-9af5-e74525d54307%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] future of saving tw to local file system

2017-03-14 Thread BJ
Hi everyone,
just thought I would mention that tiddlyfox is being mention in the issue 
to track "Implement local filesystem read/write access." for the new 
extensions api

https://bugzilla.mozilla.org/show_bug.cgi?id=1246236

cheers

BJ

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/aab35754-6304-4e40-b5ee-ac74cc7810c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: How to regularly keep my tiddlywiki updated to the content on GitHub?

2017-03-01 Thread BJ
you can see which version you are using by the 'git status' command typed 
when you are at the root of you tw dir.

You should also try the scripts instead of npm (that what I use (modified 
scripts) as it is more simple).

all the best 

BJ

On Tuesday, February 28, 2017 at 5:20:48 AM UTC+1, Matt Groth wrote:
>
> I'm pretty new to GitHub and coding in general, but I'm finding it useful 
> to try to regularly check the repository and update mine. I'm running on 
> Node.JS and followed the steps here 
> <http://tiddlywiki.com/static/Working%2520with%2520the%2520TiddlyWiki5%2520repository.html>
>  to 
> link npm to my local repository.  
> I am confused how this works exactly, though. I noticed someone changed a 
> tiddler on GitHub, so I updated my local repository and tried to test if my 
> tiddler updated. The one I used for the test was Using Stylesheets, which 
> was updated recently <https://github.com/Jermolene/TiddlyWiki5/pull/2786>. 
> I checked, and the .tid file on my computer successfully updated. But on my 
> TiddlyWiki, even after restarting the server, it did not. I tried deleting 
> my old "Using Stylesheets" tiddler and restarting everything, but I still 
> did not load the new one. I thought maybe I needed to disable and re-enable 
> $:/plugins/TiddlyWiki/tw5.com-docs, but that did nothing either.
>
> My next best guess is that I'm supposed to manually install everything 
> each time I update. This is confusing me. Why do I have a local copy in my 
> npm repository in the first place if it is never even loaded from there?
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/24532720-8b57-4e2a-8ef6-313a1711ebb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] SPilot4Tw Plugin (a programming language for TW5)

2017-03-01 Thread BJ
wow! very impressive!
is it possible to display questions from tiddlers? I mean it is possible to 
compile the tiddler to html, and them html could be output...

all the  best
BJ

On Wednesday, March 1, 2017 at 2:48:45 AM UTC+1, xanato...@gmail.com wrote:
>
> Hello all,
>
> I have created a programming language for use in Tiddlywiki as plugin.
>
> The plugin and its documentation can be found here: 
> https://www.quaraman.de/tw/pilot.html .
>
> Because I use it on a daily basis, I can say it is stable.
>
> But a lot of questions are in my mind:
>
> 1. Is it so usable that not only me can use it?
> 2. Breaks the plugin some Tiddlywiki plugin standard?
> 3. Is the documentation understandable for a user?
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/48f59870-dd21-429c-8f67-7bb9c5b1e225%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] How to Customize the "New Tiddler" content?

2017-02-10 Thread BJ
sorry that should be:

<$button tooltip={{$:/language/Buttons/NewTiddler/Hint}} 
aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=<
>>
<$action-sendmessage $message="tm-new-tiddler"
  text="Text in new tiddler."/>
<$list filter="[prefix[yes]]">
{{$:/core/images/new-button}}

<$list filter="[prefix[yes]]">
<$text 
text={{$:/language/Buttons/NewTiddler/Caption}}/>





On Friday, February 10, 2017 at 5:30:12 AM UTC+1, Douglas Counts wrote:
>
> Hi BJ,
>
> I looked at both your most helpful references to the WidgetMessage 
> *tm-new-tiddler* and the UI Tiddler *$:/core/ui/Buttons/new-tiddler* and 
> believed that I had this figured out.  I was even able to create a button 
> within a tiddler that did exactly what I wanted using the example within 
> the *tm-new-tiddler* documentation.
>
> But when I added a *text="Text in new tiddler."* like shown below to the 
> *$:/core/ui/Buttons/new-tiddler, 
> *it failed to work.  Any ideas from anyone on what else I need to change 
> to place default text within the generated new tiddlers using the UI New 
> Tiddler button?
>
> <$button message="tm-new-tiddler" 
> tooltip={{$:/language/Buttons/NewTiddler/Hint}} 
> aria-label={{$:/language/Buttons/NewTiddler/Caption}} *text="Text in new 
> tiddler."* class=<>>
> <$list filter="[prefix[yes]]">
> {{$:/core/images/new-button}}
> 
> <$list filter="[prefix[yes]]">
> <$text 
> text={{$:/language/Buttons/NewTiddler/Caption}}/>
> 
> 
>
> The code within the UI Button is much more confusing than the online 
> example.
>
> Thanks in advance to all replies,
>
> -Doug
>
>
>
>
> On Thursday, February 9, 2017 at 3:16:02 AM UTC-6, BJ wrote:
>>
>> Hi Doug,
>> the relevant documentation is under 
>> http://tiddlywiki.com/#WidgetMessage%3A%20tm-new-tiddler
>>
>> If you want to change the default button the code is in
>>
>> $:/core/ui/Buttons/new-tiddler
>>
>> all the best 
>> BJ
>>
>> On Thursday, February 9, 2017 at 5:51:32 AM UTC+1, Douglas Counts wrote:
>>>
>>> I appreciate your response but I'm looking for a way to place default 
>>> content inside the "New Tiddler" as I may wish to make changes to it.  Your 
>>> method, while helpful, puts the same content on all the pre-existing 
>>> tiddlers too.
>>>
>>> I'm looking for a way to define my initial"New Tiddler" content that can 
>>> then be changed or even deleted.
>>>
>>> Any other ideas out there?
>>>
>>> Thank you.
>>>
>>> On Wednesday, February 8, 2017 at 10:19:34 PM UTC-6, Riz wrote:
>>>>
>>>> If you want a particular content in all your tiddlers, you are better 
>>>> off with viewtemplate.
>>>>
>>>> Create a tiddler, put your footer in text field.
>>>> Add "$:/tags/ViewTemplate" as tag
>>>> Create a field called list-after, add the value as "
>>>> $:/core/ui/ViewTemplate/body 
>>>> <http://tiddlywiki.com/#%24%3A%2Fcore%2Fui%2FViewTemplate%2Fbody>"
>>>>
>>>> Now your footer will be added to every tiddler and you can see it when 
>>>> you save the tiddler.
>>>>
>>>> PS: the third step is unnecessary. 
>>>>
>>>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/dfb730fe-8b9e-4c54-97c2-07f7aed755af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] How to Customize the "New Tiddler" content?

2017-02-10 Thread BJ
Unfortunately the solution is a bit subtle, historically action widgets 
were invented to overcome the limitations of the widgets like the button 
widget, and thus the functionality of the button widget is extended like so:

<$button tooltip={{$:/language/Buttons/NewTiddler/Hint}} 
aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=<
>>
<$action-sendmessage $message="tm-new-tiddler"
  text="Text in new tiddler."/>
<$list filter="[prefix[yes]]">
{{$:/core/images/new-button}}

<$list filter="[prefix[yes]]">
<$text 
text={{$:/language/Buttons/NewTiddler/Caption}}/>



cheers
BJ

On Friday, February 10, 2017 at 5:30:12 AM UTC+1, Douglas Counts wrote:
>
> Hi BJ,
>
> I looked at both your most helpful references to the WidgetMessage 
> *tm-new-tiddler* and the UI Tiddler *$:/core/ui/Buttons/new-tiddler* and 
> believed that I had this figured out.  I was even able to create a button 
> within a tiddler that did exactly what I wanted using the example within 
> the *tm-new-tiddler* documentation.
>
> But when I added a *text="Text in new tiddler."* like shown below to the 
> *$:/core/ui/Buttons/new-tiddler, 
> *it failed to work.  Any ideas from anyone on what else I need to change 
> to place default text within the generated new tiddlers using the UI New 
> Tiddler button?
>
> <$button message="tm-new-tiddler" 
> tooltip={{$:/language/Buttons/NewTiddler/Hint}} 
> aria-label={{$:/language/Buttons/NewTiddler/Caption}} *text="Text in new 
> tiddler."* class=<>>
> <$list filter="[prefix[yes]]">
> {{$:/core/images/new-button}}
> 
> <$list filter="[prefix[yes]]">
> <$text 
> text={{$:/language/Buttons/NewTiddler/Caption}}/>
> 
> 
>
> The code within the UI Button is much more confusing than the online 
> example.
>
> Thanks in advance to all replies,
>
> -Doug
>
>
>
>
> On Thursday, February 9, 2017 at 3:16:02 AM UTC-6, BJ wrote:
>>
>> Hi Doug,
>> the relevant documentation is under 
>> http://tiddlywiki.com/#WidgetMessage%3A%20tm-new-tiddler
>>
>> If you want to change the default button the code is in
>>
>> $:/core/ui/Buttons/new-tiddler
>>
>> all the best 
>> BJ
>>
>> On Thursday, February 9, 2017 at 5:51:32 AM UTC+1, Douglas Counts wrote:
>>>
>>> I appreciate your response but I'm looking for a way to place default 
>>> content inside the "New Tiddler" as I may wish to make changes to it.  Your 
>>> method, while helpful, puts the same content on all the pre-existing 
>>> tiddlers too.
>>>
>>> I'm looking for a way to define my initial"New Tiddler" content that can 
>>> then be changed or even deleted.
>>>
>>> Any other ideas out there?
>>>
>>> Thank you.
>>>
>>> On Wednesday, February 8, 2017 at 10:19:34 PM UTC-6, Riz wrote:
>>>>
>>>> If you want a particular content in all your tiddlers, you are better 
>>>> off with viewtemplate.
>>>>
>>>> Create a tiddler, put your footer in text field.
>>>> Add "$:/tags/ViewTemplate" as tag
>>>> Create a field called list-after, add the value as "
>>>> $:/core/ui/ViewTemplate/body 
>>>> <http://tiddlywiki.com/#%24%3A%2Fcore%2Fui%2FViewTemplate%2Fbody>"
>>>>
>>>> Now your footer will be added to every tiddler and you can see it when 
>>>> you save the tiddler.
>>>>
>>>> PS: the third step is unnecessary. 
>>>>
>>>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/1933bb66-9d3a-4fb0-8cd1-9b246368474a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Using a variable set from a transclusion in a macro, in a widget...

2017-02-09 Thread BJ
macros (except js ones) are a type of template, use <$text 
text=<>/>
to see the result of you variables when used as attributes.

try instead
<$set name="myVariable" 
filter="[field:title{$:/status/UserName}get[created]]">
<$button>Click<$action-sendmessage message="whatever" field=<> 
/>

all the best 
BJ

On Thursday, February 9, 2017 at 12:02:32 AM UTC+1, David Szego wrote:
>
> I seem to be asking the same question all the time! ;->
>
> Tiddler 1:
>
> \define myName() {{$:/status/UserName}}
> \define myCreated() <$view tiddler=$(myName)$ field="created" format=
> "text"/>
>
> MyName: <> (shows DavidSzego)
>
> MyCreated: <> (shows datestamp)
>
> Tiddler 2:
>
> List (should return back the Tiddler with my name):
>
> <$list filter="[field:created]">
> <>
> 
>
> <$button>Click<$action-widget message="whatever" field=<> 
> />
>
> When I call <<*myCreated>>* directly, I get the date stamp. 
>
> When I call it from a macro *or* a widget, the best I can get is "*true*"!
>
> But more often, I get some kind of quoting error (changes depending on the 
> single/double/none quotes I use in the "*<$view>*" widget above), where a 
> button will generate something like  
>
> *[Click />]*
>
> where *<$button...> *is including the closing* /> *from the 
> *<$action-widget* ...
>
> Any hints on how to call these properly?
>
> Thanks! =-)
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/278b7ddf-a441-4f87-a101-9091a8abe4b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: Browserify script for developing using npm modules

2016-12-15 Thread BJ
I am using xubuntu 14.04 with node v6.9.2. Windows is case insensitive to
file names

On 16 December 2016 at 01:34, Michael Joseph Rosenthal <
michael.the.awes...@gmail.com> wrote:

> @Danielo sorry about that - corrected the url to
> https://github.com/micimize/TW5-structured-journal
>
> @BJ good catch - interesting that that's not an issue for me. Wonder where
> the case sensitivity difference is coming from
>
>
> On Thursday, December 15, 2016 at 1:36:16 PM UTC-6, BJ wrote:
>>
>> HI Michael,
>> thanks for sharing this. I have only just been able to find time to
>> update my node setup and try this out. One thing I had to do was modify
>> Experience.js by changing
>> import timeInterval, { formatInterval, precision } from './timeInterval'
>> to
>> import timeInterval, { formatInterval, precision } from './TimeInterval'
>>
>> so that
>>
>> npm run watch
>>
>> completed.
>>
>> all the best
>>
>> BJ
>>
>> On Tuesday, November 22, 2016 at 6:03:49 AM UTC+1, Michael Joseph
>> Rosenthal wrote:
>>>
>>> Sure thing - I went ahead and threw up the code I was writing for my
>>> structured-journal <https://github.com/micimize/TW5-structured-journa>
>>>  prototype and added a little bit of info in the readme.
>>> I develop using the node tiddlywiki, running it with `nodemon --watch
>>> wiki/plugins --exec 'tiddlywiki wiki --server '`, then developing the
>>> plugin in `./plugins/plugin-name`
>>>
>>>
>>> On Sunday, November 20, 2016 at 1:15:35 AM UTC-6, BJ wrote:
>>>>
>>>> Hi Michael,
>>>>
>>>> I have not used browserify, but am interesting in alternative ways of
>>>> building plugins. - Do you have an example plugin project that uses this
>>>> method that you can share?
>>>>
>>>> thanks
>>>> BJ
>>>>
>>>> On Wednesday, November 16, 2016 at 9:05:22 PM UTC+1, Michael Joseph
>>>> Rosenthal wrote:
>>>>>
>>>>> I put together this browserify script for bundling dependencies in
>>>>> plugins to avoid having to wrap every library I want to use as a tiddler,
>>>>> thought others might find it useful.
>>>>>
>>>> --
> 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/0zwoKDgOE-g/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> tiddlywikidev+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywikidev@googlegroups.com.
> 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/7db2421a-1ef7-46e8-9805-e21b09ca6bf1%
> 40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywikidev/7db2421a-1ef7-46e8-9805-e21b09ca6bf1%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> 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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/CAJxZ06QKsZEvmdEviLmAKxpaaWD%3DB%2B9G%2BpVbnX4VWKqCP4KHCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Browserify script for developing using npm modules

2016-12-15 Thread BJ
HI Michael,
thanks for sharing this. I have only just been able to find time to update 
my node setup and try this out. One thing I had to do was modify 
Experience.js by changing 
import timeInterval, { formatInterval, precision } from './timeInterval'
to
import timeInterval, { formatInterval, precision } from './TimeInterval'

so that 

npm run watch 

completed.

all the best 

BJ

On Tuesday, November 22, 2016 at 6:03:49 AM UTC+1, Michael Joseph Rosenthal 
wrote:
>
> Sure thing - I went ahead and threw up the code I was writing for my 
> structured-journal <https://github.com/micimize/TW5-structured-journa> 
> prototype 
> and added a little bit of info in the readme.
> I develop using the node tiddlywiki, running it with `nodemon --watch 
> wiki/plugins --exec 'tiddlywiki wiki --server '`, then developing the 
> plugin in `./plugins/plugin-name`
>
>
> On Sunday, November 20, 2016 at 1:15:35 AM UTC-6, BJ wrote:
>>
>> Hi Michael,
>>
>> I have not used browserify, but am interesting in alternative ways of 
>> building plugins. - Do you have an example plugin project that uses this 
>> method that you can share?
>>
>> thanks
>> BJ
>>
>> On Wednesday, November 16, 2016 at 9:05:22 PM UTC+1, Michael Joseph 
>> Rosenthal wrote:
>>>
>>> I put together this browserify script for bundling dependencies in 
>>> plugins to avoid having to wrap every library I want to use as a tiddler, 
>>> thought others might find it useful.
>>>
>>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/86ac8a47-dc2b-40e5-b545-3ea34040c9f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Browserify script for developing using npm modules

2016-11-19 Thread BJ
Hi Michael,

I have not used browserify, but am interesting in alternative ways of 
building plugins. - Do you have an example plugin project that uses this 
method that you can share?

thanks
BJ

On Wednesday, November 16, 2016 at 9:05:22 PM UTC+1, Michael Joseph 
Rosenthal wrote:
>
> I put together this browserify script for bundling dependencies in plugins 
> to avoid having to wrap every library I want to use as a tiddler, thought 
> others might find it useful.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/78009538-ffd7-4ddd-846b-d935a32598ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: variable transclusion

2016-11-02 Thread BJ
At present we use the  currentTiddler variable in this way:

{{!!field}}

is, in psuedo code, {{<>!!field}}


so if you have a value in a variable 'myvar' you can do 
{{<>!!field}} as


<$vars currentTiddler=<>/>
{{!!field}}


all the best BJ

On Wednesday, November 2, 2016 at 7:30:23 PM UTC, tikk...@gmail.com wrote:
>
> I'm looking in to indirect inline transclusion with the curly-brace 
> syntax, a la {{somevar->field}} which, if somevar is set to "tiddlername" 
> (e.g. with <$set/>) then it would resolve to the same thing as 
> {{tiddlername!!field}}. I think the arrow operator is reasonably 
> appropriate. I can imagine a number of useful use cases for this notation.
>
> At first I thought I could just modify $:/core/modules/utils/utils.js such 
> as modifying parseTextReference's regex to read (modifications in bold):
> var reTextRef = /(?:(.*?)!!(.+))*|(?:(.+?)->(.*))*
> |(?:(.*?)##(.+))|(.*)/mg,
> ...
>
>
>
>
>
> *if(match[3]) {result.title = 
> this.getVariable(match[3]);}if(match[4]) {
> result.field = match[4];}*
>
> But then I realized that this is fundamentally impossible since variables 
> are stored in widgets and there's no bound context inside the utils module 
> that can reference the parent widget stack ... right?
>
> Is there another approach, or a way to make this approach work? I could 
> define another parser or a new widget but I think it makes most sense as a 
> subtle change from the existing curly-brace syntax. Besides, doing it 
> inside parseTextReference means it would immediately work for everything 
> that calls parseTextReference, such as within filters.
>
> Thoughts?
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/9f445470-9e86-4ac8-ae0c-828cf9d43dc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Start and end values in widget tree - usage

2016-10-25 Thread BJ
When looking at the widget tree via the 't*ools for exploring the internals 
of TiddlyWiki* 
<http://127.0.0.1:8090/#%24%3A%2Fplugins%2Ftiddlywiki%2Finternals>' I see 
'start' and 'end' nodes and would like to know what they are for.

cheers

BJ

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/55f4a5cb-f1da-45e9-aafb-93ece8f2e622%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: get widget name via js

2016-10-25 Thread BJ
LinkWidget.prototype.name = "link";

then we can access as

alert(widget.name)

On Tuesday, October 25, 2016 at 12:44:12 PM UTC+1, Tobias Beer wrote:
>
> Hi BJ,
>  
>
>> we could add a 'type' or name to the object, but at present you would 
>> need to do this:
>>
>
> Ok, I see. That doesn't look too pretty.
>
> So, a new "helper" function on the *base Widget class* would be great,
> so the prototype class would have it,
> but not every single widget would need to define its name.
>
> Any idea how to implement that? e.g.
>
> exports.type = function() {
> return ?!?;
> }
>
> Thanks,
>
> Tobias.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/0770341b-6b5f-4790-972a-616b5c40d4b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: get widget name via js

2016-10-25 Thread BJ
we could add a 'type' or name to the object, but at present you would need 
to do this:

(function(){

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

/*
Information about this macro

*/

exports.name = "widgets";

exports.params = [

];
/*
Run the macro
*/


exports.run = function() {



var returns = "";
var Widget = require("$:/core/modules/widgets/link.js").link;
var widget = new Widget(); console.log(widget);
for  (var widgets in widget.widgetClasses) {
if (widget instanceof  widget.widgetClasses[widgets] && widgets!="widget") 
returns = widgets;
}

return returns;
}
})();

On Tuesday, October 25, 2016 at 5:35:12 AM UTC+1, Tobias Beer wrote:
>
> Hi BJ,
>
> I know these hold all the widget names, but if I have a reference to a 
> single widget object / instance, how do I know its name / type / class  / 
> prototype, whichever term best suits what I'm trying to read via js?
>
> Maybe I'm just not seeing it. I want to read some property or call some 
> function which will return "*LinkWidget*" or just  "*link*" if I do 
> *someWidgetFoo.type* or *someWidgetFoo.getType()* or the likes.
>
> Best wishes,
>
> Tobias.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/494be26f-1079-4422-b502-7436ddd994dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: get widget name via js

2016-10-24 Thread BJ
these are the "*widgetname*" that you refer to.

The "*NameOfWidget*" are only local symbols, and not available globally.


On Monday, October 24, 2016 at 8:35:33 PM UTC+1, Tobias Beer wrote:
>
> Hi BJ,
>
> I think you misunderstood me. I am not looking for a list of all widget 
> class names.
>
> What I am looking for is the (prototype?) name of a widget instance, 
> e.g.: widget.type or something.
>
> I looked at the widget as the console logs it and the console does show 
> its name, but if I open the widget properties, I have no clue how to 
> programatically determine what this widget is called.
>
> Best wishes,
>
> Tobias.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/b9603c86-135e-42b5-99a2-1aa514af6468%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: get widget name via js

2016-10-24 Thread BJ

Hi Tobias,

The widgets are gather in a list in the initialization of widgets, ie (see 
widget.js)

// Hashmap of the widget classes
if(!this.widgetClasses) {
Widget.prototype.widgetClasses = $tw.modules.applyMethods("widget");
}

here is a macro to list them


(function(){

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

/*
Information about this macro

*/

exports.name = "widgets";

exports.params = [

];
/*
Run the macro
*/


exports.run = function() {



var returns = "\n";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var widget = new Widget();
for  (var widgets in widget.widgetClasses) {
returns = returns + "widget "  +widgets +"\n\n";
}

return returns;
}
})();

all the best BJ

On Monday, October 24, 2016 at 7:26:48 AM UTC+1, Tobias Beer wrote:
>
> Hi everyone,
>
> If I do
>
> console.log(widget)
>
> the console shows me the name of the widget as it was assigned at the 
> bottom of each widget as *NameOfWidget*:
>
> exports.*widgetname* = *NameOfWidget*;
>
> How can I get either *NameOfWidget* or *widgetname* via js?
>
> Best wishes,
>
> Tobias.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/41432b1d-ef00-47e3-be34-0e75fc36ae92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: "Namespacing" for plugins?

2016-10-15 Thread BJ
another sightly different way would be to automatically prepend the plugin 
name to the widget name to form an alternative name using an api function eg

defineExport('mywidget')

inplace of 

exports['mywidget']

where the 'defineExport' would set the addition 
exports[pluginname+'mywidget']

and have a pragma to 'focus' the name 'mywidget' to a particular plugin, 
within a tiddler.


On Saturday, October 15, 2016 at 7:44:43 AM UTC+1, BJ wrote:
>
> we could have some kind of namespace switching, eg  for widgets, we have 
> when defining widgets
>
> exports.['mywidget']exports.set = SetWidget;
>
> which sets up the name 'mywidget' . If we have the convention to 
> additionally provide another qualified name like this:
>
> exports['bj.mywidget'] exports.set = SetWidget;
>
> so another clashing definition of 'mywidget' could be
>
> exports['anon.mywidget'] exports.set = SetWidget;
>
> then we could have a pragma to 'tell' the parser (the html rule in this 
> case) to override the 'mywidget' with a choosen prefix.
> Obviously prefixes should be publish somewhere.
>
> BJ
> On Thursday, October 13, 2016 at 12:17:44 PM UTC+1, Jeremy Ruston wrote:
>>
>> > However, I have yet to see a plugin follow this guideline. Is this 
>> still enforced/encouraged?
>>
>> I think I wrote that right back in the beginning of TiddlyWiki5, when it 
>> was under development in 2011/12. Trying to learn from the experience of TW 
>> Classic, I was consciously trying to implement features that would help the 
>> community coalesce.
>>
>> As it's turned out, I don't think using the author prefix in the 
>> widget/macro name is a good approach, because of the inevitable wordiness 
>> it brings.
>>
>> Tobias' idea of a central registry is not bad; if you're interested in 
>> setting it up, then I suggest that structuring the registry as tiddlers in 
>> the tw5.com wiki, but open to suggestions.
>>
>> Best wishes
>>
>> Jeremy
>>
>>
>> On Thursday, October 13, 2016 at 9:24:18 AM UTC+1, Julian Kniephoff wrote:
>>>
>>> Hi Tobias
>>>
>>> that's good to hear in the sense that I now don't have to feel bad for 
>>> ignoring that guideline myself.
>>>
>>> The GitHub-Repository idea sounds very interesting, even independently 
>>> of namespacing issues. But in the long run, some kind of namespace system 
>>> could be very useful. After all, I might really really want to pick a 
>>> certain name for my widget, for example, even if I find out that it is 
>>> already taken. ;)
>>>
>>> Just a stray idea: Since TiddlyWiki borrows XML syntax (for widgets) 
>>> already, anyway, something similar to the XML namespace system could maybe 
>>> work?
>>>
>>> I imagine a plugin author would specify a namespace URI (maybe the 
>>> sourceURL that is already in the plugin.info file?) and then to use the 
>>> stuff from the frobnicate plugin, you would specify a namespace 
>>> attribute like
>>>
>>> <$frobnicate twns="http://juliankniephoff.com/frobnicate;>
>>> Every named entity referred to in here is looked up in my plugin first
>>> 
>>>
>>> Or, if you want to explicitly disambiguate things or be more explicit in 
>>> general, you could give it a prefix:
>>>
>>> <$jk:frobnicate twns:jk="http://juliankniephoff.com/frobnicate;>
>>> Every named entity referred to in here with a "jk:" prefix is looked up 
>>> in my plugin first
>>> 
>>>
>>> As said, just an idea. Such a system would probably require much work 
>>> very deep within the core of TiddlyWiki. :/
>>>
>>> Best wishes,
>>> Julian
>>>
>>> P.S.: Sorry for the empty post earlier, I accidentally hit the wrong 
>>> button ...
>>>
>>> On Thursday, October 13, 2016 at 6:25:51 AM UTC+2, Tobias Beer wrote:
>>>>
>>>> Hi Julian,
>>>>
>>>> It's the first time I hear of this convention and I'm almost certain no 
>>>> one has been adhering to it.
>>>> At least I haven't been, since I wasn't even aware it existed.
>>>>
>>>> It would definitely avoid collisions, especially among plugin authors.
>>>>
>>>> If you look at my plugins, you'll find that many have a good chance for 
>>>> future incompatibilities owed to their generic names...
>>>>
>>>> http://tobibeer.github.io/tw5-plugins
>>>>
>>>> Eventually, rather than the above convent

[twdev] Re: "Namespacing" for plugins?

2016-10-15 Thread BJ
we could have some kind of namespace switching, eg  for widgets, we have 
when defining widgets

exports.['mywidget']exports.set = SetWidget;

which sets up the name 'mywidget' . If we have the convention to additional 
provide another qualified name like this

exports['bj.mywidget'] exports.set = SetWidget;

so another clashing definition of 'mywidget' could be

exports['anon.mywidget'] exports.set = SetWidget;

then we could have a pragma to 'tell' the parser (the html rule in this 
case) to override the 'mywidget' with a choosen prefix.
Obviously prefixes should be publish somewhere.

BJ
On Thursday, October 13, 2016 at 12:17:44 PM UTC+1, Jeremy Ruston wrote:
>
> > However, I have yet to see a plugin follow this guideline. Is this still 
> enforced/encouraged?
>
> I think I wrote that right back in the beginning of TiddlyWiki5, when it 
> was under development in 2011/12. Trying to learn from the experience of TW 
> Classic, I was consciously trying to implement features that would help the 
> community coalesce.
>
> As it's turned out, I don't think using the author prefix in the 
> widget/macro name is a good approach, because of the inevitable wordiness 
> it brings.
>
> Tobias' idea of a central registry is not bad; if you're interested in 
> setting it up, then I suggest that structuring the registry as tiddlers in 
> the tw5.com wiki, but open to suggestions.
>
> Best wishes
>
> Jeremy
>
>
> On Thursday, October 13, 2016 at 9:24:18 AM UTC+1, Julian Kniephoff wrote:
>>
>> Hi Tobias
>>
>> that's good to hear in the sense that I now don't have to feel bad for 
>> ignoring that guideline myself.
>>
>> The GitHub-Repository idea sounds very interesting, even independently of 
>> namespacing issues. But in the long run, some kind of namespace system 
>> could be very useful. After all, I might really really want to pick a 
>> certain name for my widget, for example, even if I find out that it is 
>> already taken. ;)
>>
>> Just a stray idea: Since TiddlyWiki borrows XML syntax (for widgets) 
>> already, anyway, something similar to the XML namespace system could maybe 
>> work?
>>
>> I imagine a plugin author would specify a namespace URI (maybe the 
>> sourceURL that is already in the plugin.info file?) and then to use the 
>> stuff from the frobnicate plugin, you would specify a namespace 
>> attribute like
>>
>> <$frobnicate twns="http://juliankniephoff.com/frobnicate;>
>> Every named entity referred to in here is looked up in my plugin first
>> 
>>
>> Or, if you want to explicitly disambiguate things or be more explicit in 
>> general, you could give it a prefix:
>>
>> <$jk:frobnicate twns:jk="http://juliankniephoff.com/frobnicate;>
>> Every named entity referred to in here with a "jk:" prefix is looked up 
>> in my plugin first
>> 
>>
>> As said, just an idea. Such a system would probably require much work 
>> very deep within the core of TiddlyWiki. :/
>>
>> Best wishes,
>> Julian
>>
>> P.S.: Sorry for the empty post earlier, I accidentally hit the wrong 
>> button ...
>>
>> On Thursday, October 13, 2016 at 6:25:51 AM UTC+2, Tobias Beer wrote:
>>>
>>> Hi Julian,
>>>
>>> It's the first time I hear of this convention and I'm almost certain no 
>>> one has been adhering to it.
>>> At least I haven't been, since I wasn't even aware it existed.
>>>
>>> It would definitely avoid collisions, especially among plugin authors.
>>>
>>> If you look at my plugins, you'll find that many have a good chance for 
>>> future incompatibilities owed to their generic names...
>>>
>>> http://tobibeer.github.io/tw5-plugins
>>>
>>> Eventually, rather than the above convention, I think we should have 
>>> some public listing where authors can register some basic info about their 
>>> plugins, especially things that may clash, like:
>>>
>>>- parsers
>>>- widgets
>>>- filters
>>>- fields
>>>- css classes
>>>
>>> I find that to be a more sensible approach which would also make plugins 
>>> a little more discoverable. Then a dev could verify if their desired name 
>>> was already used by something else.
>>>
>>> This could be a simple github repo where authors are free to make a PR 
>>> for their plugin listing.
>>>
>>> Best wishes,
>>>
>>> Tobias.
>>>
>>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/845ed3b3-4696-4bbc-a026-9639016695ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Unpack plugins from a plugin

2016-09-06 Thread BJ
plugins need to be non shadow tiddlers or they will be removed when 
switching themes.

On Tuesday, September 6, 2016 at 8:28:33 AM UTC+1, Danielo Rodríguez wrote:
>
> Hello, 
>
> This question may look duplicated, but it's a bit different from my 
> previous ones. 
>
> I want to know how can a plugin unpack other plugins during it's startup 
> sequence. There is a special class on the core, pluginSwitcher that 
> registers and deregisters plugins, so seems to be possible. I noticed that 
> such class is only being used for themes, languages and that stuff, so 
> maybe it is not suitable for other plugins. 
>
> Maybe if my plugin has a startup module that starts at the very very 
> beginning (even before load modules) it would be possible to successfully 
> unpack some plugins from it? 
>
> Thanks and regards 
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/d273c868-c10a-4c3a-ae69-8d50942fe2b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Unpack plugins from a plugin

2016-09-06 Thread BJ


On Tuesday, September 6, 2016 at 11:37:42 AM UTC+1, BJ wrote:
>
> the pluginSwitcher will not work with 'modules' i.e. javascript tiddlers.
>
> On Tuesday, September 6, 2016 at 8:28:33 AM UTC+1, Danielo Rodríguez wrote:
>>
>> Hello, 
>>
>> This question may look duplicated, but it's a bit different from my 
>> previous ones. 
>>
>> I want to know how can a plugin unpack other plugins during it's startup 
>> sequence. There is a special class on the core, pluginSwitcher that 
>> registers and deregisters plugins, so seems to be possible. I noticed that 
>> such class is only being used for themes, languages and that stuff, so 
>> maybe it is not suitable for other plugins. 
>>
>> Maybe if my plugin has a startup module that starts at the very very 
>> beginning (even before load modules) it would be possible to successfully 
>> unpack some plugins from it? 
>>
>> Thanks and regards 
>>
>>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/49206012-44fa-4c13-a7f8-1368ac036728%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Unpack plugins from a plugin

2016-09-06 Thread BJ
the pluginSwitcher will not work with 'modules' that is javascript tiddlers.

On Tuesday, September 6, 2016 at 8:28:33 AM UTC+1, Danielo Rodríguez wrote:
>
> Hello, 
>
> This question may look duplicated, but it's a bit different from my 
> previous ones. 
>
> I want to know how can a plugin unpack other plugins during it's startup 
> sequence. There is a special class on the core, pluginSwitcher that 
> registers and deregisters plugins, so seems to be possible. I noticed that 
> such class is only being used for themes, languages and that stuff, so 
> maybe it is not suitable for other plugins. 
>
> Maybe if my plugin has a startup module that starts at the very very 
> beginning (even before load modules) it would be possible to successfully 
> unpack some plugins from it? 
>
> Thanks and regards 
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/a19602e1-dfb5-41d3-9967-7de25b2ed8ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Are tw module closures redundant?

2016-09-05 Thread BJ
I think he meant the regular node.js 'require', but actually this does not 
need iife either see:
http://stackoverflow.com/questions/21531329/are-node-js-modules-need-to-be-wrapped-inside-the-module-pattern



On Monday, September 5, 2016 at 1:17:23 PM UTC+1, Danielo Rodríguez wrote:
>
>
>
> El lunes, 5 de septiembre de 2016, 13:03:25 (UTC+2), BJ escribió:
>>
>> yes
>>
>
> But then what was Jeremy referring to when he wrote:
>
> The reason for the apparently unnecessary IFE is so that the same .js 
>> files can be require()'d by regular Node.js code.
>
>
> Seems that there is some reasoning (or at least one situation) that makes 
> them necessary.
>
> Regards
>
>  
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/5ed6ba9b-52b9-4c85-82ea-aabf511b13bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Side effects of executing $tw.wiki.defineTiddlerModules twice?

2016-09-05 Thread BJ
Hi Danielo,
tiddlywiki constructs some of its software by synthesis in the startup 
modules (by $tw.modules.forEachModuleOfType() for instance) so in general, 
what you are suggesting will not work as modules need to be added before 
start modules are run.

all the best
BJ

On Friday, September 2, 2016 at 12:46:30 AM UTC+1, Danielo Rodríguez wrote:
>
> Hello,
>
> I have a startup module that should register some module types. It runs 
> before the startup module load-modules, so what it does is:
>
>
>- Loads the required tiddlers
>- Add those tiddlers to the store
>- calls $tw.wiki.defineTiddlerModules() to register those modules
>- Lets load-modules do its work
>
> I was wondering if there is any ugly side effect because 
> executing $tw.wiki.defineTiddlerModules() twice, once on boot and another 
> after my startup module has been executed.
> Taking a look at the function seems that it takes care of not registering 
> plugins twice, but I'm not sure if something escapes to my eyes.
>
> Regards.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/888feca4-66fc-4716-8070-ee43e8ab3901%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Are tw module closures redundant?

2016-09-05 Thread BJ
yes

On Saturday, September 3, 2016 at 5:58:09 PM UTC+1, Danielo Rodríguez wrote:
>
> I come here looking for answers and I didn't find any!
>
> Is the IIFE redundant or not?
> I would love to get rid of them.
>
> Regards
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/e77371f3-b7a1-4f6d-a2b1-e5bf13533951%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Send a message(?) to set a variable one level up the widget parse tree?

2016-09-05 Thread BJ
Hi David,
variables are read only, writing to a var will create a new instance of the 
var eg

<$vars x ="3">
<$vars x ="4">

<> //x is 4


<> //x is 3


this is because refresh is only actioned through updating tiddlers, so you 
need to update tiddlers not vars with the selected widget. You should not 
use javascript to write to vars further up the widget tree, as only writing 
to a tiddler will cause the refresh cycle.

you can write to tiddler and then set a var with that tiddler 

<$vars x ={{tid_x}}>
<$select...update tid-x here... >


all the best BJ

On Monday, September 5, 2016 at 2:42:34 AM UTC+1, David Someone wrote:
>
> Using the SelectWidget, you can't seem to put the selected value *outside* 
> the select widget... you can only do things inside the select widget. It's 
> like you can't send a message up the widget parse tree to set a variable 
> one level up. (Oh, if only there were an action-setparentvar !!)
>
> So, I can do this:
>
> <$select tiddler="$:/temp/tiddler" actions=<> >
>   <$list filter="[...find my tiddlers..]]">
> <>
>   
> 
>
> And I can do things within the $select widget, and send back messages to 
> change some fields or stuff, 
>
> but I can't do this:
>
> \define makeASelect()
> <$select tiddler="$:/temp/tiddler" actions=< selectedOptionValue:?? selectedOptionText:?? >> >
>   <$list filter="[...find my tiddlers..]]">
> <>
>   
> 
> \end
>
> <>
>
> You selected: *??text of selected option??* with value *??value of 
> selected option??* 
>
> no matter how hard I try!
>
> How do I make a select that tells me *outside* the select, what I've 
> selected? I've tried transclusions but the order of wikifications keeps 
> {{screwing}} <> $(up)$ !!
>
> Tobias? PMario? Jeremy? All *far* smarter people than I, and I'm certain 
> you have paypal accounts... this is worth a case of beer to me!
>
> Cheers,
> David.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/76f5e783-263f-475f-b09c-b669c0779d61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Javascript modules: use or not use an IIFE ?

2016-09-03 Thread BJ
Danielo,

this was discussed here:

https://groups.google.com/forum/#!msg/tiddlywiki/N7tXELs9z6k/cDj7GH-mDgAJ

all the best bj

On Saturday, September 3, 2016 at 4:11:27 PM UTC+1, Danielo Rodríguez wrote:
>
> Hello,
>
> I have been using IIFE for all my javascript modules.
> Now I tried to implement some automatic documentation using JSDOC. The 
> documents were not being generated correctly, the parser was unable to find 
> the clases, the methods and so on.
>
> Then I realized that it was because all my code was inside an IIFE. I 
> removed the IIFE wrapper and documentation worked flawlessly. 
>
> I was fearing that modules stopped working, but for my surprise it worked. 
> And they do because TW module system wraps everything into an IIFE, so 
> probably my IIFE is not needed at all.
>
> Some core modules are using an IIFE wrapper directly on their code, for 
> example:
>
>
> https://github.com/Jermolene/TiddlyWiki5/blob/086506012d98e9db34c7d96dc27aea249a9bdbc8/core/modules/startup/info.js
>
> While some others don't.
>
> Is this any reasoning behind this?
> What's the correct approach?
>
> Thanks and regards.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/09a0fe59-4872-4008-89e7-87453d4026c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Using macros and $vars

2016-08-29 Thread BJ
Hi Eskha,
I can't say I am much of a fan of tw5 widget and macro mechanism, the 
syntax works differently in different places, it takes some remembering to 
get it right.

Your var title will contain the string "New {{type}}" and when it is 
reference as a parameter to a widget - ie 

title=<>
this value is passed to the parameter 'title'.

On the other hand when it is referenced as a standalone var its content is 
'wikified' and the {{type}} is replaced by item.

one working solution is

\define maketitle(type) New $type$

\define check(name) $name$ = <<$name$>>

\define x(type)
<$vars title=<>>
<>
<$button>
<$action-sendmessage $message="tm-new-tiddler"
title=<>
/>
<>


\end

<$macrocall $name=x type={{type}}>

Another problem is that strings inside the "<< >>" of the macrocall are not 
wikified so

<> will not be wikiflied

all the best

BJ



On Monday, August 29, 2016 at 5:09:53 PM UTC+1, Eskha wrote:
>
> Hello TiddlyWiki community,
>
>
> As a regular user of TiddlyWiki for some years, I was up to know able to 
> customize on my own this great tool for different use cases.
> However, with TW5, I must admit that it has taken me far more time to hack 
> it mainly because of macros and widgets syntax and understanding of how 
> they work. I am now to a point where I am completely stuck with the 
> following (and other same looking) problem. 
>
>
> I am trying to create a new tiddler buttons with properties depending on 
> different parameters.
>
> After several unsuccessful attempts and looking at online documentation 
> and examples, I made a minimal test case using macros and $vars widget.
> http://tw5gad.tiddlyspot.com/
>
> The code I used:
>
> \define maketitle() New {{type}}
>
> \define check(name) $name$ = <<$name$>>
>
> <$vars title=<>>
> <>
> <$button>
> <$action-sendmessage $message="tm-new-tiddler"
> title=<>
> />
> <>
> 
> 
>
> I set the content of tiddler type to "item" and therefore was expecting 
> this code to:
> * Display : *title = New item** Display a button labelled *New item** 
> When the button is clicked to create a tiddler with title New item 
> <http://tw5gad.tiddlyspot.com/#New%20item>
> What I currently have is:Display : *title = New item* ... *Ok*A button 
> labelled *New item* ... *Ok*which create a tiddler with title New item 
> <http://tw5gad.tiddlyspot.com/#New%20item> ... *Ko* : title is New 
> {{type}}
> Could you help me:
> * to understand why and when the title variable is interpreted and when it 
> is not ?
> * to find me a working solution ?
>
>
> Best regards and thank you for all your contributions to TiddlyWiki.
>
>
> Eskha
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/6368102c-c1c1-4aa6-9ad4-7f6f7f897bd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: How should I write my plugin so that it executes code server-side rather than in the browser?

2016-08-24 Thread BJ
Hi Dan,

On Monday, August 22, 2016 at 6:21:12 PM UTC+1, Daniel Metcalfe wrote:
>
> I'd like to write a plugin that will call an an API and convert the 
> returned data into WikiText to be added to a tiddler.
>
> At first I tried a simple Javascript macro but this would not work due to 
> Same Origin Policy. Advice from other people on the forums led me to 
> believe my best option was to simply write a plugin that will be executed 
> server side. I'm happy to accept the restriction that my plugin can only be 
> used with TiddlyWiki on NodeJS.
>
> I've since decided that I want my plugin to be run asynchronously at 
> runtime when the tiddler is loaded so I thought a 'widget' module type was 
> best for this. However from what I've seen there is only a small amount of 
> core code that is run specifically under node and the only hooks into this 
> are via the 'syncadaptor' and 'command' module types. I don't think either 
> of these fit my use case.
>
 
by loaded, do you mean displayed?
 

>
> Can I use the plugin mechanism to write code that will only be executed 
> server-side?
>
> Any help is much appreciated,
> Regards,
> Dan
>


all the best
BJ 

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/f2b4b127-1a6a-4e51-9cdc-fbc8643fee6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Transcluding with a variable {{<>}} in a Widget or Macro

2016-08-21 Thread BJ
hi David,
its like this

\define x(myTag)
<$set name="myValue" value={{$myTag$}} >
> > {{$myTag$}} 

\end

<$list filter="[tag[test]sort[order]] -[has[draft.of]]" 
variable="myTag">
 <$macrocall $name='x' myTag=<> /> 
   

cheers
BJ

On Saturday, August 20, 2016 at 10:47:31 PM UTC+1, David Someone wrote:
>
> Hi again, 
>
> I've spent a couple of hours looking this one up, so I apologize for 
> having to resort to yet another post!
>
> I'm trying to set a variable, whose value is the text of a tiddler 
> specified by another variable.
>
> For a specific example, set a select-option value to the text of a Tiddler 
> found in a list.
>
> <$list filter="[tag[$tag$]sort[order]] -[has[draft.of]]" 
> variable="myTag">
>   <$set name="myValue" value={{<>}} >
> > > <> 
>   
>
>
> If I set the variable to a static value, I'm fine:
>
> <$set name="myValue" value="OneTwoThree">
>
> If I set the variable to a transcluded value, I'm also fine:
>
> <$set name="myValue" value={{SomeTiddler}} >
>
> It's only when setting it to a transclusion whose name is specified by a 
> variable that I'm having a problem:
>
> <$set name="myValue" value={{<>}} >
>
> Other things I've tried are using the $transclude widget instead of 
> setting another variable, like so:
>
> > > > <> 
>
> ...and inside a $macrocall
> > /> > <
> > 
>
>
> I'm certain there's a much easier way than I know about... I just can't 
> find it for the life of me!
>
>
> Thanks again!
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/85a41cb8-6fc0-49a6-86ae-3c03ac3442ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: Scope of $tw and this.wiki (for starter :o) )

2016-03-22 Thread BJ
It depends on what you plugin does. In each tiddler you  need to put what 
type of module the javascript is so that tiddlywiki can load it at the 
correct time - generally try and copy what others have done.

$tw is alway visible - it is a global variable.

If you have a particular functionality then I may be able to be more 
specific, you can experiment and see what works.



On Tuesday, March 22, 2016 at 6:22:32 PM UTC, Alain Dutech wrote:
>
> Thanks BJ.
>
> I have looked a bit at boot.js and various startup modules. It is a bit 
> more clear (especially how $tw is created and populated, but not perfrect. 
> Still, I cannot say when the $tw can be used. 
>
> Specifically, if a create a new module with the classical
> `(function(){ ... `
>
> I will not be able to use `$tw.utils`. What should I do to "see" $tw ? 
> If I call my module from a Widget, I could pass my module the $tw variable 
> ? Other ways ?
>
> And, to go back to filter.js
> For example, $tw is used inside the fonction
> exports.compileFilter = function(filterString) {
>
> Is it because filters.js is loaded through $tw.modules.applyMethods() that 
> $tw is in its scope ?
>
> Alain
>
>
>
> On Sun, Mar 20, 2016 at 8:22 PM, BJ <bugg...@gmail.com > 
> wrote:
>
>> HI Alain,
>> the modular structure of tiddlywiki is more extensive that 'require'.
>>
>> There is some documentation here
>>
>> tiddlywiki.com/dev. <http://tiddlywiki.com/dev>
>>
>> but mostly you can read the code! but ask questions when you get stuck.
>>
>> The $tw structure is populated in a number of step during the start up. 
>> It is defined at the begin of the boot and some basic functionality is 
>> added to it in boot.js. Alot of extra stuff in added to it in 
>>
>> $:/core/modules/startup/load-modules.js
>>
>> javascipt modules in tiddlywiki can have a module-type that allow them to 
>> be  add to $tw thru $tw.modules.applyMethods(). (including the filter 
>> functions)
>>
>> Some places use 'this' instead of $tw, may be for some future expansion 
>> of tw?
>>
>> all the best
>>
>> BJ
>>
>>
>> On Sunday, March 20, 2016 at 5:16:22 PM UTC, Alain Dutech wrote:
>>>
>>>
>>> Hi,
>>> this must be a bunch of stupid questions but I'm still learning the 
>>> logic of javascript.
>>>
>>> 1) when is the global $tw variable available?
>>>   - what "module" are required for it to be available ?
>>>   - does it become available after  
>>> `require("$:/core/modules/widgets/widget.js");` ? Why ?
>>>   - how come $tw can be used in the filter.js module ? as show below
>>>
>>> exports.getFilterOperators = function() {
>>> if(!this.filterOperators) {
>>> $tw.Wiki.prototype.filterOperators = {};
>>> $tw.modules.applyMethods("filteroperator",this.filterOperators);
>>> }
>>> return this.filterOperators;
>>> };
>>>
>>> Is it because getFilterOperators is defined inside "exports" ??
>>>  
>>> 2) To use the filter API, and in particular the filterTiddler function 
>>> defined in filters.js (see below), must I "require" filter.js, or 
>>> widget.js, or wiki.js or ???
>>>
>>> exports.filterTiddlers = function(filterString,widget,source) {
>>> var fn = this.compileFilter(filterString);
>>> return fn.call(this,source,widget);
>>> };
>>>
>>> 3) the `this.wiki` of Widgets is initialized through the option 
>>> parameters in the Widget constructor.
>>> so all the function exported by wiki.js are available through this.wiki ?
>>>
>>> 4) Is there like a list of "public" function available through $tw, 
>>> $tw.utils and this.wiki ? I am trying to guess by reading through the 
>>> various *.js modules, but I'm my knowledge of JS make this task a bit 
>>> tedious...
>>>
>>> Thanks for any hint or explanations or info.
>>> Alain
>>>
>> -- 
>> 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/Ul3ezJU98QA/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> tiddlywikide...@googlegroups.com .
>> To post to this group, send email to tiddly...@googlegroups.com 
>> .
>> Visit this group at https://groups.google

[twdev] Re: Scope of $tw and this.wiki (for starter :o) )

2016-03-20 Thread BJ
HI Alain,
the modular structure of tiddlywiki is more extensive that 'require'.

There is some documentation here

tiddlywiki.com/dev. <http://tiddlywiki.com/dev>

but mostly you can read the code! but ask questions when you get stuck.

The $tw structure is populated in a number of step during the start up. It 
is defined at the begin of the boot and some basic functionality is added 
to it in boot.js. Alot of extra stuff in added to it in 

$:/core/modules/startup/load-modules.js

javascipt modules in tiddlywiki can have a module-type that allow them to 
be  add to $tw thru $tw.modules.applyMethods(). (including the filter 
functions)

Some places use 'this' instead of $tw, may be for some future expansion of 
tw?

all the best

BJ

On Sunday, March 20, 2016 at 5:16:22 PM UTC, Alain Dutech wrote:
>
>
> Hi,
> this must be a bunch of stupid questions but I'm still learning the logic 
> of javascript.
>
> 1) when is the global $tw variable available?
>   - what "module" are required for it to be available ?
>   - does it become available after  
> `require("$:/core/modules/widgets/widget.js");` ? Why ?
>   - how come $tw can be used in the filter.js module ? as show below
>
> exports.getFilterOperators = function() {
> if(!this.filterOperators) {
> $tw.Wiki.prototype.filterOperators = {};
> $tw.modules.applyMethods("filteroperator",this.filterOperators);
> }
> return this.filterOperators;
> };
>
> Is it because getFilterOperators is defined inside "exports" ??
>  
> 2) To use the filter API, and in particular the filterTiddler function 
> defined in filters.js (see below), must I "require" filter.js, or 
> widget.js, or wiki.js or ???
>
> exports.filterTiddlers = function(filterString,widget,source) {
> var fn = this.compileFilter(filterString);
> return fn.call(this,source,widget);
> };
>
> 3) the `this.wiki` of Widgets is initialized through the option parameters 
> in the Widget constructor.
> so all the function exported by wiki.js are available through this.wiki ?
>
> 4) Is there like a list of "public" function available through $tw, 
> $tw.utils and this.wiki ? I am trying to guess by reading through the 
> various *.js modules, but I'm my knowledge of JS make this task a bit 
> tedious...
>
> Thanks for any hint or explanations or info.
> Alain
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/5fcc3488-48af-4159-b267-f3a62fcf8a69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: TW5 how to use 'filters' with TW5 javascript API

2016-03-12 Thread BJ
Hi Alain,

in the list widget the code is 

ListWidget.prototype.getTiddlerList = function() {
var defaultFilter = "[!is[system]sort[title]]";
return 
this.wiki.filterTiddlers(this.getAttribute("filter",defaultFilter),this);
};

so you would use 

this.wiki.filterTiddlers("[tag[chapter]!is[system]sort[]]");

which would return an array of tiddler titles

all the best 

BJ

On Friday, March 11, 2016 at 11:32:11 PM UTC, Alain Dutech wrote:
>
> Hello,
>
> I would like to use à filter expression (for example 
> "[tag[chapter]!is[system]sort[]]") inside a javascript plugin.
> Do you have ideas of what tiddlywiki function to use ? Any example in the 
> boot/core/plugins javascript files ?
>
> Thank you,
> Snow
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/ff607a22-874e-4941-b8a4-4c4711f01d3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: TW plugin workflow

2016-02-23 Thread BJ
I don't why it does not work, but I would say developing plugins is easier 
using a cloned tiddlywiki repository. Often when developing plugins I need 
to put debug into the core, and this is made easier if you can branch the 
tiddlywiki repository to have multiple version with different mods. Also 
you can test your plugin against different version of tiddlywiki by 
checkout different tags.

>From your project tree I think you will have a (different) problem in that 
tiddlywiki (I think) will include your tiddlers in the dir 
edit-comptextdemo into your plugin. I use a tiddlywiki.files to tell 
tiddlywiki to ignore files in a subdir.


On Tuesday, February 23, 2016 at 5:12:53 PM UTC, Alain Dutech wrote:
>
> Thanks for pointing up the power nodejs + tiddlywiki. It really open my 
> perspectives :o)
>
> So, I've experimented with nodejs as explained in 
> http://tiddlywiki.com/#Installing%20TiddlyWiki%20on%20Node.js
>
> And everything is great while using the "server" edition.
>
> *But* I'd like to do that with "my" edit-comptextdemo edition. And I have 
> a problem
> 0) say tiddlywiki is installed by npm in $TWHOME
> 1) I have my gitub plugin TW5-edit-comptext cloned in rep 
> $TWHOME/plugins/snowgoon88/edit-comptext. Let name it $MYPLUGIN
> 2) I set up a *link* in $TWHOME/editions to $MYPLUGIN/edit-comptextdemo
> 3) but, when I try `nodejs tiddlywiki.js dev_edit --init edit-comptextdemo`
> in $TWHOME I have an error that does not append if I try to init something 
> with, for, example
> nodejs tiddlywiki.js dev_edit --init server
>
> ERROR :
> Copied edition 'edit-comptextdemo' to dev_edit
>
> fs.js:432
>   return binding.open(pathModule._makeLong(path), stringToFlags(flags), 
> mode);
>  ^
> Error: ENOENT, no such file or directory 'dev_edit/tiddlywiki.info'
> at Object.fs.openSync (fs.js:432:18)
> at Object.fs.readFileSync (fs.js:286:15)
> at Command.execute ($:/core/modules/commands/init.js:51:31)
> at Commander.executeNextCommand ($:/core/modules/commander.js:82:14)
> at Commander.execute ($:/core/modules/commander.js:46:7)
> at Object.exports.startup ($:/core/modules/startup/commands.js:34:12)
> at $tw.boot.executeNextStartupTask 
> (/home/dutech/Projets/node_modules/tiddlywiki/boot/boot.js:1945:10)
> at $tw.boot.executeNextStartupTask 
> (/home/dutech/Projets/node_modules/tiddlywiki/boot/boot.js:1943:21)
> at $tw.boot.executeNextStartupTask 
> (/home/dutech/Projets/node_modules/tiddlywiki/boot/boot.js:1943:21)
> at $tw.boot.executeNextStartupTask 
> (/home/dutech/Projets/node_modules/tiddlywiki/boot/boot.js:1943:21)
>
> *Someone can tell me what is happening ?? *
>
> Thanks a lot,
> Alain
>
> For info,
> ** the following command works fine
> nodejs ./tiddlywiki.js editions/edit-comptextdemo --build index 
>
> ** File editions/edit-comptextdemo/tiddlywiki.info is
> {nodejs ./tiddlywiki.js editions/edit-comptextdemo --build index
> "description": "Demo of the Edit-Comptext plugin",
> "plugins": [
> "snowgoon88/edit-comptext"
> ],
> "themes": [
> "tiddlywiki/vanilla",
> "tiddlywiki/snowwhite"
> ],
> "includeWikis": [
> ],
> "build": {
> "index": [
> 
> "--rendertiddler","$:/core/save/all","edit-comptextdemo.html","text/plain"]
> }
> }
>
> ** And rep editions/edit-comptextdemo has
> > editions/edit-comptextdemo
> ├── output
> │   └── edit-comptextdemo.html
> ├── tiddlers
> │   ├── About.tid
> │   ├── $__config_EditorTypeMappings_text_vnd.tiddlywiki.tid
> │   ├── DefaultTiddlers.tid
> │   ├── hisFive.tid
> │   ├── hisFor.tid
> │   ├── hisOne.tid
> │   ├── hisThree.tid
> │   ├── hisTwo.tid
> │   ├── myOne.tid
> │   ├── myTwo.tid
> │   ├── SiteSubtitle.tid
> │   ├── SiteTitle.tid
> │   └── Under the hood.tid
> └── tiddlywiki.info
>
> and 
> ** plugins/snowgoon88/edit-comptext
> ├── edit-comptextdemo
> │   ├── output
> │   │   └── edit-comptextdemo.html
> │   ├── tiddlers
> │   │   ├── About.tid
> │   │   ├── $__config_EditorTypeMappings_text_vnd.tiddlywiki.tid
> │   │   ├── DefaultTiddlers.tid
> │   │   ├── hisFive.tid
> │   │   ├── hisFor.tid
> │   │   ├── hisOne.tid
> │   │   ├── hisThree.tid
> │   │   ├── hisTwo.tid
> │   │   ├── myOne.tid
> │   │   ├── myTwo.tid
> │   │   ├── SiteSubtitle.tid
> │   │   ├── SiteTitle.tid
> │   │   └── Under the hood.tid
> │   └── tiddlywiki.info
> ├── edit-compte

[twdev] Re: TW plugin workflow

2016-02-23 Thread BJ
Hi Snow,
I wrote those instructions on tiddlywiki.com/dev for developing plugins. If 
you have followed those instruction and created a github repository then 
you are nearly follow my work flow. The way I work is to edit my source 
files and then rebuld my tiddlywiki using nodejs. This is the most 
efficient way to work. I use a couple of batch files to automate the 
process.

I have a 'template' project that I use to create other projects with. You 
can clone it and give it a try. These are the instructions

open a bash shell and go to the root of you copy of the  tiddlywiki 
repository (that is on your computer)

then type:

 cd plugins
 mkdir bj
 cd bj
 git clone https://github.com/buggyj/TW5-nulleditor
 cd TW5-nulleditor/build/
./bld.sh

the result is a new 'test' tiddlywiki html file located in 
build/browser/output that contains the plugin

I have another batch file edit.sh that I use to create permanent tiddlers 
for testing

all the best 
BJ

On Monday, February 22, 2016 at 8:06:08 PM UTC, Alain Dutech wrote:
>
> Hi everyone,
>
> this must be a very naive question, but I feel like my JS plugins 
> development workflow is far from optimal and I would like some advice.
>
> So, how do I develop (on my Linux)
>
> 1) I have a twsomething.html with my javascript tiddler (say myplug.js) in 
> it.
> 2) myplug.js is also a file in my directory.
> 3) I edit myplug.js, say with emacs. When I feel it is "ready", I copy in 
> (manually) in my tiddler.
> 4) I reload my twsometing.html file in my browser
> 4.1) if no error, I do small adkustment directly in the tiddler. When 
> fine, I copy back to my myplug.js file.
> 4.2) if error => big red popup window in browser, I do my best to correct 
> it directly in the browser, but most often the big red window is too large 
> and cannot bi clicked away. So it is a bit painfull...
> 5) go back to 3)
> 6) eventually, pack my plugin as explained in 
> http://tiddlywiki.com/dev/#Developing%20plugins%20using%20Node.js%20and%20GitHub
>
> So I'm pretty sure there is a better way, but as I am not experienced at 
> all with javascript/tw5, I can not find a better way of doing things.
>
> How are you doing things ?
>
> Thanks,
> Snow/Alain
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/f9c03878-b431-4c67-bf61-97527f11f078%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: [TW5] How get target tiddler by title in widget

2016-02-10 Thread BJ

Hi Andrew,
sometimes we try to hard with programming and need to have a break, often I 
try to solve a problem without success for hours, then the next morning the 
answer comes to me immediately. 

I will make some changes to you work and put it up on tiddyspot. - it looks 
it me like it is almost finished.

If you have a github account (or feel like having one) you could put your 
work into github which would allow myself and other to contribute easily to 
your work.

Cheers
BJ

On Wednesday, February 10, 2016 at 1:51:46 PM UTC, Andrew wrote:
>
> Thank you BJ. Well, I really don't know what I'm doing. Now it creates a 
> bunch of fields with the letters of the title when I try to use bold or 
> anything. I wish someone could just take this over.
>
>
>
> Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5
>
>
>  Original message 
> From: BJ <bugg...@gmail.com > 
> Date: 02/10/2016 3:38 AM (GMT-07:00) 
> To: TiddlyWikiDev <tiddly...@googlegroups.com > 
> Subject: Re: [twdev] Re: [TW5] How get target tiddler by title in widget 
>
> you can do it like this:
>
> EditListWidget.prototype.myFunction= function (pre,post)  {
> var dummy=ResetFind();
> /* This function is for entries that are preceeded and followed by the 
> entry */
> var txtarea = this.parentDomNode.getElementsByTagName("textarea")[0];
> var str=txtarea.value;
>
> and change references from myFunction() to this.myFunction()
>
> all the best 
>
> BJ
> On Tuesday, February 9, 2016 at 1:00:34 PM UTC, Andrew wrote:
>>
>> Thank you Jed, Tobias, and BJ,
>> I guess it is over my head. All of your suggestions may actually work but 
>> I cant figure out how to use them. In it's half unfinished state I was 
>> working on http://www.format.tiddlyspot.com if anyone would like to have 
>> a look. It has problems of overriding core tiddlers which I want to change 
>> but cant figure out how. I wish anyone could work on it directly.
>>
>> Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5
>>
>>
>>
>>
>>  Original message 
>> From: BJ <bugg...@gmail.com> 
>> Date: 02/08/2016 12:16 AM (GMT-07:00) 
>> To: TiddlyWikiDev <tiddly...@googlegroups.com> 
>> Subject: [twdev] Re: [TW5] How get target tiddler by title in widget 
>>
>> you could do it like this:
>>
>> var element = window.focusedElement;
>> if(element) {// only allow input[type=text]/textarea
>> if (element.tagName === "TEXTAREA" ||(element.tagName === 
>> "INPUT" && element.type === "text")) {
>> return 
>> element.value.substring(element.selectionStart,element.selectionEnd);
>> }
>> } 
>>
>> On Saturday, February 6, 2016 at 1:01:46 AM UTC, Andrew wrote:
>>>
>>> Currently I'm reworking a format widget that modifies text in edit mode. 
>>> The widgets I'm modifying use the following to get selected text but it 
>>> means the ID had to be added to a core tiddler. I'd like to select the 
>>> element by title instead of a Id if possible so that core tiddlers don't 
>>> have to be overridden?
>>>
>>> txt=document.getElementById("myTextarea");
>>>   var startPos = txt.selectionStart;
>>>   var endPos = txt.selectionEnd;
>>>   var listtext= txt.value.substr(startPos, endPos -startPos);
>>>
>>> Maybe with something like the following. I really wish I could figure 
>>> this out:
>>>
>>> var tiddler = 
>>> this.getAttribute("tiddler",this.getVariable("currentTiddler"));
>>>
>>> Or maybe some kind of getTargetElement by title? Help.
>>>
>>> -- 
>> 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 tiddlywikide...@googlegroups.com.
>> To post to this group, send email to tiddly...@googlegroups.com.
>> 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/7f44c313-8fd4-4049-8957-e9477af3da95%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywikidev/7f44c313-8fd4-4049-8957-e9477af3da95%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> You received this message because you are subscribed to the Google Grou

Re: [twdev] Re: [TW5] How get target tiddler by title in widget

2016-02-10 Thread BJ
there are some notes on how to setup github for a tiddlywiki plugin on 
http://tiddlywiki.com/dev - see tiddler 
"Developing plugins using Node.js and GitHub"
some of my plugin are like this (but with addition build scripts),  see 
https://github.com/buggyj/TW5-nulleditor for an example

I have put you modified code here 

http://bjformat.tiddlyspot.com/

On Wednesday, February 10, 2016 at 5:22:53 PM UTC, Andrew wrote:
>
> I do have a github account but I am not familiar with how things work. You 
> are right. I need to migrate everything to github. Thank you for taking an 
> interest. Thank you again.
>
>
>
> Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5
>
>
> ---- Original message 
> From: BJ <bugg...@gmail.com > 
> Date: 02/10/2016 8:48 AM (GMT-07:00) 
> To: TiddlyWikiDev <tiddly...@googlegroups.com > 
> Subject: Re: [twdev] Re: [TW5] How get target tiddler by title in widget 
>
>
> Hi Andrew,
> sometimes we try to hard with programming and need to have a break, often 
> I try to solve a problem without success for hours, then the next morning 
> the answer comes to me immediately. 
>
> I will make some changes to you work and put it up on tiddyspot. - it 
> looks it me like it is almost finished.
>
> If you have a github account (or feel like having one) you could put your 
> work into github which would allow myself and other to contribute easily to 
> your work.
>
> Cheers
> BJ
>
> On Wednesday, February 10, 2016 at 1:51:46 PM UTC, Andrew wrote:
>>
>> Thank you BJ. Well, I really don't know what I'm doing. Now it creates a 
>> bunch of fields with the letters of the title when I try to use bold or 
>> anything. I wish someone could just take this over.
>>
>>
>>
>> Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5
>>
>>
>>  Original message 
>> From: BJ <bugg...@gmail.com> 
>> Date: 02/10/2016 3:38 AM (GMT-07:00) 
>> To: TiddlyWikiDev <tiddly...@googlegroups.com> 
>> Subject: Re: [twdev] Re: [TW5] How get target tiddler by title in widget 
>>
>> you can do it like this:
>>
>> EditListWidget.prototype.myFunction= function (pre,post)  {
>> var dummy=ResetFind();
>> /* This function is for entries that are preceeded and followed by the 
>> entry */
>> var txtarea = this.parentDomNode.getElementsByTagName("textarea")[0];
>> var str=txtarea.value;
>>
>> and change references from myFunction() to this.myFunction()
>>
>> all the best 
>>
>> BJ
>> On Tuesday, February 9, 2016 at 1:00:34 PM UTC, Andrew wrote:
>>>
>>> Thank you Jed, Tobias, and BJ,
>>> I guess it is over my head. All of your suggestions may actually work 
>>> but I cant figure out how to use them. In it's half unfinished state I was 
>>> working on http://www.format.tiddlyspot.com if anyone would like to 
>>> have a look. It has problems of overriding core tiddlers which I want to 
>>> change but cant figure out how. I wish anyone could work on it directly.
>>>
>>> Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5
>>>
>>>
>>>
>>>
>>>  Original message 
>>> From: BJ <bugg...@gmail.com> 
>>> Date: 02/08/2016 12:16 AM (GMT-07:00) 
>>> To: TiddlyWikiDev <tiddly...@googlegroups.com> 
>>> Subject: [twdev] Re: [TW5] How get target tiddler by title in widget 
>>>
>>> you could do it like this:
>>>
>>> var element = window.focusedElement;
>>> if(element) {// only allow input[type=text]/textarea
>>> if (element.tagName === "TEXTAREA" ||(element.tagName === 
>>> "INPUT" && element.type === "text")) {
>>> return 
>>> element.value.substring(element.selectionStart,element.selectionEnd);
>>> }
>>> } 
>>>
>>> On Saturday, February 6, 2016 at 1:01:46 AM UTC, Andrew wrote:
>>>>
>>>> Currently I'm reworking a format widget that modifies text in edit 
>>>> mode. The widgets I'm modifying use the following to get selected text but 
>>>> it means the ID had to be added to a core tiddler. I'd like to select the 
>>>> element by title instead of a Id if possible so that core tiddlers don't 
>>>> have to be overridden?
>>>>
>>>> txt=document.getElementById("myTextarea");
>>>>   var startPos = txt.selectionStart;
>>>>   var endPos = txt.selectionEnd

Re: [twdev] Re: [TW5] How get target tiddler by title in widget

2016-02-10 Thread BJ
you can do it like this:

EditListWidget.prototype.myFunction= function (pre,post)  {
var dummy=ResetFind();
/* This function is for entries that are preceeded and followed by the 
entry */
var txtarea = this.parentDomNode.getElementsByTagName("textarea")[0];
var str=txtarea.value;

and change references from myFunction() to this.myFunction()

all the best 

BJ
On Tuesday, February 9, 2016 at 1:00:34 PM UTC, Andrew wrote:
>
> Thank you Jed, Tobias, and BJ,
> I guess it is over my head. All of your suggestions may actually work but 
> I cant figure out how to use them. In it's half unfinished state I was 
> working on http://www.format.tiddlyspot.com if anyone would like to have 
> a look. It has problems of overriding core tiddlers which I want to change 
> but cant figure out how. I wish anyone could work on it directly.
>
> Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5
>
>
>
>
>  Original message 
> From: BJ <bugg...@gmail.com > 
> Date: 02/08/2016 12:16 AM (GMT-07:00) 
> To: TiddlyWikiDev <tiddly...@googlegroups.com > 
> Subject: [twdev] Re: [TW5] How get target tiddler by title in widget 
>
> you could do it like this:
>
> var element = window.focusedElement;
> if(element) {// only allow input[type=text]/textarea
> if (element.tagName === "TEXTAREA" ||(element.tagName === 
> "INPUT" && element.type === "text")) {
> return 
> element.value.substring(element.selectionStart,element.selectionEnd);
> }
> } 
>
> On Saturday, February 6, 2016 at 1:01:46 AM UTC, Andrew wrote:
>>
>> Currently I'm reworking a format widget that modifies text in edit mode. 
>> The widgets I'm modifying use the following to get selected text but it 
>> means the ID had to be added to a core tiddler. I'd like to select the 
>> element by title instead of a Id if possible so that core tiddlers don't 
>> have to be overridden?
>>
>> txt=document.getElementById("myTextarea");
>>   var startPos = txt.selectionStart;
>>   var endPos = txt.selectionEnd;
>>   var listtext= txt.value.substr(startPos, endPos -startPos);
>>
>> Maybe with something like the following. I really wish I could figure 
>> this out:
>>
>> var tiddler = 
>> this.getAttribute("tiddler",this.getVariable("currentTiddler"));
>>
>> Or maybe some kind of getTargetElement by title? Help.
>>
>> -- 
> 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 tiddlywikide...@googlegroups.com .
> To post to this group, send email to tiddly...@googlegroups.com 
> .
> 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/7f44c313-8fd4-4049-8957-e9477af3da95%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywikidev/7f44c313-8fd4-4049-8957-e9477af3da95%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/9073a265-8e05-4d00-ab9f-a6d95e030ff6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Copy - paste html source into tiddlywiki - download embedded media offline

2016-02-07 Thread BJ
Hi St Te,

if you are using ff or chrome then there is a programmable 
browser/tiddlywiki plugin called tiddlyclip that allows for web content to 
be sent and included in a tiddlywiki. There is also a firefox plugin 
(tiddlyfox) that allows files to be saved. Currently images are not saved. 
I am not sure if it is possible to download images from code within a 
webpage, it is possible to do this will node.js, if you are using the node 
version (a tw5 plugin would need too be written). Tiddlyclip is quite 
flexible and programmable, see

https://groups.google.com/forum/#!topic/tiddlywiki/RWACKEmd9BA

A background in 'c' is a good place to start learning js - I found js to be 
a nature extension of 'c' in the sense that it is possible to see how 
things are implemented. I followed this route from 'c'  to js. My 
javascript was 'c' like at first but functional, it soon improved.

All the best

BJ

On Sunday, February 7, 2016 at 6:41:40 PM UTC, St Te wrote:
>
> Hi,
>
> Sorry for double posting, I started and closed a discussion on the 
> TiddlyWiki group.
>
> I'm currently using my tiddlywiki on a day to day basis and loving it.
> I own over 2000 tiddlers as of today, most of them projects and or 
> articles that I've copied and pasted into 
> tiddlywiki manually.
> I know that tiddlywiki is capable of using the  tag, but this 
> doesn't cover the following needs :
>
>- I want to be able to copy paste a page source and node.js / 
>tiddlywiki download the images / optionally other resources and link them 
>inside my .tid file. 
>- Why I want this ? The full text search works wonders and currently 
>the only way I backup my favourite articles is with getpocket, and I don't 
>control the content.
>- Is it possible to create a plugin that would do just that ?
>- What are the limitations from the code side ?
>
>
> I'd be willing to write this plugin, I'm a C dev at the moment, no 
> experience with JS/web tech.
> But your advice would help.
>
> Regards,
> S
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/3dfda41c-7591-4134-bc94-657d1b6765f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] How get target tiddler by title in widget

2016-02-07 Thread BJ
you could do it like this:

var element = window.focusedElement;
if(element) {// only allow input[type=text]/textarea
if (element.tagName === "TEXTAREA" ||(element.tagName === 
"INPUT" && element.type === "text")) {
return 
element.value.substring(element.selectionStart,element.selectionEnd);
}
} 

On Saturday, February 6, 2016 at 1:01:46 AM UTC, Andrew wrote:
>
> Currently I'm reworking a format widget that modifies text in edit mode. 
> The widgets I'm modifying use the following to get selected text but it 
> means the ID had to be added to a core tiddler. I'd like to select the 
> element by title instead of a Id if possible so that core tiddlers don't 
> have to be overridden?
>
> txt=document.getElementById("myTextarea");
>   var startPos = txt.selectionStart;
>   var endPos = txt.selectionEnd;
>   var listtext= txt.value.substr(startPos, endPos -startPos);
>
> Maybe with something like the following. I really wish I could figure this 
> out:
>
> var tiddler = 
> this.getAttribute("tiddler",this.getVariable("currentTiddler"));
>
> Or maybe some kind of getTargetElement by title? Help.
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/7f44c313-8fd4-4049-8957-e9477af3da95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Help needed with git

2016-01-23 Thread BJ
It depends on how you are working with git (do you work off the next 
prerelease or v5.1.10?),

I would probably do 

git checkout v.5.1.10
git checkout -b nojingle

then delete the file and do a commit and push

all the best 
BJ

On Saturday, January 23, 2016 at 6:02:26 PM UTC, Matabele wrote:
>
> Hi
>
> I keep ending up with this file in the working copy of my local branch -- 
> this interferes with setting up my workflow. I have just deleted everything 
> on my Github account and on my HDD, and started with a fresh fork -- and 
> its back :-(
>
>
> <https://lh3.googleusercontent.com/-ujIs18l7xIU/VqO-_yjxb-I/Ajc/fPxU0J9jxPA/s1600/160123-0001.png>
> What is it, and how do I get rid of it?
>
> Any help would be much appreciated -- this is getting to be very 
> frustrating.
>
> regards
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/4b73af40-16ff-4cd0-adc3-f83f05a62068%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Are tw module closures redundant?

2016-01-12 Thread BJ
I can't see how code could be compiled apart from thru the action of 
boot.js, and in that case vm.runInNewContext(code,sandbox,filename) is run 
and the code has the sandbox as a global object. What does ' bypassing the 
Node resolver' mean?

On Tuesday, January 12, 2016 at 6:02:04 PM UTC, Devin Weaver wrote:
>
> Thinking about this I bet that TW is bypassing the Node resolver which 
> means it is loosing the private context. Though if that were the case then 
> perhaps there is a way to manage the TW resolver better so the IIFE was not 
> required for every developer to remember. Especially since placing IIFE in 
> Node.js code is considered bad practice.
>
> On Tuesday, January 12, 2016 at 10:13:26 AM UTC-5, Felix Küppers wrote:
>>
>> Continued discussion started by Devin from: 
>> https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/tiddlywiki/N7tXELs9z6k/_Of0R3LbDgAJ
>>  
>> 
>>
>> *Intro:*
>>
>> While a poll in the tw community reveiled "warm feelings" in connection 
>> to additional closures – and there are rumors about a study that supports 
>> this empirical finding – the question is whether they are actually 
>> redundant.
>>
>> Quote from Devin's source (
>> http://nodejs.org/api/modules.html#modules_modules):
>>
>> Variables local to the module will be private, as though the module was 
>>> wrapped in a function
>>>
>>
>>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/5facc128-2fc0-4037-b057-c5027c18063b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: [TW5] Link completion Editor

2015-12-26 Thread BJ
Hi Alain,
the statement (default function parameter ) is not supported by chrome 
until version 49 according to firefox so
nbMax=2
is causing the problem

all the best 

BJ
On Saturday, December 26, 2015 at 12:35:07 PM UTC, Alain Dutech wrote:
>
> Yop, it doesn't work on chromium-browser + Linux
> But I have no clue.
>
> Alain
>
> On Sat, Dec 26, 2015 at 11:50 AM, Alain Dutech <snowg...@gmail.com 
> > wrote:
>
>> Well... It works here on Linux+Firefox and Win7+Firefox with the file 
>> attached in my first mail.
>> Compatibility I guess...
>>
>> Any hints? The error message does not tells where in 'edit-comptext.js' 
>> the problem is.
>> End of lines (Win vs Linux vs Mac) ? Or the fact that I use utf8?
>>
>> I'll have a look, but not sure I am good enough in javascript/browsers to 
>> *quickly* find the error.
>>
>> I've attached the two javascript file/tiddler I use.
>>
>> Alain
>>
>>
>>
>> On Sat, Dec 26, 2015 at 11:33 AM, Tobias Beer <beert...@gmail.com 
>> > wrote:
>>
>>> Hi Alain,
>>>
>>> Curious to see this work. However, for now I get this:
>>>
>>>
>>> <https://lh3.googleusercontent.com/-UxuaeQMdhtw/Vn5suOjeAKI/B9E/noyKO5YlKl8/s1600/2015-12-26_113149.jpg>
>>>
>>> Best wishes,
>>>
>>> Tobias. 
>>>
>>> -- 
>>> 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 
>>> tiddlywikide...@googlegroups.com .
>>> To post to this group, send email to tiddly...@googlegroups.com 
>>> .
>>> 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/245d7c10-89fb-42e0-a066-a2c28a273e09%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/tiddlywikidev/245d7c10-89fb-42e0-a066-a2c28a273e09%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>> 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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/2d3a43f9-9aa1-4484-a40e-0bfe451b320d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] [TW5] Instantiate a list widget in custom widget

2015-12-10 Thread BJ
Hi Tobias,
you can access child widgets thru 

this.children

which is the array holding the child widgets

On Thursday, December 10, 2015 at 6:59:00 PM UTC, Tobias Beer wrote:
>
> @Jeremy,
>
> (How) Would I be able to access the child widgets that get created via 
> *makeChildWidgets* from the creating widget? ...or is it that I (simply) 
> need to initialize them according to the specified attributes, before 
> creating them.
>
> Best wishes,
>
> Tobias.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/a806605e-4836-492f-99a9-dd40904e2d3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: "Real" Markdown Integration

2015-11-28 Thread BJ
Hi Christopher,

there is a plugin for the marked version of markdown here

http://bjtools.tiddlyspot.com which does tables and html.

I have experimented with markdown and transclusion and other  tw5 widgets 
within markdown. One problem is that there are rules as to where html can 
be used in markdown (at least for the block mode type html tags), so 
sometime tiddlywiki widgets will not work (if they are considered as html 
tags). 

all the best
BJ

On Saturday, November 28, 2015 at 11:18:44 AM UTC, Christopher Mann wrote:
>
> Oh, yes, transclusion. I forgot to mention transclusion in Markdown. What 
> would the implications of Marklusion be?
>
> By the way, it seems I can hard-code my header sections for Markdown 
> tiddlers with a first line as 
>
> # Goodies Plugin from HowWowNow
>
> Goodies is a collection of utility tiddlers[...]
>
> Christopher
> http://tiddlywiki.howwownow.com
>
>
> Le 28 nov. 2015 à 11:41, Christopher Mann <chris...@mann.fr > 
> a écrit :
>
> Hi, 
>
> I see a couple of hurdles to native Markdown integration.
>
>1. The links are not processed natively by the Wiki Engine.
>   - Neither [links[]] nor [backlinks[]] can work
>   - Sometimes, treating the internal links as external links can 
>   create strange behavior
>   - The #SomeTiddler solution is actually a work-around
>2. The .tid files cannot be natively .md, and that is too bad.
>   - With .md files, we could have ubiquietous Tiddler and Markdow 
>   files
>   - The title: TiddlerTitle comes into default Markdown as litteral 
>   text. MultiMarkdown could probably parse the header lines as-is.
>   - If we could just enclose the title: abc etc. with a HTML comment 
>then all would be good.
>3. It would be neat to have TiddlyWiki as a super-set on Markdown. 
>   - If the links could have the extension .md in them I could browse 
>   the pages repository without TiddlyWiki too. The problem is that 
> filesystem 
>   changes are not pushed on NodeJS implementations.
>   - There are a couple of issues with the implementation of Markdown 
>   itself in Javascript that http://www.tagspaces.org/ seems to have 
>   resolved. My main issue is with tables.
>   - Pandoc http://pandoc.org seems to have resolved many of the 
>   questions around the inadequacies of Markdown for wikis here 
>   http://pandoc.org/README.html#pandocs-markdown
>
> Christopher
> http://tiddlywiki.howwownow.com
>
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/db119003-db10-42af-9422-2f11aadf1816%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Rendering tids, filter output inside wiki does not give same results as when the filter is used to render

2015-11-27 Thread BJ
Hi Mark, 
I am not totally clear as to what you are trying to do:

do you have a tiddlywiki that is a modified v5.1.9 ie you have added 
tiddlers to the on line version at tiddlywiki.com (the tiddlywiki.html 
file?)

you have cloned the tiddlywiki github repository to your computer?

You are rendering tiddlers to disk from a tiddlywiki that is created by  
local build of the clone repo (when you run the node tiddlywiki.js) then 
merging in another tiddlywiki (via the load command of tiddlywiki.html)?

comparing the tiddlers rendered with the original tiddlywiki 
(tiddlywiki.html) ?

cheers
BJ

On Friday, November 27, 2015 at 6:42:51 AM UTC, Mark Robbins wrote:
>
> I have a wiki (from tiddlywiki.com) built by hand v5.1.9 -- and I have a 
> recent download of githubs dev package installed.
>
>  
>
My goal is to render out every singl
>
 

> e tiddler in my wiki, except for state tiddlers.
>
> If I put the following filter into the wiki (filter panel) and I get 2242 
> results, but when I use it to render tids I get 2154 results. 88 difference.
>
> [all[]!field:title/^\$:\/state\//] [all[shadows]!field:title/^\$:\/state\//]
>
>
> I know my filter could probably use improvement, but:
>
> Number of tiddlers: 388 *
> Number of tags: 100 
> Number of system tiddlers: 821 *
> Number of shadow tiddlers: 1379 *
> Number of overridden shadow tiddlers: 104 **
>
> 2588* - 242(state) - 104** = 2242
>
> I did a list difference:
>
> Output but not on 
> list$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/fold-all$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/unfold-all$:/config/Performance/Instrumentation$:/config/shortcuts/cancel-edit-tiddler$:/config/shortcuts/save-tiddler$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/delete$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-others$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold$:/config/WikiParserRules/Inline/wikilink$:/core/images/fold-all-button$:/core/images/fold-button$:/core/images/fold-others-button$:/core/images/spiral$:/core/images/unfold-all-button$:/core/images/unfold-button$:/core/macros/thumbnails$:/core/modules/filters/recent.js$:/core/modules/filters/wikiparserrules.js$:/core/modules/parsers/videoparser.js$:/core/modules/story.js$:/core/modules/wiki-bulkops.js$:/core/templates/canonical-uri-external-t...n$:/language/ControlPanel/Parsing/Caption$:/language/ControlPanel/Parsing/Hint$:/language/ControlPanel/Parsing/Inline/Caption$:/language/ControlPanel/Parsing/Pragma/Caption$:/language/ControlPanel/Plugins/Install$:/language/ControlPanel/Plugins/OpenPluginLibrary$:/language/ControlPanel/Plugins/Reinstall$:/language/ControlPanel/Settings/CamelCase/Caption$:/language/ControlPanel/Settings/CamelCase/Description$:/language/ControlPanel/Settings/CamelCase/Hint$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption$:/language/ControlPanel/Settings/PerformanceInstrumentation/Description$:/language/ControlPanel/Settings/PerformanceInstrumentation/Hint$:/language/Import/Imported$:/language/InternalJavaScriptError/Hint$:/language/InternalJavaScriptError/Title$:/language/LazyLoadingWarning$:/language/OfficialPluginLibrary/Hint$:/language/Search/Matches/All$:/language/Search/Matches/Title$:/language/Search/Search$:/language/Tiddler/DateFormat
>
>
> Listed but not 
> output$:/core/macros/thumbails$:/plugins/felixhayashi/hotzone/config.js$:/plugins/felixhayashi/hotzone/hotzone.js$:/plugins/felixhayashi/hotzone/Configuration$:/plugins/felixhayashi/hotzone/License$:/plugins/felixhayashi/hotzone/Readme$:/plugins/felixhayashi/tiddlymap/layout$:/plugins/felixhayashi/tiddlymap/js/Adapter$:/plugins/felixhayashi/tiddlymap/js/CallbackManager$:/plugins/felixhayashi/tiddlymap/js/DialogManager$:/plugins/felixhayashi/tiddlymap/js/exception$:/plugins/felixhayashi/tiddlymap/js/fixer$:/plugins/felixhayashi/tiddlymap/js/EdgeType$:/plugins/felixhayashi/tiddlymap/js/MapElementType$:/plugins/felixhayashi/tiddlymap/js/NodeType$:/plugins/felixhayashi/tiddlymap/js/config/sys$:/plugins/felixhayashi/tiddlymap/js/utils$:/plugins/felixhayashi/tiddlymap/js/ViewAbstraction$:/plugins/felixhayashi/tiddlymap/js/config/vis$:/plugins/felixhayashi/tiddlymap/js/tmap$:/plugins/felixhayashi/tiddlymap/js/caretaker$:/plugins/felixhayashi/tiddlymap/js/s...keymap/vim.js$:/plugins/tiddlywiki/codemirror/keymap/sublime.js$:/plugins/tiddlywiki/codemirror/keymap/emacs.js$:/plugins/tiddlywiki/codemirror/readme$:/plugins/tiddlywiki/codemirror/styles$:/plugins/tiddlywiki/codemirror/usage$:/themes/tiddlywiki/snowwhite/base$:/themes/tiddlywiki/vanilla/themetweaks$:/themes/tiddlywiki/vanilla/base$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize$:/themes/tiddlywiki/vanilla/metrics/bodylineheight$:/themes/tiddlywiki/vanilla/metrics/fontsize$:/themes/tiddlywiki/vanilla/metrics/lineheight$

[twdev] Re: [TW5] registering plugin in environment variable

2015-11-16 Thread BJ
I think the idea was that your repo should have the same tree structure as 
the tiddlywiki repo, so you would have in you github your files in 
plugins/tobibeer/dict, then you would checkout this out into a dir like
c:/mytw
and set the path TIDDLYWIKI_PLUGIN_PATH to c:/mytw/plugins and


"plugins": [
"tiddlywiki/tiddlyweb",
"tiddlywiki/filesystem",
"tiddlywiki/highlight",
"tobibeer/dict"
],

On Monday, November 16, 2015 at 8:27:26 AM UTC, Tobias Beer wrote:
>
> Do I have some misconception on how those environment variables are to 
> function?
>
> Best wishes,
>
> — tb
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/c80ce7a8-0fd9-40d3-b94e-ed116bed840b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] registering plugin in environment variable

2015-11-16 Thread BJ
moving your code to /tobibeer,

setting TIDDLYWIKI_PLUGIN_PATH=/tobibeer/tw5-dict/plugins/
and


"plugins": [
"tiddlywiki/tiddlyweb",
"tiddlywiki/filesystem",
"tiddlywiki/highlight",
"dict"
],

works.

The actual name of your plugin is determined by the string you have put in 
the plugin.info file.


On Sunday, November 15, 2015 at 7:37:36 AM UTC, Tobias Beer wrote:
>
> After having created my actual first plugin...
>
> docs: http://tobibeer.github.io/tw5-dict
> repo: https://github.com/tobibeer/tw5-dict
>
> ...I want to use it in another repo / wiki folder, namely *tb5*.
>
> For this, I assumed I can set an environment variable in my OS for the 
> tiddlywiki CLI to pick it up:
>
> Environment Variables on Node.js 
> 
>
> I tried all of the below variants to add the local path to such an 
> environment variable
> but none would include the plugin via *tiddlywiki --server*
> in the target wiki where I listed it in the plugins section in 
> *tiddlywiki.info 
> * as *tobibeer/dict*
>
>1. TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict
>2. TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict\
>3. TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict\plugins
>4. TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict\plugins\
>5. *TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict\plugins\dict* (being the 
>one I expected)
>6. TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict\plugins\dict\
>
>
> 
>
> Now, just running what I thought of as an equivalent
> for the example given on tiddlywiki.com 
>  in my 
> console throws an error:
>
> TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\plugins\dict
> tiddlywiki --server
>
> *Der Befehl "TIDDLYWIKI_PLUGIN_PATH" ist entweder falsch geschrieben oder*
>
> *konnte nicht gefunden werden.*
> *Meaning:*
>
> *The command "TIDDLYWIKI_PLUGIN_PATH" is either misspelled or could not be 
> found.*
>
> So, I found out the command to set an environment variable in a windows 
> console is actually called, well, *set*.
>
> Then I tried all of these directly in the console...
>
>1. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict
>2. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\
>3. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\plugins
>4. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\plugins\
>5. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\plugins\dict
>6. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\plugins\dict\
>
> followed by...
>
> tiddlywiki --server
>
> None of which ever included the plugin in the target wiki.
>
> Here's my *tiddlywiki.info *:
>
> {
> "description": "tb5",
> "plugins": [
> "tiddlywiki/tiddlyweb",
> "tiddlywiki/filesystem",
> "tiddlywiki/highlight",
> "tobibeer/dict"
> ],
> "themes": [
> "tiddlywiki/vanilla",
> "tiddlywiki/snowwhite"
> ],
> "build": {
> "index": [
> "--output","C:/GIT/tobibeer.github.io/tb5/",
> "--rendertiddler",
> "$:/plugins/tiddlywiki/tiddlyweb/save/offline","index.html","text/plain",
> "--rendertiddler","feed.atom","feed.atom","text/plain"
> ]
> }
> }
>
> Not sure if this has anything to do with it, but my plugin repo has the 
> plugin under:
>
> C:\GIT\tw5-dict\plugins\dict
>
> not:
>
> C:\GIT\tw5-dict\plugins\tobibeer\dict
>
> because otherwise the console would throw an error for not finding a 
> *plugin.info 
> * at
>
> C:\GIT\tw5-dict\plugins\tobibeer
>
> ...when trying to serve or build at the tw5-dict repo, which makes little 
> sense to me, tbh.
>
> Now, what am I doing wrong?
>
> Best wishes,
>
> — tb
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/5d486d82-4997-4fee-8128-777c92a9b031%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] registering plugin in environment variable

2015-11-15 Thread BJ
Hi Tobias,
I do not use the TIDDLYWIKI_PLUGIN_PATH  - I prefer to checkout my git 
plugins directly into the tiddlywiki plugin directory. 
I created a directory  tobibeer under plugins and cloned your plugin, which 
put it in plugins/tobibeer/tw5-dict I then added it to my tiddlywiki.info as

"plugins": [
"tiddlywiki/tiddlyweb",
"tiddlywiki/filesystem",
"tiddlywiki/highlight",
"tobibeer/tw5-dict/plugins/dict"
],

and your plugin was added to my tiddlywiki as expected,

all the best BJ


On Sunday, November 15, 2015 at 7:37:36 AM UTC, Tobias Beer wrote:
>
> After having created my actual first plugin...
>
> docs: http://tobibeer.github.io/tw5-dict
> repo: https://github.com/tobibeer/tw5-dict
>
> ...I want to use it in another repo / wiki folder, namely *tb5*.
>
> For this, I assumed I can set an environment variable in my OS for the 
> tiddlywiki CLI to pick it up:
>
> Environment Variables on Node.js 
> <http://tiddlywiki.com/#Environment%20Variables%20on%20Node.js>
>
> I tried all of the below variants to add the local path to such an 
> environment variable
> but none would include the plugin via *tiddlywiki --server*
> in the target wiki where I listed it in the plugins section in 
> *tiddlywiki.info 
> <http://tiddlywiki.info>* as *tobibeer/dict*
>
>1. TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict
>2. TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict\
>3. TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict\plugins
>4. TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict\plugins\
>5. *TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict\plugins\dict* (being the 
>one I expected)
>6. TIDDLYWIKI_PLUGIN_PATH: C:\GIT\tw5-dict\plugins\dict\
>
>
> <https://lh3.googleusercontent.com/-Z4rQYMrqxmo/VkgxPZLhyNI/B7A/9UfIhLklTtU/s1600/env.jpg>
>
> Now, just running what I thought of as an equivalent
> for the example given on tiddlywiki.com 
> <http://tiddlywiki.com/#Environment%20Variables%20on%20Node.js> in my 
> console throws an error:
>
> TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\plugins\dict
> tiddlywiki --server
>
> *Der Befehl "TIDDLYWIKI_PLUGIN_PATH" ist entweder falsch geschrieben oder*
>
> *konnte nicht gefunden werden.*
> *Meaning:*
>
> *The command "TIDDLYWIKI_PLUGIN_PATH" is either misspelled or could not be 
> found.*
>
> So, I found out the command to set an environment variable in a windows 
> console is actually called, well, *set*.
>
> Then I tried all of these directly in the console...
>
>1. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict
>2. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\
>3. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\plugins
>4. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\plugins\
>5. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\plugins\dict
>6. set TIDDLYWIKI_PLUGIN_PATH=C:\GIT\tw5-dict\plugins\dict\
>
> followed by...
>
> tiddlywiki --server
>
> None of which ever included the plugin in the target wiki.
>
> Here's my *tiddlywiki.info <http://tiddlywiki.info>*:
>
> {
> "description": "tb5",
> "plugins": [
> "tiddlywiki/tiddlyweb",
> "tiddlywiki/filesystem",
> "tiddlywiki/highlight",
> "tobibeer/dict"
> ],
> "themes": [
> "tiddlywiki/vanilla",
> "tiddlywiki/snowwhite"
> ],
> "build": {
> "index": [
> "--output","C:/GIT/tobibeer.github.io/tb5/",
> "--rendertiddler",
> "$:/plugins/tiddlywiki/tiddlyweb/save/offline","index.html","text/plain",
> "--rendertiddler","feed.atom","feed.atom","text/plain"
> ]
> }
> }
>
> Not sure if this has anything to do with it, but my plugin repo has the 
> plugin under:
>
> C:\GIT\tw5-dict\plugins\dict
>
> not:
>
> C:\GIT\tw5-dict\plugins\tobibeer\dict
>
> because otherwise the console would throw an error for not finding a 
> *plugin.info 
> <http://plugin.info>* at
>
> C:\GIT\tw5-dict\plugins\tobibeer
>
> ...when trying to serve or build at the tw5-dict repo, which makes little 
> sense to me, tbh.
>
> Now, what am I doing wrong?
>
> Best wishes,
>
> — tb
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/766fffc7-2005-49a7-a736-a4d2d259a3d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Is this possible: btheado/jsoneditor plugin Grid feature implementation?

2015-11-04 Thread BJ

Hi Joshua,
if the styles dont work well within tiddlywiki I would suggest putting the 
editor inside an Iframe - this is how some text editors work (ckeditor for 
instance)
cheers

BJ

On Wednesday, November 4, 2015 at 10:19:20 PM UTC, Joshua Fontany wrote:
>
> Hi everyone.
>
> I have been checking out this awesome plugin for editing JSON objects from 
> within TiddlyWiki: https://github.com/btheado/jsoneditor
>
> This is a TiddlyWiki implementation of another package, found here: 
> https://github.com/jdorn/json-editor
>
> One of the features that I'd like to use in the jdorn/json-editor package 
> is a "grid layout" feature, which can be seen here (set the "Object Layout" 
> dropdown on the left side to "grid"): http://jeremydorn.com/json-editor/
>
> This feature can also be optionally enabled on an object-by-object scope 
> by editing the json-schema for the object and including "format": "grid" in 
> the schema-object properties.
>
> This option apparently relies on the additional CSS packages that are 
> setup with the http://jeremydorn.com/json-editor/ example, such as 
> Boostrap3, or Foundation 5.
>
> The author of the @btheado said he did not include any of those CSS 
> packages in his TiddlyWiki plugin, and bad things happened when he tried to 
> import just the CSS from Bootstrap3: 
> https://github.com/btheado/jsoneditor/issues/1#issuecomment-153214059
>
> I think I found a reference as to why this happened:
>
> On Wednesday, September 18, 2013 at 9:13:10 AM UTC-7, Jeremy Ruston wrote:
>
> I did indeed use Bootstrap for an earlier version of TiddlyWiki5. I 
>>> abandoned it for several reasons:
>>>
>>
>>> * Bootstrap markup uses IDs to tie elements together, which doesn't work 
>>> in dynamic environments like TW5 where it's hard to ensure that IDs remain 
>>> unique
>>>
>> * As Mario says, the JS code in Bootstrap is useless for TW5 because it 
>>> doesn't fit into the TW rendering structure
>>>
>> * Bootstrap doesn't (or didn't when I was working with it) permit 
>>> elements like tabs to be resized
>>>
>> * Bootstrap is incredibly fussy about elements needing to be direct 
>>> descendants of one another and so doesn't tolerate TW5's additional wrapper 
>>> elements
>>>
>> * Bootstrap uses Less.css to generate CSS whereas in TW5 it makes more 
>>> sense to reuse the existing wikitext parsing pipeline
>>>
>>
>>> TW5 still uses normalise.css, which is also a part of Bootstrap. It does 
>>> a great job of smoothing out the differences between browsers
>>>
>>
>>> Best wishes
>>>
>>
>>> Jeremy
>>>
>>
> So it seems that Bootstrap won't be my solution. Would it be possible to 
> get that Grid option working in TiddlyWiki some-how?
> Custom *.js code that does the same thing as the BootStrap3 or other CSS 
> packages? 
>
> The grid option seems to work the same for a couple of different CSS 
> add-ons in the http://jeremydorn.com/json-editor/ example.
>
> This JSON editor is exactly what I need for my RPG Character Database 
> TiddlyWiki, but the UI seems cluttered for all the little stats and 
> modifiers in each "block" of the character stats when they are all rendered 
> in-line. Thanks for any insights you all can provide. :D
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/2cf4dd96-e84b-4a94-82c4-e1a168c99cef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: TW5 subscribe to save tiddler event on root widget

2015-09-05 Thread BJ

tm-save-tiddler is consumed by the navigator widget so never reaches the 
root widget. You will have to add a listener for change events, then check 
the change list to remove ones that have 'deleted'  values.

cheers

BJ
On Saturday, September 5, 2015 at 4:09:11 PM UTC+1, Danielo Rodríguez wrote:
>
> Is this even possible?
> Should I try a different approach? I am now using a subscription to change 
> event, but it si way more complicated than just using the tm-tiddler-save.
>
> Regards
>
> El viernes, 4 de septiembre de 2015, 17:42:27 (UTC+2), Danielo Rodríguez 
> escribió:
>>
>> Hello.
>>
>> I want to know if it is possible to subscribe to tiddler saves. I don't 
>> care about all kind of changes, just saves. I tried adding an event 
>> listener on the root widget to the message tm-save-tiddler, but it does not 
>> work, the handler is never called. Does the events pops up or do they stop 
>> at the first subscriber?
>>
>> Many thanks
>>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/503e8248-c125-4994-81ec-fc714df82123%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Passing parameters to JS macro

2015-07-27 Thread BJ

try 
bugNumber bugTitlePrefix bugTitleBase bugTitleSuffix

have fun!
BJ

On Monday, July 27, 2015 at 4:47:09 PM UTC+1, Henry Padilla wrote:

 Ok, time for my semi-weekly What am I doing wrong now post.


 I have the following macro

 /*\
 title: bugNumber.js
 type: application/javascript
 module-type: macro


 Macro to append Bug  to the number passed in.


 \*/
 (function(){


 /*jslint node: true, browser: true */
 /*global $tw: false */
 use strict;


 /*
 Information about this macro
 */


 exports.name = bugNumber;


 exports.params = [
{name: prefixTiddler},
{name: baseTiddler},
{name: suffixTiddler}
 ];


 /*
 Run the macro
 */
 exports.run = function(prefixTiddler, baseTiddler, suffixTiddler ) {
  var tiddlerPrefix= this.wiki.getTiddlerText(prefixTiddler);
  var tiddlerBase= this.wiki.getTiddlerText(baseTiddler);
  var tiddlerSuffix= this.wiki.getTiddlerText(suffixTiddler );


  return tiddlerPrefix +  -  + tiddlerBase +  -  + tiddlerSuffix;
 };


 })();



 And if I call it in a tiddler like so...

 bugNumber
 bugNumber bugTitlePrefix
 bugNumber bugTitlePrefix, bugTitleBase
 bugNumber bugTitlePrefix, bugTitleBase, bugTitleSuffix

 I get the following output...

 undefined - undefined - undefined
 Pre - undefined - undefined
 undefined - Bug - undefined
 undefined - undefined - 005453


 Why can't I get all three parameters to work at the same time?
 Tom P.


-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/25f1202d-b69e-44d1-9fda-71bf46444630%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Need help learning how to code TW.

2015-07-25 Thread BJ
Hi Henry,
most people seem to do macro in wikitext, personally I prefer javascript. 
The macro mechanism is complex and asymmetric, and there are no docs as you 
say. One thing to note is that a javascript macro is replaced by a 
macrocall widget which connects the macro into the widget tree. I seem to 
remember that wikitext return by the macro is render inside the macrocall 
widget (as if they were inside $macrocall/$macrocal)
cheers

BJ

On Thursday, July 23, 2015 at 1:23:22 PM UTC+1, Henry Padilla wrote:

 That is a bit of a help, but not really what I had in mind.
 I am looking for a reference. A place I can look-up TW API calls. Or how 
 to do something in a step-by-step manner.

 For example: js macros. These are not new, they've been here for years. 
 But when I try to look up how to write one the most I could find is to use 
 the core macros as starting points. This bit of advice caused me to paste 
 a core macro in an empty tiddler and wonder why my message didn't work. I 
 finally figured out (I didn't read it anywhere, I had to deduce it from the 
 evidence) that you need to make the Type = application/javascript. Why 
 should new people have to discover that? Why isn't that in the 
 documentation?

 But that's not all. I still couldn't get it to work. So I kept looking and 
 again bumped into a piece of code that allowed me to deduce that there 
 needs to be a field added (it doesn't come with the tiddlers) called 
 module-type and that needs to have a value of macro. Why isn't that 
 mentioned anywhere? What is the big secret? Is this something that is so 
 well known in the coding community there's no need to mention it?

 And even after that it was simply dumb luck that I figured out that js 
 macros are loaded once, at startup. So I need to restart my TW to get apply 
 changes.

 For something as long-standing as TW I would have thought there would be 
 more resources available. More documentation. Clearer documentation. An API 
 reference.

 Don't get me wrong: I'm not trying to bag on TW. It's a great system and I 
 am pushing through to find these things. I really do appreciate all the 
 help the group has been. And I thought there was a reference work out there 
 somewhere.

 Well, I will make it a point to make note of my experiments and submit 
 changes to the documentation that reflect what I find.

 And thanks for the link.

 Tom P.



 On Thursday, July 23, 2015 at 2:08:39 AM UTC-5, alex wrote:

 Tom,

 If you look on the other TW group there is a post by Matt. The thread [1] 
 contains some comprehensive advice on coding.

 Alex
 [1] 
 https://groups.google.com/d/msgid/tiddlywiki/4b235201-c244-4dea-b730-1c2f763ac9e2%40googlegroups.com
  
 https://groups.google.com/d/msgid/tiddlywiki/4b235201-c244-4dea-b730-1c2f763ac9e2%40googlegroups.com?utm_medium=emailutm_source=footer
 .

 On 20 July 2015 at 19:06, Henry Padilla padill...@gmail.com wrote:

 I am trying to write some JS macros or do some experimenting in TW and 
 I'm having a hard time because there is no feedback mechanism. I don't know 
 what I'm doing, I don't know what I'm doing wrong, and I don't know how to 
 tell the difference.

 I don't want to just keep coming to the forum for every little thing, 
 but I can't find an error anywhere in the system. I can't see how tiddlers 
 render themselves. I can't see how to format, code, save, or call a JS 
 macro...

 And it's not like I have not looked. I've been to the TiddlyDev, I've 
 downloaded the source, I've read macros written by others... but I have no 
 idea how to tell what I'm missing and what I'm doing wrong.

 Is there a reference to the JS? Is there a way to tell TW to give me 
 errors? Is there a walkthrough on how to do some of this stuff? And I mean 
 something better than look at the source, it's all right there because 
 I'm finding stuff that's not in the source. And I don't know if the code is 
 wrong or I'm wrong for not finding it or what the actual problem is.

 I applaud those of you that have put the effort to figure this out 
 because it's been terribly frustrating for me.

 Tom P.

 -- 
 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 tiddlywikide...@googlegroups.com.
 To post to this group, send email to tiddly...@googlegroups.com.
 Visit this group at http://groups.google.com/group/tiddlywikidev.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/tiddlywikidev/999ae1c4--4ca8-a51e-cb6da2bf8a0b%40googlegroups.com
  
 https://groups.google.com/d/msgid/tiddlywikidev/999ae1c4--4ca8-a51e-cb6da2bf8a0b%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 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

[twdev] Re: [TW5] TiddlyWiki to attach/store local file?

2015-06-19 Thread BJ
It is possible to use tiddlyclip to 'clip' references to external files.

http://tiddlyclip.tiddlyspot.com/

-BJ

On Thursday, June 18, 2015 at 7:34:03 PM UTC+1, dai...@hotmail.com wrote:

 Firstly, I want to thank those who involved in TiddlyWiki and its plugin.
 I hope someone out there will help in solving the missing feature below:- 


 *Suggested feature (TiddlyWiki)*

- To attach/store local files (such as excel files, photoshop files, 
etc) under a folder at the same level as the TiddlyWiki file. Please see 
suggestion.png for the actual logic and details
- Similar behavior found in Microsoft OneNote as shown in MS 
OneNote.png 
- Note that *I am not asking to embed* those local files inside the 
TiddlyWiki file which will have a huge performance impact)

 *Motivation*

- Research / Analysis often involves not only notes taking, but also 
capturing relevant files of any source (such as excel files, photoshop 
files, etc)
- Such files may be downloaded from internet or created by 
application/software
- These files will be forgotten after awhile, because: 
- there is no notes to describe what they are
   - they end up scattered around in different folders/directories
- For any useful notebook, the ability to keep both notes and files 
next to each other is highly beneficial



-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/b8a394c1-862b-44ff-bc5d-c8bc5d2be560%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: design of a media player

2015-04-04 Thread BJ
Added a 'staticplayer' for slideshow:

http://mediaplayer.tiddlyspot.com/#testpics

On 9 February 2015 at 23:21, BJ buggy...@gmail.com wrote:



 On Sunday, February 8, 2015 at 10:00:38 AM UTC-6, Danielo Rodríguez wrote:

 we could have a tiddler namespace ($:/__priv__/ maybe?) that would not be
 refreshed.

 Why don't just store that data at a global structure within the TW
 object? For example $TW.config.mediainfo

 thanks, that is a possiblity, however as Tobias points out tw5 uses
 tiddlers for all it structures, and in particular the state of the ui is
 stored in tiddlers, and thus, for symmetry, the state of the streaming
 media should be in a tiddler.
 Also, a tiddler prefixed $:/__priv__/ can be saved and synced thus the
 state is saved and it you need to stop watching a video at some point and
 close your tw, then when you re-open it, it would be possible to resume
 from where you stopped.




 --
 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/et0wVg-J6Gw/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 tiddlywikidev+unsubscr...@googlegroups.com.
 To post to this group, send email to tiddlywikidev@googlegroups.com.
 Visit this group at http://groups.google.com/group/tiddlywikidev.
 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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/CAJxZ06RBHEstu-8-%2Be4CsXNLj1zTunHLF6sbBP%2BTGKy3uWc-fQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Thoughts on creationf of a DataTables plugin | (also, is there a plugin browser or reference page for what already exists?)

2015-03-26 Thread BJ
HI Alec,


On Thursday, March 26, 2015 at 12:12:46 PM UTC-6, Alec Perkey wrote:

 Hi

 Has anyone made a plugin for datatables already?

 I think to make one using

 https://datatables.net/

 Specifically, a user (Stephen Kimmel) was asking in the other TiddlyWiki 
 google group for fixed headers solution, since long html tables in a 
 tiddler gets lost when the html table height exceeds the viewport.

 I realized I've worked with datatables before and they have a large 
 community who has already addressed this particular feature request
 https://datatables.net/extensions/fixedheader/


1. Thoughts about this plugin idea?

 it looks doable - the main challenge is to the dynamic nature of tw5 - the 
call

$('#myTable').DataTable();

would need to be called for each table. Maybe you could have a widget 
$DataTable ... table here.. /$DataTablethat would surround a table and 
call the function after the tables dom elements have been created. 


1. Is there a plugin package browser planned for the new plugin 
manager?

 there is the 'communtiy' tiddler on tiddlywiki.com


1. 
2. If not, what is the best reference to figure out what already 
exists? Github?


 You can search github with tw5 
To make a new plugin I copy one of my existing ones like 
https://github.com/buggyj/TW5-visualeditor, and change the strings pointing 
to the plugin's dir (eg bj/visualeditor) and change them to bj/mynewplugin

cheers

BJ

 Thanks! :) 



-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] Action widgets vs. Messages

2015-03-07 Thread BJ
HI Pat,
when you are writing a widget which response to some event, it is possible 
to cause other events. Action events (at present) are children - so the 
control passes in the direction away from the root of the widget tree, 
conversely messages travel in the other direction, toward the root, and are 
caught by a widget that is listening for that type of message. I talk a 
little about it here:
https://groups.google.com/forum/#!searchin/tiddlywikidev/design/tiddlywikidev/et0wVg-J6Gw/TjAdeVUhyGMJ

cheers
BJ

On Saturday, March 7, 2015 at 12:21:01 PM UTC-6, PE Pat wrote:

 Hi all,

 As I learn more about TW, I am coming into more contact with its core 
 structure, but I still don't really understand it. What is the difference 
 between action widgets and messages, in terms of how they are handled and 
 how they can be used?

 My usecase: a unit planner app, which is essentially a program that 
 manages a bunch of different lists. Currently, I have action widgets called 
 $append and $remove which add or remove a tiddler/tiddlers to lists in 
 other tiddlers, but I am starting to think that those might be more 
 appropriately implemented as messages.

 Here's why: I see that I can dispatch a message within the Javascript code 
 of a widget, but I don't know if I can call a widget from inside another 
 widget (or if that even makes sense in TW). So I guess my specific question 
 is: does it make more sense to define common list operations as messages so 
 that they can be dispatched as necessary in other, more complicated widgets?

 Thanks,
 Pat


-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] This time rendering wikitext inside a tiddler using a widget.

2015-02-27 Thread BJ

To add to what Astrid said,
you need to call the tw5 parser instead using innerHTML. I think it should 
be:

parser = 
this.wiki.parseText(text/vnd.tiddlywiki,calendarString,{parseAsInline: 
false});
parseTreeNodes = parser ? parser.tree : [];
this.makeChildWidgets(parseTreeNodes);

cheers

BJ

On Thursday, February 26, 2015 at 1:28:46 AM UTC-6, Jed Carty wrote:

 I made a simple calendar widget that given a year and a month will build a 
 calendar for that month with the correct layout. What I would like to do is 
 to be able to give the widget a macro that it will run inside each day on 
 the calendar to list things for that day or whatever you want it to do. The 
 problem Is that I can't figure out how to get the macro to actually get 
 wikified. The html part that builds the calendar works fine, I just can't 
 do anything with it.

 Here is what it currently does 
 http://inmysocks.tiddlyspot.com/#Calendar%20widget%20example, I am 
 hoping that I am just missing a step and fixing it will be simple.

 Any suggestions?


-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: [TW5] This time rendering wikitext inside a tiddler using a widget.

2015-02-27 Thread BJ
nice!

On 27 February 2015 at 19:55, Jed Carty inmyso...@gmail.com wrote:

 Thanks! That is exactly what I needed. The result is here
 http://inmysocks.tiddlyspot.com/#Calendar%20Plugin

 --
 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/QjJ0YkkJPkE/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 tiddlywikidev+unsubscr...@googlegroups.com.
 To post to this group, send email to tiddlywikidev@googlegroups.com.
 Visit this group at http://groups.google.com/group/tiddlywikidev.
 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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: What part of TW can I use as a library for tiddlers?

2015-02-13 Thread BJ
Hi Danielo,
your question a bit vague, what type of manipulation do you want?
The basic manipulations are in the boot, t

On Friday, February 13, 2015 at 2:41:05 AM UTC-6, Danielo Rodríguez wrote:

 Hello everyone,

 I want to expand the TiddlyWiki universe. In order to do this I need to be 
 able to manipulate tiddlers from third party software (my software in this 
 case). I can build myself some functions to do so, but since TW is modular 
 and most of my projects are javascript based, I would like to use a part of 
 TW core instead. Which .js file can I use for this purpose? Just for 
 creating new tiddlers and manipulating them? This includes serializing and 
 that kind of things. I think that wiki.js is the right choice, but I think 
 it has too many functions for me.

 There are plans to release some kind of TW library for manipulate 
 tiddlers ?

 Thanks in advance.


-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: design of a media player

2015-02-09 Thread BJ


On Sunday, February 8, 2015 at 10:00:38 AM UTC-6, Danielo Rodríguez wrote:

 we could have a tiddler namespace ($:/__priv__/ maybe?) that would not be 
 refreshed. 

 Why don't just store that data at a global structure within the TW object? 
 For example $TW.config.mediainfo

thanks, that is a possiblity, however as Tobias points out tw5 uses 
tiddlers for all it structures, and in particular the state of the ui is 
stored in tiddlers, and thus, for symmetry, the state of the streaming 
media should be in a tiddler.
Also, a tiddler prefixed $:/__priv__/ can be saved and synced thus the 
state is saved and it you need to stop watching a video at some point and 
close your tw, then when you re-open it, it would be possible to resume 
from where you stopped.


 

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] Extending codemirror Plugin

2015-02-03 Thread BJ
thanks,
good to know some else found a use for it!


On Wednesday, January 28, 2015 at 1:40:22 AM UTC-6, Danielo Rodríguez wrote:

 Thank you BJ after a couple of months your scripts became useful. I found 
 my own thread searching for solution for a new problem :P

 El viernes, 25 de abril de 2014, 22:40:56 (UTC+2), BJ escribió:


 You just go to the build dir and type 
 ./mktwfiles

 I have only tried this with linux, but I expect it to work with linux 
 like shells on other systems.

 My plugin sources files are structured like so:

 visualeditor/build
 /files
 'files' contains all the files that I need to include into the plugin
 'build' contains the shell scripts to make the 'tiddlywiki.files'
 There are two script files: 
 twfileshelper.sh contains the prototype of the entries within the 
 'tiddlywiki.files'
 mktwfiles.sh gathers all path/filenames of all the files inside the 
 '/files' directory 
 then passes them thru the twfileshelper then put the results into 
 tiddlywiki.files

 You would need to changes the entries that refer to my plugin with in 
 twfileshelp.sh
 simply change the line title: $:/plugins/bj/visualeditors to you 
 plugin location.

 within mktfiles the first two word  find ../files point to the location 
 of files relative
 to the build directory which you may need to change to reflect your 
 plugins directory structure.

 On Friday, April 25, 2014 3:04:50 AM UTC+1, Danielo Rodríguez wrote:

 Hello BJ,

 Do you have any explanation of how to use it?
 Thanks for your share.

 El jueves, 24 de abril de 2014 20:22:49 UTC+2, BJ escribió:


 HI Danielo,
 for my visualeditor plugin I wrote a shell script to automatically 
 create the tiddlywiki.files as there were lot (more than a hundred) files 
 to load for the extension. May be it will be some use to you:
 https://github.com/buggyj/TW5-visualeditor/tree/master/build the files 
 are mktwfiles.sh and twfileshelper.sh.

 cheers

 BJ
 On Wednesday, April 23, 2014 8:52:59 PM UTC+1, Danielo Rodríguez wrote: 
 https://github.com/buggyj/TW5-visualeditor/blob/master/build/twfileshelper.sh

 Hello,

 I'm adding codemirror modes , themes and addons. 
 But this is a very hard work since I have to create lots of tiddlers 
 and add them the corresponding fields and tags.  Is there any way to do 
 this process more easy?

 In other order of things I would like to discuss the better way to 
 make the plugin easily configurable.
 I would like to let users change dynamically the mode and the theme. 
 Currently I have an approach that is working, but I load all the modules 
 despite they are needed by the current mode or not. I don't know if this 
 cause poor performance. I want to define a set of basic configurations 
 also 
 that should be loaded if nothing is defined.

 I'm making good progress with it but I need a bit of help here.

 Thanks in advance.
 Here is the current codemirror config, a MONSTER

 {
   require: [
   $:/plugins/tiddlywiki/codemirror/addon/dialog.js,
   $:/plugins/tiddlywiki/codemirror/addon/searchcursor.js,
   $:/plugins/tiddlywiki/codemirror/keymap/vim.js,
   $:/plugins/tiddlywiki/codemirror/keymap/emacs.js,
   $:/plugins/tiddlywiki/codemirror/mode/vbscript.js,
   $:/plugins/tiddlywiki/codemirror/mode/javascript.js,
   $:/plugins/tiddlywiki/codemirror/mode/css.js,
   $:/plugins/tiddlywiki/codemirror/mode/php.js,
   $:/plugins/tiddlywiki/codemirror/mode/htmlmixed.js,
   $:/plugins/tiddlywiki/codemirror/mode/htmlembedded.js,
   $:/plugins/tiddlywiki/codemirror/addon/edit/closebrackets.js,
   $:/plugins/tiddlywiki/codemirror/addon/edit/closetag.js,
   $:/plugins/tiddlywiki/codemirror/addon/fold/comment-fold.js,
 $:/plugins/tiddlywiki/codemirror/addon/fold/xml-fold.js,
 $:/plugins/tiddlywiki/codemirror/addon/fold/brace-fold.js,
 $:/plugins/tiddlywiki/codemirror/addon/fold/foldgutter.js,
 $:/plugins/tiddlywiki/codemirror/addon/fold/foldcode.js,
   $:/plugins/tiddlywiki/codemirror/keymap/extra.js,
   $:/plugins/tiddlywiki/codemirror/addon/edit/matchbrackets.js
   ],
   configuration: {
   theme: erlang-dark,
   mode:javascript,
   showCursorWhenSelecting: true,
   indentUnit:4,
   lineWrapping:false,
   autoCloseBrackets : true,
autoCloseTags : true,
   foldGutter: true,
   matchBrackets:true,
   gutters: [CodeMirror-linenumbers, CodeMirror-foldgutter]
   }
 }



-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   >