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

Problem with SelfInvocationContext #466

Open
AndreiKingsley opened this issue Jan 31, 2025 · 0 comments
Open

Problem with SelfInvocationContext #466

AndreiKingsley opened this issue Jan 31, 2025 · 0 comments
Labels
api Common API for plotting invalid This doesn't seem right

Comments

@AndreiKingsley
Copy link
Collaborator

SelfInvocationContext is a special interface that actually works like trait. It has invoke() extension function that opens scope with this as a reciever:

public operator fun <T : SelfInvocationContext> T.invoke(block: T.() -> Unit): T = apply(block)

It simplifies DSL creation (see Axis or Legend API for example), but it complicates work with Kandy in Gradle projects, since user need invoke import (and IDEA doesn't even suggest to add this import!).

@AndreiKingsley AndreiKingsley added invalid This doesn't seem right api Common API for plotting labels Jan 31, 2025
@AndreiKingsley AndreiKingsley added this to the Kandy release v0.9.0 milestone Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Common API for plotting invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant