Model relay registration triggered by listener registration causes failure

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.

Environment

None

Activity

Show:

Justin Obara June 26, 2015 at 1:51 PM

Reopening to change the fix version to 1.9

Colin Clark September 13, 2014 at 6:02 PM

Reviewed, tested and merged.

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created September 3, 2014 at 7:26 PM
Updated July 30, 2020 at 11:42 AM
Resolved June 26, 2015 at 2:04 PM

Flag notifications