<div dir="ltr">Hola primero que nada muchas gracias, estuve probando esto pongo el codigo y la verdad no entiendo bien que pasa. Aca envio mi codigo y la salida de la consola tambien.<div><br><div><br></div><div><div>&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;</div>
<div>&lt;ncl id=&quot;sync&quot; xmlns=&quot;<a href="http://www.ncl.org.br/NCL3.0/EDTVProfile">http://www.ncl.org.br/NCL3.0/EDTVProfile</a>&quot;&gt;<br></div><div><span class="" style="white-space:pre">        </span>&lt;head&gt;</div>
<div><br></div><div><span class="" style="white-space:pre">                </span></div><div><span class="" style="white-space:pre">                </span>&lt;ruleBase&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;rule id=&quot;rText1&quot; var=&quot;service.currentFocus&quot; value=&quot;3&quot; � comparator=&quot;eq&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;rule id=&quot;rText2&quot; var=&quot;service.currentFocus&quot; value=&quot;4&quot; comparator=&quot;eq&quot;/&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;rule id=&quot;rText3&quot; var=&quot;service.currentFocus&quot; value=&quot;5&quot; comparator=&quot;eq&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                </span>&lt;/ruleBase&gt;</div><div><span class="" style="white-space:pre">                                </span></div><div><span class="" style="white-space:pre">                </span>&lt;regionBase&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;region id=&quot;backgroundReg&quot; width=&quot;100%&quot; height=&quot;100%&quot; zIndex=&quot;1&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;!--Region para mostrar el texto segun la opcion del menu--&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;region id=&quot;regTextDesc&quot; width=&quot;45%&quot; height=&quot;18.5%&quot; left=&quot;35%&quot; top=&quot;6.7%&quot; zIndex=&quot;3&quot; /&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;!--Region para cada opcion del menu--&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;region id=&quot;menu1Reg&quot; left=&quot;25%&quot; top=&quot;91.7%&quot; width=&quot;11.7%&quot; height=&quot;6.51%&quot; zIndex=&quot;3&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;region id=&quot;menu2Reg&quot; left=&quot;47.5%&quot; top=&quot;91.7%&quot; width=&quot;11.7%&quot; height=&quot;6.51%&quot; zIndex=&quot;3&quot;/&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;region id=&quot;menu3Reg&quot; left=&quot;70%&quot; top=&quot;91.7%&quot; width=&quot;11.7%&quot; height=&quot;6.51%&quot; zIndex=&quot;3&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                </span>&lt;/regionBase&gt;</div><div><br></div><div><span class="" style="white-space:pre">                </span>&lt;descriptorBase&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;descriptor id=&quot;backgroundDesc&quot; region=&quot;backgroundReg&quot; transIn=&quot;trans1&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;descriptor id=&quot;descTextDesc&quot; region=&quot;regTextDesc&quot; �transIn=&quot;trans1&quot; �focusIndex=&quot;2&quot; moveRight=&quot;3&quot; moveLeft=&quot;5&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;!--Descriptor para las opciones del menu--&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;descriptor id=&quot;menu1Desc&quot; region=&quot;menu1Reg&quot; focusIndex=&quot;3&quot; moveRight=&quot;4&quot; moveLeft=&quot;2&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;descriptor id=&quot;menu2Desc&quot; region=&quot;menu2Reg&quot; focusIndex=&quot;4&quot; moveRight=&quot;5&quot; moveLeft=&quot;3&quot;/&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;descriptor id=&quot;menu3Desc&quot; region=&quot;menu3Reg&quot; focusIndex=&quot;5&quot; moveRight=&quot;3&quot; moveLeft=&quot;4&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                </span>&lt;/descriptorBase&gt;</div><div><span class="" style="white-space:pre">                </span></div><div><span class="" style="white-space:pre">                </span>&lt;connectorBase&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;importBase documentURI=&quot;causalConnBase.ncl&quot; alias=&quot;conEx&quot;/&gt;</div><div><span class="" style="white-space:pre">                </span>&lt;/connectorBase&gt;</div>
<div><span class="" style="white-space:pre">        </span>&lt;/head&gt;</div><div><span class="" style="white-space:pre">        </span>&lt;body&gt;</div><div><span class="" style="white-space:pre">                </span></div><div><span class="" style="white-space:pre">                </span>&lt;port id=&quot;entry&quot; component=&quot;background&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                </span></div><div><span class="" style="white-space:pre">                </span>&lt;media id=&quot;globalVar&quot; type=&quot;application/x-ncl-settings&quot;&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;property name=&quot;service.currentFocus&quot; value=&quot;3&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                </span>&lt;/media&gt;</div><div><span class="" style="white-space:pre">                </span></div><div><span class="" style="white-space:pre">                </span>&lt;media id=&quot;background&quot; src=&quot;media/background.jpg&quot; descriptor=&quot;backgroundDesc&quot;&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;area id=&quot;segHead&quot; begin=&quot;5s&quot;/&gt;&lt;!-- Sirve para decir cuando empieza--&gt;</div><div><span class="" style="white-space:pre">                </span>&lt;/media&gt;</div>
<div><span class="" style="white-space:pre">                </span></div><div><span class="" style="white-space:pre">                </span>&lt;!-- Mostramos el menu --&gt;</div><div><span class="" style="white-space:pre">                </span>&lt;port id=&quot;pMenu1&quot; component=&quot;opcion1&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                </span>&lt;port id=&quot;pMenu2&quot; component=&quot;opcion2&quot;/&gt;</div><div><span class="" style="white-space:pre">                </span>&lt;port id=&quot;pMenu3&quot; component=&quot;opcion3&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                        </span></div><div><span class="" style="white-space:pre">                </span>&lt;media id=&quot;texto&quot; src=&quot;media/choro.txt&quot; descriptor=&quot;descTextDesc&quot; type=&quot;text/plain&quot; &gt;</div>
<div><span class="" style="white-space:pre">                                </span>&lt;property name=&quot;fontFamily&quot; value=&quot;Tiresias&quot;/&gt;<span class="" style="white-space:pre">                        </span></div><div><span class="" style="white-space:pre">                                </span>&lt;property name=&quot;fontSize&quot; value=&quot;30&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                                </span>&lt;property name=&quot;fontColor&quot; value=&quot;white&quot;/&gt;</div><div><span class="" style="white-space:pre">                                </span>&lt;property name=&quot;fontWeight&quot; value=&quot;bold&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                </span>&lt;/media&gt;</div><div><span class="" style="white-space:pre">                        </span></div><div><span class="" style="white-space:pre">                </span>&lt;media id=&quot;opcion1&quot; src=&quot;media/rock.png&quot; � <span class="" style="white-space:pre">        </span>descriptor=&quot;menu1Desc&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                </span>&lt;media id=&quot;opcion2&quot; src=&quot;media/techno.jpg&quot;<span class="" style="white-space:pre">        </span>descriptor=&quot;menu2Desc&quot;/&gt;</div><div><span class="" style="white-space:pre">                </span>&lt;media id=&quot;opcion3&quot; src=&quot;media/cartoon.gif&quot; descriptor=&quot;menu3Desc&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                        </span></div><div><span class="" style="white-space:pre">                </span>&lt;switch id=&quot;textos&quot;&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;bindRule constituent=&quot;texto1&quot; rule=&quot;rText1&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;bindRule constituent=&quot;texto2&quot; rule=&quot;rText2&quot;/&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;bindRule constituent=&quot;texto3&quot; rule=&quot;rText3&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;defaultComponent component=&quot;texto3&quot;/&gt;</div><div><br></div><div><span class="" style="white-space:pre">                        </span>&lt;media id=&quot;texto1&quot; src=&quot;media/rock.txt&quot; descriptor=&quot;descTextDesc&quot; type=&quot;text/plain&quot; /&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;media id=&quot;texto2&quot; src=&quot;media/techno.txt&quot; descriptor=&quot;descTextDesc&quot; type=&quot;text/plain&quot;/&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;media id=&quot;texto3&quot; src=&quot;media/cartoon.txt&quot; descriptor=&quot;descTextDesc&quot; type=&quot;text/plain&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                </span>&lt;/switch&gt;</div><div><span class="" style="white-space:pre">                        </span></div><div><br></div><div><span class="" style="white-space:pre">                </span>&lt;link id=&quot;lHeadText&quot; xconnector=&quot;conEx#onBeginStart&quot;&gt;�</div>
<div><span class="" style="white-space:pre">                        </span>&lt;bind role=&quot;onBegin&quot; component=&quot;background&quot; interface=&quot;segHead&quot;/&gt;�</div><div><span class="" style="white-space:pre">                        </span>&lt;bind role=&quot;start&quot; component=&quot;texto&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                </span>&lt;/link&gt;<span class="" style="white-space:pre">        </span></div><div><span class="" style="white-space:pre">        </span></div><div><br></div><div><span class="" style="white-space:pre">                </span>&lt;link id=&quot;lmenu&quot; xconnector=&quot;conEx#onKeySelectionSetStartStop&quot;&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;bind role=&quot;onSelection&quot; component=&quot;texto1&quot;/&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;bind role=&quot;onSelection&quot; component=&quot;texto2&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                        </span>&lt;bind role=&quot;onSelection&quot; component=&quot;texto3&quot;/&gt;<span class="" style="white-space:pre">                                </span></div><div><span class="" style="white-space:pre">                        </span>&lt;bind component=&quot;globalVar&quot; interface=&quot;service.currentFocus&quot; role=&quot;set&quot;&gt;</div>
<div><span class="" style="white-space:pre">                                </span>&lt;bindParam name=&quot;var&quot; value=&quot;5&quot;/&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;/bind&gt;<span class="" style="white-space:pre">                                </span></div>
<div><span class="" style="white-space:pre">                        </span>&lt;bind role=&quot;stop&quot; component=&quot;textos&quot;/&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;bind role=&quot;start&quot; component=&quot;textos&quot;/&gt;</div>
<div><span class="" style="white-space:pre">                </span>&lt;/link&gt;</div><div><br></div><div><span class="" style="white-space:pre">        </span>&lt;/body&gt;</div><div>&lt;/ncl&gt;</div></div></div><div><br></div><div><div>� �--------------------------| Ginga.ar 2.0.0 () |--------------------------</div>
<div>[ncl30-converter::NclLinkingConverter] WARNING: anchorNode is NULL for component &#39;texto1&#39;</div><div>[ncl30-converter::NclLinkingConverter] WARNING: anchorNode is NULL for component &#39;texto2&#39;</div><div>
[ncl30-converter::NclLinkingConverter] WARNING: anchorNode is NULL for component &#39;texto3&#39;</div><div>[ncl30-converter::NclComponentsConverter] WARNING: role onSelection with less than minimum binds</div></div><div>
<br></div><div style>Espero me puedan ayudar.</div><div style><br></div><div style><br></div><div style>Saludos.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/7 Leo <span dir="ltr">&lt;<a href="mailto:lisasmendi@lifia.info.unlp.edu.ar" target="_blank">lisasmendi@lifia.info.unlp.edu.ar</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Perd�n, presione mal y me envi� la respuesta sin terminar de explicar, ahora completo:<br></div><div>
<br></div><div><div class="im">Para usar el switch necesitas dos cosas, definir las reglas y definir el switch que usa esas reglas.<br>
<br></div>en el head del documento se definen las reglas:<div class="im"><br><br><br>&lt;head&gt;<br><br>&lt;!--Se definen las reglas sobre las que se tomar�n las decisiones<br>- id: identificador<br>- var: nombre de la variable global<br>
</div>- comparator: &quot;lt&quot; | &quot;gt&quot; | &quot;lte&quot; | &quot;eq&quot; | &quot;gte&quot; | &quot;ne&quot;�</div>
<div><div class="im">- value: valor que se usa para validaci�n de la regla<br>--&gt; �<br>� &lt;ruleBase&gt;<br></div>� �� &lt;rule id=&quot;rUno&quot; var=&quot;imagenSeleccionada&quot; comparator=&quot;eq&quot; value=&quot;1&quot;/&gt;<br>
� �� &lt;rule id=&quot;rDos&quot; var=&quot;imagenSeleccionada&quot; comparator=&quot;eq&quot; value=&quot;2&quot;/&gt;<br>
� &lt;/ruleBase&gt;<br></div><div><br></div><div>�        �&lt;regionBase&gt;<br>�                � �...<br>�        �&lt;/regionBase&gt;<br><br>�        �&lt;descriptorBase&gt;<br>                        �                � �...<br>                 � �&lt;/descriptorBase&gt;</div><div><br>&lt;/head&gt;</div>

