[tw] Re: [TW5] How to create a button that replaces a field value based on the current field value?

2015-10-04 Thread BJ
Hi Antaneus, you ca this.getVariable(" On Saturday, October 3, 2015 at 10:53:12 PM UTC+1, Antaeus Feldspar wrote: > > Tobias, Mark, thank you for your suggestions... The use of SetWidgets to > set variables is something I didn't understand before, and I can tell I'll > eventually be able to

[tw] Re: [TW5] How to create a button that replaces a field value based on the current field value?

2015-10-03 Thread 'Mark S.' via TiddlyWiki
Hello, What I've found so far is: 1) Macros and widgets may look something like javascript functions and variables, but they often behave differently 2) You can't use a widget's output inside a widget 3) You can use a macro inside a widget IF it doesn't have a parameter 4) Therefore, you will

[tw] Re: [TW5] How to create a button that replaces a field value based on the current field value?

2015-10-03 Thread Tobias Beer
Hi Antaeus, One (perhaps) clumsy way to go about it would be to not try and pass a ("text") *parameter* to your inner macro, but rather set a *variable* outside of all that via the SetWidget, so you could then do... <$set name="js-macro-link-text" value={{!!test}}> <$button set=!!test

[tw] Re: [TW5] How to create a button that replaces a field value based on the current field value?

2015-10-03 Thread Tobias Beer
Hi > 4) Therefore, you will most often need to use <$set ...> to set a variable > to be used by a macro that gets fed to your widget > Not much of a fan of this part either... Best wishes, — tb -- You received this message because you are subscribed to the Google Groups "TiddlyWiki"

[tw] Re: [TW5] How to create a button that replaces a field value based on the current field value?

2015-10-03 Thread Antaeus Feldspar
By the way, if macros with parameters don't work as widget attributes... does that mean that the last example shown for the MacroCall Widget doesn't actually work? >From http://tiddlywiki.com/#MacroCallWidget : <$macrocall $name="italicise" text=<>/> Does this not work, and it got included

[tw] Re: [TW5] How to create a button that replaces a field value based on the current field value?

2015-10-03 Thread 'Mark S.' via TiddlyWiki
Apparently you can use static text. But this is of limited value IMO. What you want is something more like <> . I just know whenever I've tried making a bit of simple widget code work with some macros, I usually end up needing to use <$set>. Mark On Saturday, October 3, 2015 at 3:23:44 PM

[tw] Re: [TW5] How to create a button that replaces a field value based on the current field value?

2015-10-03 Thread Antaeus Feldspar
Tobias, Mark, thank you for your suggestions... The use of SetWidgets to set variables is something I didn't understand before, and I can tell I'll eventually be able to use it to achieve a much cleaner solution. Right now, though, I still have a problem that's completely blocking me: how do