Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In PGF oo module, calling a method strips grouping #175

Closed
pgf-tikz-bot opened this issue Aug 10, 2011 · 3 comments
Closed

In PGF oo module, calling a method strips grouping #175

pgf-tikz-bot opened this issue Aug 10, 2011 · 3 comments

Comments

@pgf-tikz-bot
Copy link

Migrated from SourceForge
Author: *anonymous
Timestamp: 2011-08-10 10:07:16

When calling a method on an object created using the PGF OO module, one level of grouping is stripped from the argument by the caller, causing problems if the argument contains a parenthesis. That is to say, calling `\obj.method({arg()})` *ought* to protect the inner `()` and pass `arg()` to the method. It doesn't, because of how `\pgfoo@caller` passes its arguments to the next call. To get round this, `pgfoo@caller` could protect the third argument when it passes it on to the next command:

\def\pgfoo@caller#1.#2(#3){%
\def\pgf@marshal{%
\pgfoothis@count=#1\relax%
\csname pgfooY\csname pgfooX\the\pgfoothis@count @Class\endcsname.#2\endcsname({#3})%
}%
\expandafter\pgf@marshal\expandafter\pgfoothis@count\the\pgfoothis@count\relax%
}

But I don't know if this would break anything else.

@pgf-tikz-bot
Copy link
Author

Migrated from SourceForge
Author: *anonymous
Timestamp: 2011-08-10 10:14:47

A little testing shows that it's more complicated than I thought because of how `\pgfoo@caller` is used so my proposed solution is over-simplistic.

@pgf-tikz-bot
Copy link
Author

Migrated from SourceForge
Author: tantau
Timestamp: 2013-07-19 13:17:56.586000

  • status: open --> closed-fixed
  • Group: --> v1.0 (example)

@pgf-tikz-bot
Copy link
Author

Migrated from SourceForge
Author: tantau
Timestamp: 2013-07-19 13:17:57.346000

I fixed this in the CVS, even though it actually breaks some of the datavisualization code, which depended on the stripping behaviour. However, I also fixed that and, I agree, that the call should not strip the braces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant