Issue with action-navigate

ยอดดู 142 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

Mohammad

ยังไม่อ่าน,
28 ก.ค. 2561 00:27:3928/7/61
ถึง TiddlyWiki
The action navigate used like below

<$action-navigate $to="target" />

If a text reference used for target tiddler, then if you have space in the target tiddler name, it fails

Assume

<$action-navigate $to=<<target>> />

Where target is a macro or variable with this value

Hi I am a Tiddler

How resolve this?

Other example can be like this

<$action-navigate $to={{MyTiddler!!SomeRef}} />


Mohammad

Mohammad

ยังไม่อ่าน,
28 ก.ค. 2561 00:44:3528/7/61
ถึง TiddlyWiki
An Update

I used the below macro to return to last viewed tiddler when switch back to Classic Story View, but no success!


\define gotoSlide()
<$set name="target" value={{$:/HistoryList!!current-tiddler}}>
<$action-navigate $to=<<target>>/>
</$set>
\end


TonyM

ยังไม่อ่าน,
28 ก.ค. 2561 08:31:1328/7/61
ถึง TiddlyWiki
Mohammad,

Action widgets need a trigger to action them. Buttons are the most common. Where is the trigger in this case?

Tony

Mohammad

ยังไม่อ่าน,
28 ก.ค. 2561 09:11:3728/7/61
ถึง TiddlyWiki
Yes, It was inside a button!
But when you have target title with spaces, it gets confused!

Mohammad

TonyM

ยังไม่อ่าน,
28 ก.ค. 2561 20:03:5428/7/61
ถึง TiddlyWiki
Mohammad,

If you think about it the following does not delimit the value correctly when there is a space

value={{$:/HistoryList!!current-tiddler}}

I think putting quotes around this may not work.

Wikify will work text="{{$:/HistoryList!!current-tiddler}}"

Then put in the wikified variable
Value=<<wikifyvar>>

Regards
Tony

Mohammad

ยังไม่อ่าน,
28 ก.ค. 2561 22:23:2628/7/61
ถึง TiddlyWiki
Thanks Tony, let's try it.

Mark S.

ยังไม่อ่าน,
28 ก.ค. 2561 23:39:4428/7/61
ถึง TiddlyWiki
When I try this:

\define target() My Little Tiddler

<$button>Go forth
<$action-navigate $to=<<target>> />
</
$button>

It works. That is, it navigates to the tiddler "My Little Tiddler" even though that tiddler has spaces in it's name. Perhaps we need to know more about how you are making "target" ?

Good luck!
-- Mark

Mohammad

ยังไม่อ่าน,
29 ก.ค. 2561 16:06:2829/7/61
ถึง TiddlyWiki
Mark!
 Thank you! I used the same! I read the $:/HistoryList!!current-tiddler when I switch between two story viewes (zoomin and classic).
By the way what you proposed also worked for me!

Still I could not figure it out how to focus on the same tiddler when I change story view!


Mohammad

Mark S.

ยังไม่อ่าน,
29 ก.ค. 2561 16:19:5229/7/61
ถึง TiddlyWiki
How are you changing the story view? Through the control panel, or some other way?

-- Mark

Mohammad

ยังไม่อ่าน,
29 ก.ค. 2561 16:28:3429/7/61
ถึง TiddlyWiki
Mark!
 I use a macro! I click on a button to go full screen and zoomin view! something like this
<$action-sendmessage $message="tm-full-screen"/>

<$action-setfield $tiddler="$:/view" text="zoomin"/>




In the macro I store, the current story view in a state tiddler
When I switch back, I read the state tiddler and overwrite the  $:/view something like this

  <$action-sendmessage $message="tm-full-screen"/>
  <$set name="previous-story-view" value={{$:/state/tiddlyshow/presentation!!story-view}} >
    <$action-setfield $tiddler="$:/view" text=<<previous-story-view>> />
  </$set>


Mark S.

ยังไม่อ่าน,
29 ก.ค. 2561 19:25:5329/7/61
ถึง TiddlyWiki
When I zoomin like this:

<$button>Zoom in
<$set name=vlastviewed tiddler={{$:/HistoryList!!current-tiddler}}  field="text">

<$action-setfield $tiddler="$:/view" text="zoomin"/>
</$set>
</$button>

It always goes to the last spot in the history list. Is that not what you expect/want ?

-- Mark

Mohammad

ยังไม่อ่าน,
29 ก.ค. 2561 23:10:5829/7/61
ถึง TiddlyWiki
Mark, check the reverse!
When you go back to classic view from zoomin view , it does not work!

Let me know your solution!


Mohammad

Mark S.

ยังไม่อ่าน,
31 ก.ค. 2561 01:16:2431/7/61
ถึง TiddlyWiki
Hi Mohammad,

It appears to me that the effects of changing the view occur after the button has run, so any navigation is no longer in effect. It might be possible to re-order the StoryList, so that the tiddler you want to navigate to is at the top of the list. Since the restore puts the user at the top of the page (or leaves the user there), that is *almost* the same thing as navigating to the item.

-- Mark

Mohammad

ยังไม่อ่าน,
1 ส.ค. 2561 01:58:301/8/61
ถึง tiddl...@googlegroups.com
Mark,
Thank you for your hint. I solved it this way

\define newList() [[$(v1)$]] $(v2)$

<$button>Change List
  <$set name="v1" value={{$:/
HistoryList!!current-tiddler}}>
   
<$set name="v2" filter=" [list[$:/StoryList]]">
     
<$action-setfield $tiddler="$:/StoryList" list=<<newList>> />
    </
$set>
 
</$set>
</
$button>


This works now, but I am not sure if this is the correct method!
ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