You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
As per this forum post, I tried to store a ref to partial sub-tree of the object model in a variable for easier access and more readable code.
var tool = 0
var toolHeater = heat.heaters[tools[var.tool].heaters[0]]
;--- Accessing the "current" member. As of now, this is not possible:
echo var.toolHeater.current
;--- Expected behaviour would be the equivalent to:
echo heat.heaters[tools[var.tool].heaters[0]].current
Describe the solution you propose.
It would be a great addition to the syntax if we could somehow store object references in variables, then later dereference them as required, accessing the original part of the object model.
Describe alternatives you've considered
As of now, @dc42 has confirmed that this is not possible. The only way is to use a whole path to the endpoint at every place where it is required.
Provide any additional context or information.
No response
The text was updated successfully, but these errors were encountered:
What about using string substitution (similar to using a preprocessor variable) vs referencing and dereferencing? On Feb 29, 2024, at 11:10 AM, Gabriella M. ***@***.***> wrote:
Is your feature request related to a problem? Please describe.
As per this forum post, I tried to store a ref to partial sub-tree of the object model in a variable for easier access and more readable code.
var tool = 0
var toolHeater = heat.heaters[tools[var.tool].heaters[0]]
;--- Accessing the "current" member. As of now, this is not possible:
echo var.toolHeater.current
;--- Expected behaviour would be the equivalent to:
echo heat.heaters[tools[var.tool].heaters[0]].current
Describe the solution you propose.
It would be a great addition to the syntax if we could somehow store object references in variables, then later dereference them as required, accessing the original part of the object model.
Describe alternatives you've considered
As of now, @dc42 has confirmed that this is not possible. The only way is to use a whole path to the endpoint at every place where it is required.
Provide any additional context or information.
No response
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
What about using string substitution (similar to using a preprocessor variable) vs referencing and dereferencing?
Hmm, could be a possible workaround, but is that possible? I just read the documentation twice again, but I did not find anything that evaluates a string's contents as a command.
Is your feature request related to a problem? Please describe.
As per this forum post, I tried to store a ref to partial sub-tree of the object model in a variable for easier access and more readable code.
Describe the solution you propose.
It would be a great addition to the syntax if we could somehow store object references in variables, then later dereference them as required, accessing the original part of the object model.
Describe alternatives you've considered
As of now, @dc42 has confirmed that this is not possible. The only way is to use a whole path to the endpoint at every place where it is required.
Provide any additional context or information.
No response
The text was updated successfully, but these errors were encountered: