Hi,
I've created a basic javascript macro that look for a field ('categfield')
from a tiddler ('Test-tiddler')
This macro is called from the 'Test-tiddler' that allows setting the
'categfield" with a $select
Here is the 'Test-tiddler'
By Category:
<$select field="categfield">
<option value="Categ-1">Categ-1</option>
<option value="Categ-2">Categ-2</option>
<option value="Categ-3">Categ-3</option>
</$select>
<<testmacro>>
When I open 'Test-tiddler' and select a categfield the console.log in the
testmacro.js displays correctly the categfield value. Fine
Now if I create a 'test-tab' tiddler like
<<tabs "Tab1 Test-tiddler "Tab1" "$:/state/tab1" "tc-vertical">>
And access the ''Test-tiddler' from there,
* the categfield are not update when I change it from the select !!*
I've tried also to leave opened only the 'test-tab'. Same result
I suspect a bug, don't you think ?
Here is the macro
/*\
title: $:/plugins/vpl/testmacro.js
type: application/javascript
module-type: macro
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
*/
exports.name = "testmacro";
exports.params = [];
/*
Run the macro
*/
exports.run = function() {
console.log("testmacro 0.1");
var categFilterTiddlerPath = 'Test-tiddler';
var cateFIlterTiddler = this.wiki.getTiddler(categFilterTiddlerPath);
var categField = cateFIlterTiddler.getFieldString("categfield");
console.log("Vield Value from macro:"+categField);
return ("Hello");
};
})();
Regards
Vpl
--
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/05c8c4cc-2883-431d-9f9c-9ffeebe81840%40googlegroups.com.