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

Extend exporting (variable exporting) #311

Closed
CrosRoad95 opened this issue Aug 7, 2018 · 4 comments
Closed

Extend exporting (variable exporting) #311

CrosRoad95 opened this issue Aug 7, 2018 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@CrosRoad95
Copy link
Contributor

Is your feature request related to a problem? Please describe.
My idea is to make possible export variables, for read and write.
Yes, i already can export variable by using functions.

Describe the solution you'd like
New new attribute:
<export type="variable" name="variableName" readOnly = "true" />
readOnly = true by default.

New Functions:

mixed value = getVariable( resource, variableName )
bool success = setVariable( resource, variableName, value ) -- return false if is read only.

New event:

"onVariableChanged" with attributes; source of change, resource, variable name, old value, new value

Describe alternatives you've considered
There's no alternatives.

Additional context

@qaisjp qaisjp added the enhancement New feature or request label Aug 7, 2018
@patrikjuvonen patrikjuvonen changed the title Extend exporting ( variable exporting ) Extend exporting (variable exporting) Aug 7, 2018
@Pirulax
Copy link
Contributor

Pirulax commented Aug 8, 2018

If Im not mistaken, every resource has its own luaVM which means, that "exporting" variables'd be slow, just like the normal call() function

@qaisjp
Copy link
Contributor

qaisjp commented Aug 8, 2018 via email

@Pirulax
Copy link
Contributor

Pirulax commented Aug 8, 2018

Maybe use setElementData as a variable, that's faster if you want a 'very' global(TM) variable.

@jushar
Copy link
Contributor

jushar commented Aug 10, 2018

It doesn't introduce new capabilities and might be rather confusing considering that there are exports already.

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

4 participants