Hi,
These widgets may help debugging.
https://tiddlywiki.com/#LogWidget:LogWidget%20ActionLogWidget
-m
On Wednesday, July 28, 2021 at 12:08:35 AM UTC+2 TW Tones wrote:
> Mark,
>
> Thanks, when I separate the code it also works. Just knowing your success
> is important information. My suspicion is perhaps that one of the variables
> I make use of is misbehaving and causing the code to be misread. I am loath
> to wikify every variable just before use but I may need to do this to see
> if I can identify the offending piece.
>
> I must say it can get difficult debugging larger solutions when we have
> multiple layers of macros and transclusions. The cognitive overload is high
> because so much is hidden within layers.
>
> Thanks for your help
> Tones
> On Tuesday, 27 July 2021 at 23:24:02 UTC+10 Mark S. wrote:
>
>> The thing is, I do see the second buttons after running the first button.
>> So maybe I don't understand what you expect the code to do.
>>
>> I do change " {{$:/PSaT/fancy-fields/icons/edit-field}}" to "MY BUTTON"
>> because I don't want to go spelunking all over the TW world to find the
>> particular icon you're using. However, if you have instance where you
>> forgot to install the icon, that would explain why the button appears to
>> not be working.
>>
>> On Tuesday, July 27, 2021 at 4:23:10 AM UTC-7 TW Tones wrote:
>>
>>> Thanks all,
>>>
>>> Mario, I would share an example, but it is hard to extract a test case
>>> because as I said "Deep within a larger project", I will see what I can do
>>> if I get nowhere soon.
>>>
>>> - Although when I extracted these macros from the others in an
>>> attempt it started working.
>>>
>>> Charlie, I always cut and past but usually only from my own working
>>> code. but I did remove some white space, thanks.
>>> Mark, I think that was an issue either not yet discovered as it would
>>> not have being displayed however I corrected that to $value={{{
>>> [<tiddler-field-value-temp>get[text]] }}}
>>>
>>> I will keep reviewing thanks all.
>>>
>>> Tones
>>>
>>> On Monday, 26 July 2021 at 22:49:29 UTC+10 TW Tones wrote:
>>>
>>>> Folks,
>>>>
>>>> Deep within a larger project I have some macros. there is a button that
>>>> displays its tooltip but its actions are not occurring. I have spent hours
>>>> trying work out why it is not working when it did previously.
>>>>
>>>> Can anyone see why the first button is visible but not reacting, if it
>>>> did I would then see the second button. Any suggestions would be helpful.
>>>>
>>>> \define field-state-update() $:/state/$(fieldname)$-update
>>>> \define tiddler-field-value-temp()
>>>> $:/temp/$(currentTiddler)$/$(fieldname)$-update
>>>> \define field.update()
>>>> <$list filter="[<field-state-update>!has[title]]" variable=nul>
>>>> <$transclude tiddler=<<field-type-tiddler>> field="field-view"/>
>>>> * <$button class="tc-btn-invisible" tooltip="click to edit
>>>> $(fieldname)$">*
>>>> * <$action-createtiddler $basetitle=<<field-state-update>>
>>>> text="existence toggled in field.update macro"/>*
>>>> * <$action-createtiddler $basetitle=<<tiddler-field-value-temp>>
>>>> text=<<field.value>>/>*
>>>> * {{$:/PSaT/fancy-fields/icons/edit-field}}*
>>>> * </$button>*
>>>> </$list>
>>>> <$list filter="[<field-state-update>has[title]]" variable=nul>
>>>> <$transclude tiddler=<<field-type-tiddler>> field="field-edit"/>
>>>> <$button message="tm-delete-tiddler" param=<<field-state-update>>
>>>> class="tc-btn-invisible" tooltip="finish update of $(fieldname)$">
>>>> {{$:/PSaT/fancy-fields/icons/edit-field}}
>>>> </$button>
>>>> <$button class="tc-btn-invisible" tooltip="Restore $(fieldname)$">
>>>> <$action-setfield $tiddler=<<currentTiddler>>
>>>> $field=<<fieldname>> $value=<$transclude
>>>> tiddler=<<tiddler-field-value-temp>>/> />
>>>> {{$:/PSaT/fancy-fields/icons/restore-field}}
>>>> </$button>
>>>> </$list>
>>>> \end
>>>>
>>>> More info
>>>>
>>>> I invoke this with <<field.update>> and fieldname field-type-tiddler
>>>> is already set. The green filter never comes true, also proving
>>>> <<field-state-update>> is never created.
>>>> <$action-createtiddler $basetitle=<<field-state-update>>
>>>> text="existence toggled in field.update macro"/>
>>>> <$action-createtiddler $basetitle=<<tiddler-field-value-temp>>
>>>> text=<<field.value>>/>
>>>> So the above actions do not occur.
>>>>
>>>> These lines in the above work on their own
>>>> <$transclude tiddler=<<field-type-tiddler>> field="field-edit"/>
>>>> <$transclude tiddler=<<field-type-tiddler>> field="field-view"/>
>>>>
>>>> Thanks
>>>> Tones
>>>>
>>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/c406b8d3-9ab1-46b3-9daf-f5448227bcafn%40googlegroups.com.