Tm-navigate message and the navigator widget

Hello all,

I’m developing a new Flexbox Layout with multiple columns and a custom handling for the tm-navigate message within each column

A messagecatcher widget catches the tm-navigate message and some procedures then do some logic.
Within the procedures I then send tm-navigate messages again, that should be trapped by navigator widgets.

I get all the necessary variables from the messagecatcher and can append them to the paramObject of the tm-navigate message like so:

<$action-sendmessage $message="tm-navigate" $param=<<event-navigateTo>> navigateTo=<<event-navigateTo>> navigateFromTitle=<<event-navigateFromTitle>> .../>

Now this is what the Navigator Widget does:

/*
Handle a tm-navigate event
*/
NavigatorWidget.prototype.handleNavigateEvent = function(event) {
	event = $tw.hooks.invokeHook("th-navigating",event);
	if(event.navigateTo) {
		this.addToStory(event.navigateTo,event.navigateFromTitle);
		if(!event.navigateSuppressNavigation) {
			this.addToHistory(event.navigateTo,event.navigateFromClientRect);
		}
	}
	return false;
};

It seems that the paramObject doesn’t get respected (?)
Shouldn’t it first look if there’s a paramObject and prefer those variables first?

Thank you for your answers,
Simon

its seems that the “tm-navigate” cannot be sent via the action-sendmessage widget (https://tiddlywiki.com/#WidgetMessage%3A%20tm-navigate), try the ActionNavigateWidget

I would have thought so. Have your tried it without the param attribute and value just to see if the problem is parameter handling.

Hello @buggyj

it can be sent via the action-sendmessage widget, only the paramObject doesn’t get accepted

Thank you!
Simon

The problem is, that the navigator widget is not really ready to be used with several independent story rivers. The core would need some love.

I do have some experiments, deeply hidden in “stalled” code branches, which have never been published. I mainly used the link-catcher, since it was the only widget available at that time. – I think it did work well, but I cannot remember why I did not publish it.

I’ll have to have a closer look, if I can find it. – Hope I did not delete it.

@pmario the default story on tiddlywiki is driven by a list widget that sets the story and history tiddlers navigation occurs within that, the tv-story-list and tv-history-list variables are set.

  • I would have thought these variables would be essential to navigation accross multiple stories.

@BurningTreeC are you setting or tracking these variables ?