[twdev] Re: Programmatic generation of macros

2018-11-22 Thread TonyM
Bimlas,

Thanks for the suggestions.

It seems to me the process to generate some macros may be an active process 
but the result needs to be a static tiddler, tagged for macros. Though I 
will keep looking for a hack. 

I interested in perhaps using the discovery of fields to generate macros by 
the same name, perhaps even build such a macro as the result of a wizard, 
eg define qualities of the field and capture it in macros for the fields 
later use.

Just experimenting

Tony


On Wednesday, November 21, 2018 at 6:26:00 AM UTC+11, bimlas wrote:
>
> Just played with nested macro definitions: 
> https://bimlas.gitlab.io/demo/tw5/nested-macro-definition.html
>
> If I could use variables in transclusion, I could modify 
> https://bimlas.gitlab.io/demo/tw5/generate-macros-by-tags.html 
> 
>  to 
> let it work, but the macro is exists only "inside" wikify widget, you 
> cannot acces it from outside.
>

-- 
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/a6a18167-71ef-46b8-8369-92cac4f565dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Programmatic generation of macros

2018-11-20 Thread bimlas
Just played with nested macro 
definitions: https://bimlas.gitlab.io/demo/tw5/nested-macro-definition.html

If I could use variables in transclusion, I could modify 
https://bimlas.gitlab.io/demo/tw5/generate-macros-by-tags.html 

 to 
let it work, but the macro is exists only "inside" wikify widget, you 
cannot acces it from outside.

-- 
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/2ba43cde-9356-4a38-90e4-a9ff36799da0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Programmatic generation of macros

2018-11-20 Thread bimlas
It's not an answer, but maybe helps: 
https://tobibeer.github.io/tb5/#Ad-Hoc%20Macro

-- 
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/d2b28575-5610-45b3-a7de-5c1eb7b69eba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Programmatic generation of macros

2018-11-19 Thread TonyM
Bump,

No answer, so just started some further experimentation.

Its quite easy to build the text that would form a set of macro 
definitions. A single button could write this to a tiddler with the tag 
$:/tags/Macro

\define append-text(tiddlername totiddlername)
<$list filter="[[$tiddlername$]get[text]]" variable=line>
  \define :<>() {{<>}}

\end
<>


Notice how I am considering creating macros with a leading: semi-colon.

Any other ideas?

Regards
Tony


On Friday, October 12, 2018 at 12:44:22 PM UTC+11, TonyM wrote:
>
> Folks,
>
> In a related endeavour to my post also today is there any method by which 
> I can Programmatically generate of macros?
>
> For example if a had a set of tiddlers prefixed $:/macrotranscludes/
>
> eg {{$:/macrotranscludes/action-no}} containing something to do when 
> "action-no" etc..
>
> could I in some way "Dynamically" list and define the tiddlers such that 
> the following macro's were generated and active?
>
> \define action-no() {{$:/macrotranscludes/action-no}}
> \define tiddler2() {{$:/macrotranscludes/tiddler2}}
> \define tiddler3() {{$:/macrotranscludes/tiddler3}}
>
> 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/cb0a8a07-9922-4750-9839-2a65d8b51756%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.