<div>Hola nico, proba volviendo a modificar el valor de la variable 
<b>&quot;service.currentKeyMaster&quot; </b> con el valor de &quot;appFocus&quot; cada vez que inicias el main.lua.</div><div><br></div><div class="gmail_quote">El 11 de abril de 2012 15:31, Nicolas Ignacio Roldan <span dir="ltr">&lt;<a href="mailto:niko_cbes@hotmail.com">niko_cbes@hotmail.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 dir="ltr">
<b>Buenas Gente de Ginga!</b><br>
Es una consulta con respecto a LUA y su tratamiento.<br>Mi objetivo es lograr que  cuando presiono el boton &quot;INFO&quot; se muestre una &lt;media &gt; que se carga desde un archivo &quot;.lua&quot;( en donde mostraria infomacion de acuerdo a la tecla que se presione [roja,amarillo,etc]);  luego si presiono el boton &quot;MENU&quot; vuelva a la pantalla anterior. y asi sucesivamente... la iteracion con el usuario seria  que presione &quot;INFO&quot; y &quot;MENU&quot;, asi a cada rato.<br>
bueno.... la primera vez anda bien, presiono &quot;INFO&quot; y me aparece la informacion que carga desde &quot;main.lua&quot; y puedo presionar el &quot;ROJO&quot;,&quot;AMARILLO&quot;,&quot;VERDE&quot; y &quot;AZUL&quot; para que me muestre la informacion ... Pero si presiono &quot;MENU&quot; (para regresar) y luego de nuevo &quot;INFO&quot;... ya no me muestra ni me permite la interaccion con el &quot;main.lua&quot;<br>

<br>Tengo el siguiente codigo (Trabajo con 3 archivos : main.ncl/metodos.ncl/main.lua)<br><br><br><br>
<font style="font-size:12pt" size="3"><b>------------- el main.ncl ----------------------------</b></font><br>
<br><br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;<br>&lt;ncl id=&quot;main&quot; xmlns=&quot;<a href="http://www.ncl.org.br/NCL3.0/EDTVProfile" target="_blank">http://www.ncl.org.br/NCL3.0/EDTVProfile</a>&quot;&gt;<br>
<br>    &lt;head&gt;<br>        &lt;regionBase&gt;<br>          <b>  &lt;region id=&quot;scriptLua&quot; width=&quot;50%&quot; height=&quot;80%&quot; left=&quot;0%&quot; top=&quot;0%&quot; zIndex=&quot;3&quot; /&gt;</b><br>
            &lt;region id=&quot;idBotonInfo&quot; right=&quot;2%&quot; bottom=&quot;2%&quot; width=&quot;50&quot; height=&quot;50&quot; zIndex=&quot;3&quot;  /&gt;<br>            &lt;region id=&quot;idBotonReturn&quot; right=&quot;2%&quot; bottom=&quot;2%&quot;  width=&quot;50&quot; height=&quot;50&quot; zIndex=&quot;3&quot;  /&gt;<br>
         &lt;/regionBase&gt;<br>        <br><br>        &lt;descriptorBase&gt;<br>        <br>           <b> &lt;descriptor id=&quot;descLua&quot; region=&quot;scriptLua&quot; focusIndex=&quot;appFocus&quot;/&gt;</b><br>            &lt;descriptor id=&quot;descImagenInfo&quot; region=&quot;idBotonInfo&quot;/&gt;<br>
            &lt;descriptor id=&quot;descImagenReturn&quot; region=&quot;idBotonReturn&quot; /&gt;        <br>                     <br>        &lt;/descriptorBase&gt;<br>        <br><br>        &lt;connectorBase&gt;<br>           <b> &lt;importBase documentURI=&quot;metodos.ncl&quot; alias=&quot;metodo&quot;/&gt;</b><br>
        &lt;/connectorBase&gt;<br>    <br>    &lt;/head&gt;<br><br><br>    &lt;body&gt;        <br>        <br>        &lt;port id=&quot;pInfo&quot; component=&quot;imgBotonInfo&quot;/&gt;<br>        <br>       <b> &lt;media id=&quot;foco&quot; type=&quot;application/x-ginga-settings&quot;&gt;<br>
            &lt;property name=&quot;service.currentKeyMaster&quot; value=&quot;appFocus&quot;/&gt;<br>        &lt;/media&gt;</b><br>        <br>       <b> &lt;media id=&quot;LuaPresentation&quot; src=&quot;lua/main.lua&quot; descriptor=&quot;descLua&quot; /&gt;</b><br>
        &lt;media id=&quot;imgBotonInfo&quot; src=&quot;Imagen/info.png&quot; descriptor=&quot;descImagenInfo&quot;/&gt;<br>        &lt;media id=&quot;imgBotonReturn&quot; src=&quot;Imagen/menu.png&quot; descriptor=&quot;descImagenReturn&quot;/&gt;<br>
   <br>        <br>        &lt;link xconnector=&quot;metodo#onBeginEndMenu&quot;&gt;<br>            &lt;bind role=&quot;onSelection&quot; component=&quot;imgBotonInfo&quot;&gt;<br>                &lt;bindParam name=&quot;oSetTecla&quot; value=&quot;INFO&quot;/&gt;<br>
            &lt;/bind&gt;<br>            &lt;bind role=&quot;abort&quot; component=&quot;imgBotonInfo&quot;/&gt;<br>           <b> &lt;bind role=&quot;start&quot; component=&quot;LuaPresentation&quot;/&gt;</b><br>        &lt;/link&gt;<b><br>
       </b> &lt;link xconnector=&quot;metodo#onBeginEndMenu&quot;&gt;<br>            &lt;bind role=&quot;onSelection&quot; component=&quot;imgBotonReturn&quot;&gt;<br>                &lt;bindParam name=&quot;oSetTecla&quot; value=&quot;MENU&quot;/&gt;<br>
            &lt;/bind&gt;<br>            &lt;bind role=&quot;start&quot; component=&quot;imgBotonInfo&quot;/&gt;<br>           <b> &lt;bind role=&quot;abort&quot; component=&quot;LuaPresentation&quot;/&gt;</b><br>        &lt;/link&gt;<br>
      <br>    &lt;/body&gt;<br>&lt;/ncl&gt;<br><br>-------------------------------------------------------------------------------------------------<br><br><br><font style="font-size:12pt" size="3"><b>------------------ metodos.ncl--------------------------------------</b></font><br>
<br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;<br>&lt;!-- Generated by NCL Eclipse --&gt;<br>&lt;ncl id=&quot;metodos&quot; xmlns=&quot;<a href="http://www.ncl.org.br/NCL3.0/EDTVProfile" target="_blank">http://www.ncl.org.br/NCL3.0/EDTVProfile</a>&quot;&gt;<br>
    &lt;head&gt;<br>        &lt;connectorBase&gt;<br>            <br>                &lt;causalConnector id=&quot;onBeginStart&quot;&gt;<br>                    &lt;simpleCondition role=&quot;onBegin&quot; /&gt;<br>                    &lt;simpleAction role=&quot;start&quot;/&gt;<br>
                &lt;/causalConnector&gt;<br>                <br>                &lt;causalConnector id=&quot;onEndStop&quot;&gt;<br>                    &lt;simpleCondition role=&quot;onEnd&quot;/&gt;<br>                    &lt;simpleAction role=&quot;stop&quot;/&gt;<br>
                &lt;/causalConnector&gt;<br>                   <br>           <b>     &lt;causalConnector id=&quot;onBeginEndMenu&quot;&gt;<br>                    &lt;connectorParam name=&quot;oSetTecla&quot;/&gt;<br>                    &lt;simpleCondition role=&quot;onSelection&quot; key=&quot;$oSetTecla&quot;/&gt;<br>
                    &lt;compoundAction operator=&quot;seq&quot;&gt;<br>                        &lt;simpleAction role=&quot;start&quot; qualifier=&quot;seq&quot;  max=&quot;unbounded&quot;/&gt;<br>                        &lt;simpleAction role=&quot;abort&quot; qualifier=&quot;seq&quot;  max=&quot;unbounded&quot;/&gt;<br>
                    &lt;/compoundAction&gt;<br>                &lt;/causalConnector&gt;</b><br><br><br>        &lt;/connectorBase&gt;<br>    &lt;/head&gt;<br>    &lt;body&gt;<br><br>    &lt;/body&gt;<br>&lt;/ncl&gt;<br>------------------------------------------------------------------------------------------------<br>
<br><b><font style="font-size:12pt" size="3">------------------------- main.lua ----------------------------------</font></b><br><br>function handler(evt)<br><br>local titulo=&#39;&#39;<br>local color=&#39;&#39;<br><br>limpiar()<br>
<br>if evt.class==&#39;key&#39; and evt.type==&#39;press&#39; then <br>        <br>        if     evt.key == &#39;RED&#39; or evt.key == &#39;F1&#39; then      <br>            titulo=&#39;PILOTOS&#39;<br>            color=&#39;red&#39;    <br>
            leyendaTitulo(color,titulo)          <br>        elseif evt.key == &#39;BLUE&#39; or evt.key==&#39;F4&#39; then<br>             titulo=&#39;PISTA&#39;<br>             color=&#39;blue&#39;  <br>             leyendaTitulo(color,titulo)<br>
        elseif evt.key == &#39;YELLOW&#39; or evt.key==&#39;F3&#39; then<br>              titulo=&#39;INFORMACION&#39;<br>              color=&#39;yellow&#39;  <br>              leyendaTitulo(color,titulo)<br>        elseif evt.key == &#39;GREEN&#39; or evt.key==&#39;F2&#39; then <br>
              titulo=&#39;CLIMA&#39;<br>              color=&#39;green&#39;        <br>              leyendaTitulo(color,titulo)<br>        end <br>    end    <br>end<br><br><br>function leyendaTitulo(color,titulo)<br>    <br>
    canvas:attrColor(color)<br>    canvas:attrFont(&#39;vera&#39;,30, &#39;bold&#39;)<br>    canvas:drawText(10, 10, titulo)<br>    canvas:flush()    <br>    <br>end<br><br><br>function limpiar()<br>    <br>    local leyendaTitulo=canvas:new(&#39;Imagen/FondoAzulDegradadoCentro.png&#39;)<br>
    canvas:compose(0,0,leyendaTitulo)<br>    <br>end<br><br>event.register(handler)<br>---------------------------------------------------------------------------------------<br><br><br>Espero que no sea una consulta engorrosa... estoy seguro que es algo que no estoy haciendo bien<img style="border-style:none;vertical-align:text-bottom" title="Confundido" alt="Confundido" height="19" width="19"><br>
Desde ya muchas Gracias!<br>saludos<br><font style="font-size:12pt" size="3"><b>nico</b></font><br>                                               </div></div>
<br>__________________________________________Lista de correo <a href="mailto:Ginga-argentina@lists.ourproject.org">Ginga-argentina@lists.ourproject.org</a><br>
cambiar suscripció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"><br>-- <br>Saludos leo<br><br>