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

this parameter support #484

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

angelozerr
Copy link
Contributor

@angelozerr angelozerr commented Dec 13, 2021

this parameter support

Fixes #483

Signed-off-by: azerr [email protected]

@angelozerr
Copy link
Contributor Author

angelozerr commented Dec 13, 2021

Here a demo with this:

ThisParameterDemo

@mkouba could you confirm, that Qute works like this? I have not found some sample in the documentation with this (just see that in your tests).

@mkouba
Copy link
Collaborator

mkouba commented Dec 14, 2021

{this} should be deprecated. The only reasonable use case is documented for the {#with} section which is also a candidate for deprecation and removal.

In general, {this} refers to the current context, i.e. may be different within different parts of the template.

@angelozerr
Copy link
Contributor Author

{this} should be deprecated.

what about the parameter name when you write

private Template hello;

...
Map data = ...
hello.data(data)

This PR supports that. It uses this as parameter name

@angelozerr
Copy link
Contributor Author

@mkouba when you will have time, could you answer to my question please.

@mkouba
Copy link
Collaborator

mkouba commented Dec 15, 2021

{this} should be deprecated.

what about the parameter name when you write

private Template hello;

...
Map data = ...
hello.data(data)

This PR supports that. It uses this as parameter name

Well, you don't need to use this even for template.data(data). I mean you can just use {name} instead of {this.name}...

@fbricon
Copy link
Collaborator

fbricon commented Apr 7, 2023

should we close that PR?

@angelozerr
Copy link
Contributor Author

As this support seems not very important I stop working on it. When I will have time I will try to rework again

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

Successfully merging this pull request may close these issues.

this parameter support
3 participants