Hi, i tried to sublass the navigator as described in "WidgetSubclassingMechanism" like so:
(function(){ /*jslint node: true, browser: true */ /*global $tw: false */ "use strict"; exports.baseClass = "navigator"; // Specify a different name to make the subclass available as a new widget instead of overwriting the baseclass: exports.name = "limited-stack-navigator"; exports.constructor = function(parseTreeNode,options) { this.initialise(parseTreeNode,options); }; exports.prototype = {}; exports.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); } }*/ console.log("HANDLE"); return false; }; })(); I get the following error: "this.eventListeners is undefined". It seems that the constructor of widget (the baseclass of navigator) is not called beforehand (which registers this.eventListeners ). So my basic questions here are: 1. is this a design flaw? (e.g. the registration for the events inside of the navigator-constructor is a bad idea ;) ) 2. is it not intended to subclass navigator from some reason? 3. am i doing something else (more trivial) wrong in my overwrite-trial above? Thanks for your help, Mirko -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikidev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/b63933cd-ba27-4de1-9bfa-1d44327bd202n%40googlegroups.com.