TeleMidia / ginga

A Ginga iTV middleware implementation by TeleMídia/PUC-Rio
http://ginga.org.br
GNU General Public License v2.0
51 stars 8 forks source link

Make Document::evalAction triggers links inside contexts that contains instSame elements of the media object that is being transitioned #110

Closed alanlivio closed 6 years ago

alanlivio commented 6 years ago

Today Document::evalAction triggers the links in the current context (and ancestors contexts) of the Media that is being transitioned. However, it does not search in contexts that contains instSame elements of the Media that is being transitioned.

For instance, the onBeginSet in the example bellow is not trigged.

<ncl>
  <head>
    <connectorBase>
      <causalConnector id="onBeginSet">
        <connectorParam name="var"/>
        <simpleCondition role="onBegin"/>
        <simpleAction role="set" value="$var"/>
      </causalConnector>
    </connectorBase>
  </head>
  <body>
    <port id="start0" component="ctx1"/>
    <media id="m1"/>
    <context id="ctx1">
      <port id="start1" component="m2"/>
      <port id="start2" component="m3"/>
      <media id="m2" instance="instSame" refer="m1"/>
      <media id="m3">
        <property name="background" value="red"/>
      </media>
      <link xconnector="onBeginSet">
        <bind role="onBegin" component="m2"/>
        <bind role="set" component="m3" interface="background">
          <bindParam name="var" value="green"/>
        </bind>
      </link>
    </context>
  </body>
</ncl>
alanlivio commented 6 years ago

@robertogerson reported that same error occur in examples/primeirojoao/05return.ncl