FLUID-4392: Possibility for additivity in demands blocks is required so that they can be expressed in a modular way

Metadata

Source
FLUID-4392
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Justin Obara
Reporter
Antranig Basman
Created
2011-08-08T16:23:23.518-0400
Updated
2014-03-03T13:04:43.408-0500
Versions
  1. 1.4
Fixed Versions
  1. 1.5
Component
  1. Framework
  2. IoC System

Description

lahabana describes the following situation:

fluid.demands("fluid.videoPlayer.eventBinder", 
        ["fluid.videoPlayer.controllers",
            "fluid.videoPlayer.captionner",
            "fluid.videoPlayer.captionLoader",
            "fluid.videoPlayer",
            "fluid.videoPlayer.media"],
        {
            options: {
                listeners: {
                    "{controllers}.events.afterTimeChange": "{captionner}.resyncCaptions",
                    "{captionLoader}.events.onCaptionsLoaded": "{captionner}.resyncCaptions",
                    "{controllers}.events.onTimeChange": "{media}.setTime",
                    "{videoPlayer}.events.onTimeChange": "{media}.setTime",
                    "{controllers}.events.onVolumeChange": "{media}.setVolume",
                    "{videoPlayer}.events.onVolumeChange": "{media}.setVolume"
                }
            }
             
        });

where the component "controllers" is actually constructed by a renderer decorator as follows:

tree.controllers = {
                decorators: [
                    {
                        type: "fluid",
                        func: "fluid.videoPlayer.controllers"
                    },

The demands block although mismatching is allowed to match as a result of the successfully matched contexts (a further framework bug) but the reference to {controllers} is not resolvable. It should be possible for this demands block to be written in two parts, one of which mismatches completely in the case controllers is not rendered and so contributes no binding information, but both of which match and are merged together in the case controllers is present.

Comments

  • Antranig Basman commented 2013-02-19T14:54:55.521-0500

    Resolved by merge of FLUID-4330 branch at revision 91d5d1

  • Antranig Basman commented 2013-02-21T02:02:42.868-0500

    I can't believe this is finally implemented....