Re: [tw] tiddler macro fails with startup tiddlers

2013-03-29 Thread Tobias Beer
Hi Jeremy,

Thanks for giving it a try. Unfortunately, your suggestion doesn't solve 
the problem but rather makes it permanent, so that it persists even after a 
tiddler refresh.

~

There must be a problem in some regex that matches the wrong pair of 
closing double square brackets, e.g.:

[[ argument 1 with [[inner square brackets|stops here =]] not here =]]

This certainly explains, why the first line item in ExampleTransclusion 
isn't even a link.

~

It seems to have something to do with the fact that — probably due to some 
{superfluous?!?} global refresh — all tiddlers (or just transclusions) are 
always rendered twice on startup and that the first time. The important 
bit, however is, that the arguments are passed to the tiddler macro handler 
during 
the first round as an array but the second time as string  — which is when 
it fails — with readBracketedList wrongly splitting the string into a 
number of arguments rather than just one (see example above).

~

Ok, so here are the different call stacks, the two from startup and the 
third after I was in edit mode and escaped out of it.

*call-stack* on *startup*, *1st* time...

https://lh6.googleusercontent.com/-HTCTzJYjlf4/UVVuSgeO9CI/BGw/tw0AHoCMAAk/s1600/CallStack_Startup_1st.png
*call-stack* on *startup* — *2nd* time...

https://lh3.googleusercontent.com/-GHvfvpg46tE/UVVui-KuJFI/BG4/2iWPy-PNKhU/s1600/CallStack_Startup_2nd.png
*call-stack after refresh...*

https://lh6.googleusercontent.com/-9Y8NltwNuiI/UVVur0A5WCI/BHA/JbsjWXs8Ats/s1600/CallStackAfterRefresh.png
~

Does TW5 handle (parsing) parameters differently? The output of parseParams 
has a bit of an awkward feel to it, in German we would probably be inclined 
to call it an eierlegende Wollmilchsau... a pig laying eggs, also giving 
milk and wool.

Cheers, Tobias.

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [tw] tiddler macro fails with startup tiddlers

2013-03-29 Thread Tobias Beer
I have added another minimalistic example that illustrates how the error is 
provoked with params containing double square brackets...

http://startuptransclusions.tiddlyspot.com/index.html#Brackets

Cheers, Tobias.

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [tw] tiddler macro fails with startup tiddlers

2013-03-28 Thread Jeremy Ruston
Hi Tobias

OK, I think I've figured it out. It's easier to show the fix first.
In config.macros.tiddler.handler, replace these two lines:

if(args!==undefined)
wrapper.setAttribute(args,[[+args.join(]] [[)+]]);

with this:

if(args!==undefined)
{
args = [[+args.join(]] [[)+]];
wrapper.setAttribute(args,args);
}

It seems that the issue is triggered when the transclude() method is called
with array arguments, rather than a string. This fix ensures that the
arguments are always given in string format.

Does this work for you?

Best wishes

Jeremy



On Tue, Mar 26, 2013 at 12:49 PM, Tobias Beer beertob...@gmail.com wrote:

 Hi Jeremy,

 A while back I created an MTC for this old discussion that I just
 recovered...
 https://groups.google.com/d/msg/tiddlywiki/1FR-uqyK0eU/kl09dOcLX2gJ

 I have updated that site to the latest core and simplified the examples...
 http://startuptransclusions.tiddlyspot.com

 Let me know if you have a clue as to what is going on here.

 Cheers, Tobias.




-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [tw] tiddler macro fails with startup tiddlers

2013-03-26 Thread Tobias Beer
Hi Jeremy,

A while back I created an MTC for this old discussion that I just 
recovered...
https://groups.google.com/d/msg/tiddlywiki/1FR-uqyK0eU/kl09dOcLX2gJ

I have updated that site to the latest core and simplified the examples...
http://startuptransclusions.tiddlyspot.com

Let me know if you have a clue as to what is going on here.

Cheers, Tobias.

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [tw] tiddler macro fails with startup tiddlers

2013-03-19 Thread Tobias Beer
Hi Jeremy,

Thanks for the follow up. Opening the above mentioned link you should find a 
tiddlyLink named [[FAQ]] before the tiddler title followed by the tag macro as 
a delimiter using raquo; ...while the latter works, the tiddlyLink does not 
and point to [[$2]]. If you view / edit the tiddler and go back to view mode, 
then the tiddlyLink works, which is why I call this a startup problem.

Cheers, Tobias.

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [tw] tiddler macro fails with startup tiddlers

2013-03-19 Thread Tobias Beer
In other words, it seems that params[0] receives a value yet there is no 
params[0]... assuming the tiddler macro uses a params array.

Cheers, Tobias.

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [tw] tiddler macro fails with startup tiddlers

2013-03-19 Thread Jeremy Ruston
Hi Tobias - Thank you that makes sense. It would be handy to have a minimal
test case to play with; did you make one in your explorations?

Best wishes

Jeremy


On Tue, Mar 19, 2013 at 6:03 PM, Tobias Beer beertob...@gmail.com wrote:

 In other words, it seems that params[0] receives a value yet there is no
 params[0]... assuming the tiddler macro uses a params array.

 Cheers, Tobias.

 --
 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 tiddlywiki+unsubscr...@googlegroups.com.
 To post to this group, send email to tiddlywiki@googlegroups.com.
 Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.





-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[tw] tiddler macro fails with startup tiddlers

2013-03-12 Thread Tobias Beer
Hi everyone, especially @Eric,

I believe I have already pointed this out a very long time ago. However, 
the bug that prevents the tiddler macro from running correctly with startup 
tiddlers seems to still lurk around. If I remember correctly, it's a 
problem with parsing parameters, i.e. not only does the tiddler macro get 
called twice but somehow the also with a wrong or even empty params array.

For an example, see...

http://tiddlywiki.org/#%5B%5BHow%20can%20I%20center%20an%20element%3F%5D%5D

In the tiddler title, you see *FAQ »* prepended to the title.

This is achieved by calling the tiddler...
http://tiddlywiki.org/#DOMAIN

...which contains nothing but...
[[$1|$2]] tag [[$1]] »

...conditionally in the ViewTemplate using HideWhenPlugin via...
span macro='showWhenTagged FAQ'
span macro='tiddler DOMAIN with: FAQ FAQ'/span
/span

Other than using my new creation called *NameSpacePlugin [1] *— which I 
probably will — (how) can this (finally) be fixed?

Cheers, Tobias.


[1] http://namespace.tiddlyspace.com

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.