[Ginga-argentina] consulta sobre LUA

leo lisasmendi at lifia.info.unlp.edu.ar
Tue Apr 3 17:33:26 CEST 2012


Hola daniel o nico, si se comenta la linea de lua donde se carga la imagen,
funciona el código.
Pregunta, tenés permisos para acceder a esa imagen?


El 3 de abril de 2012 11:18, Daniel Soria <dansoria at gmail.com> escribió:

> A ver. LISTA TECNICA.
> Este joven ha hecho esta consulta y no obtiene respuesta.
> Revise el codigo parece bien, pero el tema de lua aun no lo he revisado.
> Si alguien quiere ser tan amable, gracias en nombre del joven nicolas y el
> mi propio.
> Daniel Soria
>
> ---------- Forwarded message ----------
> From: Nicolas Ignacio Roldan <niko_cbes at hotmail.com>
> Date: 2012/4/2
> Subject: RE: Hola Daniel! consulta Ginga =)
> To: Daniel Soria GINGA <dansoria at gmail.com>
>
>
>  Hola *Daniel*!
>
> Mi consulta es con respescto a Lua.
> Tengo la maquina virtual de Ginga sobre Kubuntu.
> Los archivos .ncl los ejecuta bien.
> Ahora cuando quiero agregar dependencias a un archivo .lua   ya no
> funciona bien.
>
>
> La Aplicacion corresponde a un punto del Test Suite 1.2.0---->
> http://tvd.lifia.info.unlp.edu.ar/ginga.ar/index.php/testsuite-menu )
> (La aplicacion muestra sobre un fondo azul:
>
> a la izquierda y de arriba hacia abajo:
>
> -un rectangulo vacio y de borde blanco
>
> - un rectangulo blanco lleno
>
> - 16 lineas horizontales de color verde cuya opacidad dismi-
>
> nuye de arriba a abajo
>
> a la derecha y de arriba hacia abajo:
>
> - un logotipo
>
> - textos dibujados utilizando distintos tama~nos, estilos y co-
>
> lores de fuentes. )
>
>
>
>
>
> Me explico mejor ... el código ncl es:
>
> ------------------------- el NCL ----------------------------------------
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <ncl id="canvas" xmlns="http://www.ncl.org.br/NCL3.0/EDTVProfile">
>     <head>
>         <regionBase>
>             <region id="reg" width="100%" height="100%" left="0%" top="0%"
> />
>         </regionBase>
>         <descriptorBase>
>             <descriptor id="desc" region="reg"/>
>         </descriptorBase>
>     </head>
>     <body>
>         <port id="pLua" component="lua" />
>         <media id="lua" src="30_canvas.lua" descriptor="desc" />
>     </body>
> </ncl>
>
> ----------------------------------------------------------------------------
>
>
>
>
> --------------------------- Lua -----------------------------------------
> --background
> canvas:attrColor('navy')
> canvas:clear()
>
> --top left
> canvas:attrColor('white')
> canvas:drawRect('frame', 50, 50, 250, 100)
> canvas:drawRect('fill', 50, 200, 250, 100)
>
> -- top left
> for i=0, 15 do
>     canvas:attrColor(0, 255, 0, 255 - (i * 16) )
>     local y = 50 + (i * 10)
>     canvas:drawLine(525, y, 680, y)
> end
>
> -- right
> image = canvas:new('../resources/images/logo.jpg')
> canvas:compose(325, 50, image)
>
> local colors = {"white", "black", "silver", "gray", "red" , "maroon" ,
> "fuchsia", "purple", "lime", "green", "yellow", "olive", "blue", "navy",
> "aqua", "teal"}
> local fontWeight = {"normal", "bold", "italic"}
> local fontFamily = {"Tiresias", "Tiresias"}
>
> for i=0, 7 do
>     for j=0,2 do
>         local ff = ''
>         if i < 4 then
>             ff = fontFamily[1]
>         else
>             ff = fontFamily[2]
>         end
>         local fw = fontWeight[j + 1]
>         local offset = i * 2 + j
>         canvas:attrFont(ff, 14 + offset, fw)
>         canvas:attrColor(colors[i * 2 + (j % 2) + 1])
>         canvas:drawText(40 + 225 * j , 310 + 30 * i, ff .. ' ' .. fw)
>     end
> end
>
> -- flush
> canvas:flush()
>
>
> ---------------------------------------------------------------------------
>
> y el Error al compilar dice esto:
>
> FormatterMultiDevice::getFormatterLayout for '-1/canvas/lua/desc'
> FormatterScheduler::runAction acquiring player for '-1/canvas/lua/desc'
> TimeStamp: 0.258
> ApplicationPlayerAdapter::ApplicationPlayerAdapter(0x9958248)
> ApplicationPlayerAdapter::hasPrepared return false because object = '0'
> and player = '0'
> ApplicationPlayerAdapter::createPlayer(0x9958248) for
> '/root/Desktop/TestSuite-1.2.0/Aplicaciones - TestSuite Ginga.ar
> 1.2.0/lua/30_canvas.lua'
> FormatterPlayerAdapter::createPlayer for
> '/root/Desktop/TestSuite-1.2.0/Aplicaciones - TestSuite Ginga.ar
> 1.2.0/lua/30_canvas.lua' object = '-1/canvas/lua/desc' objectDevice = '0'
> FormatterMultiDevice::getFormatterLayout for '-1/canvas/lua/desc'
> FormatterRegion::prepareOutputDisplay '0x9ad9d18' created
> LuaPlayer::setCurrentScope ''
> FormatterMultiDevice::getFormatterLayout for '-1/canvas/lua/desc'
> PresentationContext::getPropertyValue prop 'service.currentKeyMaster' has
> a NULL value
> (!) Direct/Interface: Unable to dlopen
> `/usr/local/lib/directfb-1.4-0/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_mpeg2.so'!
>     -->
> /usr/local/lib/directfb-1.4-0/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_mpeg2.so:
> undefined symbol: direct_assumption
> (!) Direct/Interface: Unable to dlopen
> `/usr/local/lib/directfb-1.4-0/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_bmp.so'!
>     -->
> /usr/local/lib/directfb-1.4-0/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_bmp.so:
> undefined symbol: direct_config
> (*) Direct/Interface: Loaded 'JPEG' implementation of
> 'IDirectFBImageProvider'.
> ComponentManager::releaseComponentFromObject 'ImageProvider'
> DFBFontProvider.cpp <96>:
>     (!) [10402:    0.000] --> Caught signal 11 (at (nil), invalid address)
> <--
>  (!!!)  *** WARNING [still objects in 'Window Pool'] *** [object.c:241 in
> fusion_object_pool_destroy()]
>  (!!!)  *** WARNING [still objects in 'Layer Region Pool'] ***
> [object.c:241 in fusion_object_pool_destroy()]
>  (!!!)  *** WARNING [still objects in 'Layer Context Pool'] ***
> [object.c:241 in fusion_object_pool_destroy()]
>  (!!!)  *** WARNING [still objects in 'Surface Pool'] *** [object.c:241 in
> fusion_object_pool_destroy()]
> Abortado
>
>
> ... si ejecuto un codigo lua simple como :
>
> canvas:attrColor('blue')
> canvas:clear()
> canvas:flush()
>
> No se produce ningun Error. [image: Confundido]
>
>
>
> Podra ser alguna libreria que me falte de Lua?
> ... o nose que puede ser  :?
>
> desde ya Muchas Gracias Daniel!!!!!!  [image: Guiño]
> Saludos!
> *nico*
>
>
>
>
>
> __________________________________________Lista de correo
> Ginga-argentina at lists.ourproject.org
> cambiar suscripci&#243;n:
> https://lists.ourproject.org/cgi-bin/mailman/listinfo/ginga-argentina
> Sitio web: http://comunidad.ginga.org.ar
> Wiki: http://wiki.ginga.org.ar
>
>


-- 
Saludos leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ourproject.org/pipermail/ginga-argentina/attachments/20120403/59880f4e/attachment.htm 


More information about the Ginga-argentina mailing list