I came across an implementation where on embedded view params (no binding exist).
I ask AI how did data transfer from Main View into Embedded View Params.
AI answered: Embed View receives its params because it is embedded inside Main, and Perspective automatically injects the parent view’s params into the embedded view when the view is mounted — no binding is required.
Is this true, after 10 years, I only knew this now.
How is the rule of this?
This explains bad Perspective behavior when many views accept a tagpath parameter, but are expected to add suffixes to a parent tagpath when embedded. Looks like such a view will receive two values back to back--one the parent tagpath, and then the correct suffixed tagpath. Hopefully in that order.
I really don't like this.
@bmusson , does your alternate embedded view component do this?
Either its using the default parameters within the view or they could be using a script to write in parameters. Does the view have any startup events?
This is making me question if this could be a cause of why embedding multiple levels of views causes issues sometimes. Often we reuse similar syntax for passing pathing down into the sub-views. That being said, OPs response is from AI so take it with a grain of salt unless it can cite a source.
One does not need to place bindings on the params of an embedded view.
Instead when the view is first embedded it will populate its own params with the parameter values as defined within the view that is being embedded at the time the view was embedded (if using drag and drop).
If a param key is not defined on the embedded view (deleted or never added) then the embedded view will just use the param value for that key as currently defined within the view that was embedded.
That my experience/understanding. But you have intrigued me enough to test a few scenarios.
UPDATE: v8.1.53, Could not in any way reproduce behavior where "the Perspective automatically injects the parent view’s params into the embedded view".
This theory made by AI is busted.. (sorry for stirring).
I did a quick test.
with button that assigned embedded path to child path.
child path params was not updated with parent params.