<div><br></div><div><br></div><div>En el body se define un media switch</div><div><br></div><div>        &lt;body&gt;<br><br>��<br>�        &lt;port id=&quot;pEntrada1&quot; component=&quot;sImagen&quot;/&gt;<br><br>        &lt;!--Se define un media del tipo ncl-settings con la variable global a modificar--&gt;<br>

                &lt;media id=&quot;nodoSettings&quot; type=&quot;application/x-ncl-settings&quot;&gt;<br>�                � &lt;property name=&quot;imagenSeleccionada&quot; value=&quot;1&quot;/&gt;<br>                &lt;/media&gt;<br><br>��<br>        &lt;!--El switch comienza la presentaci�n de uno u otro media seg�s las reglas satisfechas--&gt;                        <br>

                                                        <br>�        &lt;switch id=&quot;sImagen&quot;&gt;<br>                        </div><div><br></div><div>&lt;!-- �definimos una accion para cada regla --&gt;<br>                � � &lt;bindRule constituent=&quot;img1&quot; rule=&quot;rUno&quot;/&gt;<br>�                � &lt;bindRule constituent=&quot;img2&quot; rule=&quot;rDos&quot;/&gt;</div>

<div><br></div><div>&lt;!-- �definimos una regla por defecto por si no se ejecuta ninguna regla definida anteriormente --&gt;<br>�                � &lt;defaultComponent component=&quot;img2&quot;/&gt;<br><br>                        �                &lt;media id=&quot;img1&quot; src=&quot;img1.jpg&quot; descriptor=&quot;descImg&quot;/&gt;<br>

�                &lt;media id=&quot;img2&quot; src=&quot;img2.jpg&quot; descriptor=&quot;descImg&quot;/&gt;<br>                                        <br>                &lt;/switch&gt;</div><div><br></div><div><br></div><div>&lt;/body&gt;</div><div><br></div><div>A tener en cuenta:</div>

<div>�- Cada vez que se cambie el valor de la variable sobre la cual se utilizan las reglas (en este caso &quot;imagenSeleccionada&quot;), se debe parar e iniciar de nuevo el switch, para que el switch pueda leer los nuevos valores y compararlos.</div>

<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">El 7 de mayo de 2013 08:51, Leo <span dir="ltr">&lt;<a href="mailto:lisasmendi@lifia.info.unlp.edu.ar" target="_blank">lisasmendi@lifia.info.unlp.edu.ar</a>&gt;</span> escribi�:<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Para usar el switch necesitas dos cosas, definir las reglas y definir el switch que usa esas reglas.<br>

</div><div><br></div><div>en el head del documento definis las reglas:</div><div><br></div><div><br>
</div><div>        &lt;head&gt;<br>                <br>                &lt;!--Se definen las reglas sobre las que se tomar�n las decisiones<br>                -        id: identificador<br>                -        var: nombre de la variable global<br>                -        comparator: &lt; | &gt; |&lt;= | = | &gt;=    <br>


                -        value: valor que se usa para validaci�n de la regla<br>                --&gt;        <br>                &lt;ruleBase&gt;<br>                        &lt;rule id=&quot;rIngles&quot; var=&quot;idioma&quot; comparator=&quot;eq&quot; value=&quot;en&quot;/&gt;<br>                        &lt;rule id=&quot;rEspa�ol&quot; var=&quot;idioma&quot; comparator=&quot;eq&quot; value=&quot;sp&quot;/&gt;<br>


                &lt;/ruleBase&gt;<br><br>                &lt;regionBase&gt;<br>�        �...<br>                &lt;/regionBase&gt;<br><br>        <br>                &lt;descriptorBase&gt;<br>                        </div><div><br></div><div>�&lt;/descriptorBase&gt;<br>                        <br><br>                &lt;connectorBase&gt;<br>                        &lt;importBase documentURI=&quot;conectores.ncl&quot; alias=&quot;conectores&quot;/&gt;<br>


                &lt;/connectorBase&gt;<br><br><br>        &lt;/head&gt;</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">El 3 de mayo de 2013 16:38, Franco H <span dir="ltr">&lt;<a href="mailto:gusamh@gmail.com" target="_blank">gusamh@gmail.com</a>&gt;</span> escribi�:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Alguien me puede dar un ejemplo completo sobre rule y Switch, estoy intentando hacer un menu con videos pero no me sale y la idea es utilizar switch y rule.<div>


<br></div><div>Gracias.<span><font color="#888888"><br clear="all"><div><br>
</div>-- <br><div>Analista Funcional - Poder Judicial de la Naci�n</div><div>Asistente - UNPA</div>AdeS.�Herrera Franco
</font></span></div></div>
<br></div></div>__________________________________________Lista de correo <a href="mailto:Ginga-argentina@lists.ourproject.org" target="_blank">Ginga-argentina@lists.ourproject.org</a><br>
cambiar suscripci&amp;#243;n: <a href="https://lists.ourproject.org/cgi-bin/mailman/listinfo/ginga-argentina" target="_blank">https://lists.ourproject.org/cgi-bin/mailman/listinfo/ginga-argentina</a><br>
Sitio web: <a href="http://comunidad.ginga.org.ar" target="_blank">http://comunidad.ginga.org.ar</a><br>
Wiki: <a href="http://wiki.ginga.org.ar" target="_blank">http://wiki.ginga.org.ar</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br><div dir="ltr">Saludos Leo<br></div>
</font></span></div>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div dir="ltr">Saludos Leo<br></div>
</font></span></div>
<br>__________________________________________Lista de correo <a href="mailto:Ginga-argentina@lists.ourproject.org">Ginga-argentina@lists.ourproject.org</a><br>
cambiar suscripci&amp;#243;n: <a href="https://lists.ourproject.org/cgi-bin/mailman/listinfo/ginga-argentina" target="_blank">https://lists.ourproject.org/cgi-bin/mailman/listinfo/ginga-argentina</a><br>
Sitio web: <a href="http://comunidad.ginga.org.ar" target="_blank">http://comunidad.ginga.org.ar</a><br>
Wiki: <a href="http://wiki.ginga.org.ar" target="_blank">http://wiki.ginga.org.ar</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Analista Funcional - Poder Judicial de la Naci�n</div><div>Asistente - UNPA</div>AdeS.�Herrera Franco
</div>