[twdev] Re: Where is the source code that implements the "tm-new-tiddler" message?

2019-01-13 Thread FrD
Hi Tony,

If I read the code right, paramObject is expected to be a javascript object 
(once evaluated).
So I guess you could use a JSON string representing a javascript object 
when you invoke the tm-new-tiddler message.

Regards

FrD

Le dimanche 13 janvier 2019 05:23:15 UTC+1, TonyM a écrit :
>
> Joe,
>
> I asked before because the term or format of "hashmap" has not being 
> defined outside of implied javascript. 
>
> So if you can define "
> paramObject Optional hashmap of additional tiddler fields
> Please share.
>
> Tony
>
> On Sunday, January 13, 2019 at 3:43:48 AM UTC+11, joearms wrote:
>>
>> Thanks
>>
>> /Joe
>>
>> On Saturday, 12 January 2019 15:02:59 UTC+1, FrD wrote:
>>>
>>> Hi,
>>>
>>> Type "new-tiddler" in the search area in the sidebar.
>>> Then click on advanced search, the on Shadows.
>>> And then open the only ".js" tiddler : $:/
>>> core/modules/widgets/navigator.js
>>>
>>> Regards
>>>
>>> FrD
>>>
>>> Le samedi 12 janvier 2019 10:40:47 UTC+1, joearms a écrit :
>>>>
>>>>
>>>>
>>>> I want to find the source code that implements the "tm-new-tiddler" 
>>>> message?
>>>>
>>>> Why do I want it?
>>>>
>>>> I've been looking at the documentation for
>>>> tm_new_tiddler at 
>>>> https://tiddlywiki.com/#WidgetMessage%3A%20tm-new-tiddler
>>>>
>>>> Having read this I could not understand what the paramObject was so I 
>>>> experimented a bit and tried this:
>>>>
>>>> <$button>
>>>> <$action-sendmessage $message="tm-new-tiddler" title="Comment" 
>>>> tags="comment" text=<>
>>>> parent = {{!!title}}
>>>> foo = "this"
>>>> bar = "that"
>>>> paramObject = " 'abc':'two' "
>>>> />
>>>> New Comment
>>>> 
>>>>
>>>> When I click this a new tiddler is created with fields 
>>>> parent,paramObject,foo and bar
>>>>
>>>> Very strange - the documentation make no mention of that I can add 
>>>> arbitrary additional fields to the command and I still haven't a clue what 
>>>> paramObject is
>>>>
>>>> So I thought to myself "if all else fails read the code" - trouble is I 
>>>> can't find it.
>>>>
>>>>
>>>> Cheers
>>>>
>>>> /Joe
>>>>
>>>>
>>>>  
>>>>
>>>

-- 
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/fc26f366-c11c-4b6f-bbb2-65ff435d4eee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Where is the source code that implements the "tm-new-tiddler" message?

2019-01-12 Thread FrD
Hi,

Type "new-tiddler" in the search area in the sidebar.
Then click on advanced search, the on Shadows.
And then open the only ".js" tiddler : $:/core/modules/widgets/navigator.js

Regards

FrD

Le samedi 12 janvier 2019 10:40:47 UTC+1, joearms a écrit :
>
>
>
> I want to find the source code that implements the "tm-new-tiddler" 
> message?
>
> Why do I want it?
>
> I've been looking at the documentation for
> tm_new_tiddler at 
> https://tiddlywiki.com/#WidgetMessage%3A%20tm-new-tiddler
>
> Having read this I could not understand what the paramObject was so I 
> experimented a bit and tried this:
>
> <$button>
> <$action-sendmessage $message="tm-new-tiddler" title="Comment" 
> tags="comment" text=<>
> parent = {{!!title}}
> foo = "this"
> bar = "that"
> paramObject = " 'abc':'two' "
> />
> New Comment
> 
>
> When I click this a new tiddler is created with fields 
> parent,paramObject,foo and bar
>
> Very strange - the documentation make no mention of that I can add 
> arbitrary additional fields to the command and I still haven't a clue what 
> paramObject is
>
> So I thought to myself "if all else fails read the code" - trouble is I 
> can't find it.
>
>
> Cheers
>
> /Joe
>
>
>  
>

-- 
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/30acfb8b-934e-4c16-babd-f3be412755fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Theme switching

2018-12-20 Thread FrD
Hi Jeremy,

Thanks for your quick answer. I see now that the call to 
unpackPluginTiddlers does the job !

// Unpack the current theme tiddlers
$tw.wiki.unpackPluginTiddlers();

My mistake was to believe it was "unpacking" only the new theme tiddlers. 
But I can see it re-builds the cache of shadow tiddlers from all "active" 
plugins.

Thanks and regards

FrD


Le jeudi 20 décembre 2018 12:40:18 UTC+1, Jeremy Ruston a écrit :
>
> Hi FrD
>
>
>
> On 20 Dec 2018, at 11:33, FrD > wrote:
>
> Hi,
>
> I'm trying to figure out how theme switching works.
> I've found$:/core/modules/pluginswitcher.js  and where the theme manager 
> is started ($:/core/modules/startup.js).
>
> What I can't find is how the tiddlers related to the "previous" theme are 
> deleted (?) or removed (?) from the store.
> I can see that they are "unregistered" and then I loose their trail …
>
>
> You’ve found the right place: there are two instances of the plugin 
> switcher, one for themes and one for languages.
>
> At a high level, each time a plugin is switched in or out (e.g. as the 
> result of the theme or language being changed), the system rebuilds the 
> cache of shadow tiddlers by re-reading the tiddlers from each of the active 
> plugins. So, when we switch from one theme to another the shadow tiddlers 
> from the old theme are not included in the new cache of shadow tiddlers.
>
> Best wishes
>
> Jeremy.
>
>
> If somebody could fill the blanks ...
>
> Thanks
>
> Regards
>
> FrD
>
>
>
> -- 
> 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/b0181f2c-77a8-492d-b8d3-c88eebc4d7b3%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywikidev/b0181f2c-77a8-492d-b8d3-c88eebc4d7b3%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/65630c32-2275-477f-b949-822c3ce097d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Theme switching

