Hi Smandoli, Please describe what you intend to use the array (or arrays?) for, because that has implications as to how you would add, edit or delete any items in it.
We could easily provide you with functions that parse a tiddlers body or that analyse a tagging structure, but all of that depends on what you need your array for in the first place. So please be as detailed as you can in describing all of what you intend to do with you array... after all, perhaps you don't even need a dedicated js version of it. tb. On 9 Jan., 16:04, Smandoli <[email protected]> wrote: > Below is a custom macro that is called like this: > <<bookdex Mark >> > It works fine, but there's this honkin' big array in the middle that > REALLY wants to live somewhere else -- not only to make this piece of > code more manageably small, but more importantly, to let me reuse it > elsewhere. > > The result won't be presented to the user, so "wikify" isn't used I > guess; so will it use the "return" command to pass back the array? > And how to I reference the function from here -- is there some kind of > "store." object involved? > > (Honest, I do try to search for existing answers before posting.) > > config.macros.bookdex={ > handler: > function(place,macroName,params,wikifier,paramString,tiddler) { > var book = params[0]; > var bookdex; > > var arrBookdex = new Array(); > > ////////////////////////////////////////// > // Wants to be replaced by a call to separate macro > arrBookdex ["John" ] = "100"; > arrBookdex ["Mark"] = "120"; > arrBookdex ["Matthew" ] = "140"; > // ... etc. ! > ////////////////////////////////////////// > > bookdex = arrBookdex[book]; > wikify(bookdex, place); > } > }; -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.

