I'm writing a new macro and I am trying to use the
DataTiddler.getDataObject which I am assuming is an array but it just
doesn't seem to be working for me. The code below is just some scratch
code to figure this out. It should return 3. Can anyone eyeball this
code and tell me what I am doing wrong?

config.macros.testmacro = {
  handler: function (place,macroName,params,wikifier,paramString,tiddler) {
    var title = story.findContainingTiddler(place).getAttribute("tiddler");
    var data = DataTiddler.getDataObject(title);
    var datum = DataTiddler.getData(title,"two")
    wikify(datum+" "+data.length,place);
   }
};

Tiddler
<<testmacro>>
<data>{"one":1,"two":2,"three":3}</data>

Tiddler displays:
2 undefined

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to