Metadata
- Source
- FLUID-5504
- Type
- Bug
- Priority
- Major
- Status
- Closed
- Resolution
- Fixed
- Assignee
- Antranig Basman
- Reporter
- Antranig Basman
- Created
2014-09-03T15:26:07.623-0400 - Updated
2020-07-30T07:42:48.477-0400 - Versions
- N/A
- Fixed Versions
-
- 1.9
- Component
-
- Data Binder
- IoC System
Description
The following setup:
fluid.defaults("flock.enviro", {
gradeNames: ["fluid.standardRelayComponent", "flock.nodeList", "autoInit"],
....
listeners: {
onPlay: "{audioStrategy}.startGeneratingSamples()",
....
components: {
audioStrategy: {
type: "flock.audioStrategy.platform",
options: {
model: {
playState: "{enviro}.model.playState"
}
}
}
where audioStrategy has
invokers: {
startGeneratingSamples: {
funcName: "flock.audioStrategy.web.start",
args: ["{that}.model", ....
causes a failure, DataBinding.js line 453 during
var targetApplier = options.targetApplier || target.applier; // implies the target is a relay document
var sourceApplier = options.sourceApplier || source.applier; // implies the source is a relay document - listener will be transactional
var applierId = targetApplier.applierId;
The workflow is -
i) initialisation of enviro reaches "registerListeners" - this observes its child, audioStrategy, and then observes that it has a model section which requires relay to the parent. This then binds ungingerly onto the parent's model and discovers that the applier is absent - since the "last-ditch" construction point is actually during enviro's initDependents which is far in the future. We should fix this simply by making sure that relay performs ginger observation of target's applier before use.
Comments
-
Colin Clark commented
2014-09-13T14:02:36.732-0400 Reviewed, tested and merged.
-
Justin Obara commented
2015-06-26T09:51:06.457-0400 Reopening to change the fix version to 1.9