-
Notifications
You must be signed in to change notification settings - Fork 45
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
Adding example to OptionsMerging #31
base: main
Are you sure you want to change the base?
Conversation
@@ -70,3 +70,23 @@ fluid.merge(policy, target, source-1, ... source-n); | |||
``` | |||
|
|||
where `policy` is the _merge policy object_ (may be empty), `target` is the object to (destructively) be the target of the merge operation, and `source-1` through `source-n` are a list of a number of "source" options structure from which the merge is to be performed. | |||
|
|||
## Examples ## |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sgithens, thanks for adding this example! The arrayConcatPolicy is not yet explained in the table of policy values above. Would you be willing to add a row to the table with a brief description?
|
Well, users are no longer recommended to use fluid.merge() as a standalone function - this is warned halfway down the document. I see we still barely support it, with a couple of dangerous-looking examples in the prefs framework. If we did anything, it would be best to restructure this page to more clearly focus on mergePolicies - which are also something that we don't direct "everyday" users of the framework (if there are any such people) to get involved with, but unfortunately with the current state of the framework most users end up having to meddle with them somewhat once their app gets beyond a certain level of sophistication. All of this said, the example is basically helpful in that it shows something concrete happening which otherwise might be quite mystifying. We might consider accepting the update someday if any time emerged to polish it up a bit : P Note that in the "new" framework virtually everything sensitive (members, models, etc.) gets sent into the general "fluid.deferringMergePolicy" since it has become accepted that the action of the generic mergePolicy is faulty because of issues such as https://issues.fluidproject.org/browse/FLUID-6219 |
No description provided.