2018-12-20 Thread FrD
Hi,

I'm trying to figure out how theme switching works.
I've found$:/core/modules/pluginswitcher.js  and where the theme manager is 
started ($:/core/modules/startup.js).

What I can't find is how the tiddlers related to the "previous" theme are 
deleted (?) or removed (?) from the store.
I can see that they are "unregistered" and then I loose their trail ...

If somebody could fill the blanks ...

Thanks

Regards

FrD


-- 
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/b0181f2c-77a8-492d-b8d3-c88eebc4d7b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: require("...") in a js macro ?

2018-07-21 Thread FrD
Hi PMario,

Most of the time I prefer to define a function this way (in particular for 
a library) :

var myUtilFunction = function(a,b,c, ..) {
}

Regards

FrD

Le samedi 21 juillet 2018 10:46:14 UTC+2, PMario a écrit :
>
> On Friday, July 20, 2018 at 10:32:07 PM UTC+2, FrD wrote:
>>
>>
>> So I've put this part in a function (say : myUtilFunction) in another 
>> tiddler (say : Utils.js, application/javascript, and module-type : 
>> library). At the end : exports.myUtilFunction = myUtilFunction;
>>
>
> Did you define myUtliFunctin like this? 
>
> function myUtilFunction(a, b, c, ..) {
> }
>
> -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/5b3ded8a-e134-4083-bf15-b13a72278de9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: require("...") in a js macro ?

2018-07-21 Thread FrD
Hi,

Sorry, I found a typo in my Utils.js tiddler : I wrote export. ... instead 
of export*s*. ...
My bad.

Everything's fine now.

Regards

FrD

Le vendredi 20 juillet 2018 22:32:07 UTC+2, FrD a écrit :
>
> Hi,
>
> I've written two js macros, and part of the code is the same.
>
> So I've put this part in a function (say : myUtilFunction) in another 
> tiddler (say : Utils.js, application/javascript, and module-type : 
> library). At the end : exports.myUtilFunction = myUtilFunction;
>
> Now I'm trying to make this function available int the two macros.
> So in the twos macros, before "exports.name = ...", I have :
>
> var myUtilFunction = require("Utils.js").myUtilFunction;
>
> It doesn't work, the error message reads : myUtilFunction is not a 
> function.
>
> I've already used this way in writing a widget and it worked. Is there a 
> pb with macros ?
>
>
> Any help welcome !
>
> Regards
>
> FrD
>
>

-- 
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/be6094c7-d4f9-48fc-9cc2-5278e0f4d637%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] require("...") in a js macro ?

2018-07-20 Thread FrD
Hi,

I've written two js macros, and part of the code is the same.

So I've put this part in a function (say : myUtilFunction) in another 
tiddler (say : Utils.js, application/javascript, and module-type : 
library). At the end : exports.myUtilFunction = myUtilFunction;

Now I'm trying to make this function available int the two macros.
So in the twos macros, before "exports.name = ...", I have :

var myUtilFunction = require("Utils.js").myUtilFunction;

It doesn't work, the error message reads : myUtilFunction is not a function.

I've already used this way in writing a widget and it worked. Is there a pb 
with macros ?


Any help welcome !

Regards

FrD

-- 
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/fe1aebef-b483-4be7-96fe-b6b5fd672944%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] TiddlyWiki5 on Android?

2013-08-02 Thread FrD
Yes, indeed. The download/save icon works fine.

It's nice because the last time I tried it downloaded the file instead of 
overwriting it.
But can't remember my config at that time.

Thanks

FrD

-- 
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/groups/opt_out.




Re: [twdev] TiddlyWiki5 on Android?

2013-07-30 Thread FrD
Hi Leo,

I'm on an android tablet (JB 4.2.1 on an Asus tf300t)
I've downloaded an empty TW5.
Firefox works fine and I can even save changes with tiddlyfox installed.

In order to acces the save changes button you have to open $:/ControlPanel 
tiddler.
To open this tiddler, just click on the wheel icone between + and the 
download icon.

I confirm that it seems slower than on my laptop and slower than TW2 too.

FrD

-- 
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/groups/opt_out.




[twdev] More than one dateChooser in a triddler

2009-01-25 Thread FrD


Hi all,
I'm quite new to TW and I'm trying to use the dateChooser macro I
found in MonkeyGTD (thanks to S. Baird  and Saq Imtiaz for the
DatePicker library !).
It works well and I've modified it to use data fields in order to use
the DataTiddlerPlugin.
So I can easily choose a date and put that date in  structured data
(mydate for instance) which is passed as a pareameter to the
dateChooser macro (dateChooser data:mydate)
But I cannot use this macro twice in a tiddler.
I think this is because the callback function that sets the data field
is bound to the DatePicker object and not to the input element.
Can anybody help modifying this ?
I'd like to use the macro for a start date and and end date in a samer
tiddler.

Thanks in advance.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TiddlyWikiDev group.
To post to this group, send email to TiddlyWikiDev@googlegroups.com
To unsubscribe from this group, send email to 
tiddlywikidev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/TiddlyWikiDev?hl=en
-~--~~~~--~~--~--~---