Re: [tw5] Re: Daily Task Macro - buttons no longer change color in 5.2.0-prerelease

2021-08-15 Thread PMario
On Sunday, August 15, 2021 at 10:13:33 PM UTC+2 cmari wrote:

> Hello all,  
> Thanks!! Thanks to Mario for a way to wrap the macro that works perfectly. 
>

It was Jeremy's comment, that made me play with the possibilities. ... 

One further question that would help my understanding of things: is the 
> wrapping enough to restore this macro to acceptability?


IMO it should do the trick. .. It basically adds the refresh mechanism that 
should "inside" the macro code, onto the outside. ... The $vars widget (as 
every other widget) implements a "watchdog" that "listens" to changes that 
happen to parameters that are passed to the widget. 

In case of the workaround <$vars x={{!!toggled}} y={{!!barray}}> it's the 
{{!!field-names}} that are important. The variable names don't matter, 
since we don't really need them. Whenever the fields change, the vars 
widget will redraw itself and it's childs. Since the <> and 
<> macro are part of the widget body they get refreshed, in the 
exact same way as the <$transclude macro did it in the past. 
 

> Or is there really some deeper fundamental problem being described by 
> "broken", "off-spec", and "improper" that means I should think of the 
> wrapping as only a temporary bandage? 
> cmari
>

I think this workaround is perfectly valid. ... It still should be fixed on 
the js-code level. ... BUT upgrading to v5.2.0 isn't "killing" the old 
functionality anymore. So we have more time to really fix the problem, 
where it should be fixed. 

-mario

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4f79225e-3846-4d8a-8b1a-55b0cc83bd80n%40googlegroups.com.


Re: [tw5] Re: Daily Task Macro - buttons no longer change color in 5.2.0-prerelease

2021-08-15 Thread cmari
Hello all,  
Thanks!! Thanks to Mario for a way to wrap the macro that works perfectly. 
Thanks to Jeremy and Saq for all of the explanations - for me those always 
make it easier to adapt to change. Thanks to Saq for persisting with a 
search for alternatives in the face of my insistence on wanting what I 
want. And thanks to Josiah for highlighting the amazing longevity of TW 
tools.  

One further question that would help my understanding of things: is the 
wrapping enough to restore this macro to acceptability? Or is there really 
some deeper fundamental problem being described by "broken", "off-spec", 
and "improper" that means I should think of the wrapping as only a 
temporary bandage? 
cmari


On Sunday, August 15, 2021 at 9:55:55 AM UTC-7 PMario wrote:

> Did more tests ... It seems to be 
>
> <$vars x={{!!toggled}} y={{!!barray}}>
> <>
> 
>
> -m
>
> On Sunday, August 15, 2021 at 6:41:56 PM UTC+2 PMario wrote:
>
>> On Sunday, August 15, 2021 at 1:20:54 PM UTC+2 Jeremy Ruston wrote:
>>
>> * It should usually be easy to fix: wrap the macro invocation in a 
>>> <$tiddler> widget referencing the tiddler in question
>>
>>
>> I did test that, but it seems the tiddler-widget only views the 
>> tiddler-attribute for a change and a simple state, that only calculates the 
>> classes. ... 
>> So if any tiddler-field changes, it doesn't do a refreshSelf() and may be 
>> it shouldn't. It needs to refreshSelf() if the parameter itself is changed, 
>> and not if the tiddler, where the parameter points to is changed. ... 
>>
>> But this seems to work: 
>>
>> <$set name=x value={{!!toggled}}>
>> <>
>> 
>>
>> and
>>
>> <$set name=x value={{!!toggled}}>
>> <>
>> 
>>
>>
>> -mario
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1c9c6901-1724-4cf8-aeb8-aebbb9ce67dcn%40googlegroups.com.


Re: [tw5] Re: Daily Task Macro - buttons no longer change color in 5.2.0-prerelease

2021-08-15 Thread PMario
Did more tests ... It seems to be 

<$vars x={{!!toggled}} y={{!!barray}}>
<>


-m

On Sunday, August 15, 2021 at 6:41:56 PM UTC+2 PMario wrote:

> On Sunday, August 15, 2021 at 1:20:54 PM UTC+2 Jeremy Ruston wrote:
>
> * It should usually be easy to fix: wrap the macro invocation in a 
>> <$tiddler> widget referencing the tiddler in question
>
>
> I did test that, but it seems the tiddler-widget only views the 
> tiddler-attribute for a change and a simple state, that only calculates the 
> classes. ... 
> So if any tiddler-field changes, it doesn't do a refreshSelf() and may be 
> it shouldn't. It needs to refreshSelf() if the parameter itself is changed, 
> and not if the tiddler, where the parameter points to is changed. ... 
>
> But this seems to work: 
>
> <$set name=x value={{!!toggled}}>
> <>
> 
>
> and
>
> <$set name=x value={{!!toggled}}>
> <>
> 
>
>
> -mario
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5be4acbf-961e-4dca-8ac4-2a4d32668784n%40googlegroups.com.


Re: [tw5] Re: Daily Task Macro - buttons no longer change color in 5.2.0-prerelease

2021-08-15 Thread PMario
On Sunday, August 15, 2021 at 1:20:54 PM UTC+2 Jeremy Ruston wrote:

* It should usually be easy to fix: wrap the macro invocation in a 
> <$tiddler> widget referencing the tiddler in question


I did test that, but it seems the tiddler-widget only views the 
tiddler-attribute for a change and a simple state, that only calculates the 
classes. ... 
So if any tiddler-field changes, it doesn't do a refreshSelf() and may be 
it shouldn't. It needs to refreshSelf() if the parameter itself is changed, 
and not if the tiddler, where the parameter points to is changed. ... 

But this seems to work: 

<$set name=x value={{!!toggled}}>
<>


and

<$set name=x value={{!!toggled}}>
<>



-mario

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/558d42ff-2fc7-4116-afe6-4e342dc1f666n%40googlegroups.com.


Re: [tw5] Re: Daily Task Macro - buttons no longer change color in 5.2.0-prerelease

2021-08-15 Thread TiddlyTweeter
Ciao Jeremy

A c*ompounding factor *is that devs of older stuff are often NOT around to 
fix for compliance with new.
The issue is the users who relied on what they thought were kosher tools 
that STOP working that the author won't fix.

 Jeremy: |  do plan to update the release note with a more prominent 
warning of the impact of this change.

Good! IMHO, it might also be worth mentioning that their tool of concern 
would continue to *run fine under previous versions of TW*. 
For working apps mostly it is NOT needed you upgrade! 
(("Upgradeitis" is a serious modern disease. :-))

Best wishes
TT


On Sunday, 15 August 2021 at 13:20:54 UTC+2 jeremy...@gmail.com wrote:

> But it is *slightly worrying* that Simon Kilner's(?) TOGGLER macro 
> (actually a re-write of something originally on Classic?) is kinda 
> *deprecated 
> *now. And NEVER was BEFORE.
>
> The tool WORKED forever already.
>
> And your formal explanation kinda misses the point that IF it *was *working, 
> *why *is it NOT working now?
>
>
> It's the price for fixing the ability to edit a field within the same 
> tiddler, which has been a perennial problem/bug that affects many users.
>
> There's definitely a tension with breaking these macros, but there's a 
> couple of points:
>
> * More users encounter the edit-field-of-same-tiddler problem than would 
> be running some old broken macro
> * These macros were broken to begin with, and in many/most cases the 
> authors chose to ignore warnings
> * It should usually be easy to fix: wrap the macro invocation in a 
> <$tiddler> widget referencing the tiddler in question
>
> With reference to the second point, we've always tried to educate 
> developers on the proper way to write macros. Literally every time a 
> developer posts about a JS macro that they're writing, my first angle is to 
> look to see if it follows the rules, and to provide feedback if not.
>
> In many cases, of course, developers aren't very interested, and work on 
> the basis of "it works for me so why should I change it", which of course 
> in the end can be very damaging to the community unless the limitations are 
> very carefully documented.
>
> I do plan to update the release note with a more prominent warning of the 
> impact of this change.
>
> Best wishes
>
> Jeremy
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ea6f96e1-afc2-4f7a-9c0c-93c98c258691n%40googlegroups.com.


Re: [tw5] Re: Daily Task Macro - buttons no longer change color in 5.2.0-prerelease

2021-08-15 Thread Jeremy Ruston
> But it is slightly worrying that Simon Kilner's(?) TOGGLER macro (actually a 
> re-write of something originally on Classic?) is kinda deprecated now. And 
> NEVER was BEFORE.
> 
> The tool WORKED forever already.
> 
> And your formal explanation kinda misses the point that IF it was working, 
> why is it NOT working now?

It's the price for fixing the ability to edit a field within the same tiddler, 
which has been a perennial problem/bug that affects many users.

There's definitely a tension with breaking these macros, but there's a couple 
of points:

* More users encounter the edit-field-of-same-tiddler problem than would be 
running some old broken macro
* These macros were broken to begin with, and in many/most cases the authors 
chose to ignore warnings
* It should usually be easy to fix: wrap the macro invocation in a <$tiddler> 
widget referencing the tiddler in question

With reference to the second point, we've always tried to educate developers on 
the proper way to write macros. Literally every time a developer posts about a 
JS macro that they're writing, my first angle is to look to see if it follows 
the rules, and to provide feedback if not.

In many cases, of course, developers aren't very interested, and work on the 
basis of "it works for me so why should I change it", which of course in the 
end can be very damaging to the community unless the limitations are very 
carefully documented.

I do plan to update the release note with a more prominent warning of the 
impact of this change.

Best wishes

Jeremy



-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3A4AD25B-76DD-4DD4-ADC4-F8A6BD557180%40gmail.com.