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

DynamicModule variables names convention #4

Closed
kubaPod opened this issue Mar 25, 2020 · 1 comment
Closed

DynamicModule variables names convention #4

kubaPod opened this issue Mar 25, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@kubaPod
Copy link

kubaPod commented Mar 25, 2020

A feature request

While in majority of cases DynamicModule[{x},.. will be typeset to

DynamicModuleBox[{ $CellContext`x$$ }, ...

the majority of users will not know that. So if the UI creator used x the name should remain "x"

But since

  • I know one compose DynamicModuleBox manually but I have never heard of it being done.
  • One could also do DynamicModule[ { MyPackage`x, x },
  • Or authors of w-n-e may want to be strict.

We need to meet middle way.

So I propose the name to be user friendly and trying to match $CellContext`x$$ and friends while fullName being strict full name for an explicit match only and for a full control for edge cases.

@poeschko poeschko added the enhancement New feature or request label Mar 26, 2020
@poeschko
Copy link
Contributor

Yes, this is a good idea. We will change the behavior as proposed: By default, we will not require an "exact" name match anymore, i.e. implicitly normalize the given variable name (x -> $CellContext`x$$), like it happens behind the scenes for DynamicModule. We will introduce a parameter useExactName (default false) that you can set to true to get the current behavior, for full low-level control (although I don't think that should really be necessary).

This will be in Cloud 1.55.

@poeschko poeschko closed this as completed Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants