Página 1 de 1

Problemas con slideshows

Publicado: 18 Jun 2011 02:52
por Franowar
Buenas! A ver, necesito que me echéis una mano, os cuento por encima:
Estoy creando una app y al pulsar en una imagen, se carga un diálogo y se activa un slideshow en una página, en el diálogo se cargan las opciones de el slideshow de la página anterior (para este código, es decir, el código de los slideshows es el que traía el ejemplo de crear slides el AMS). El problema reside en que una vez se agregan las imágenes y se establece cómo quiere que pasen las diapositivas y demás, pulsa en guardar, le mando a la página anterior, y aparece la presentación pero NO SE VEN LAS DIAPOSITIVAS. Es decir, se queda en negro. Aquí os dejo el código que utilicé por si os sirve:

Código de la imagen para activar y aparecer el diálogo:
DialogEx.Show("Slide", true, nil, nil);
SlideShow.SetVisible("slide_show", true);
Código para guardar las diapositivas y mandar a la página:
-- Setup the global variables that are needed to initiate the slideshow
-- on the next page.

g_bShowTransitions = CheckBox.GetChecked("checkShowTransitions");
g_strResizeMode = Page.GetRadioValue("grpResizeMode", RADIOGROUP_VALUE);

local strTimer = Input.GetText("inputTimer");
g_nTimer = 3000;
if(strTimer ~= "")then
	g_nTimer = 1000 * String.ToNumber(strTimer);
end

-- Get the new list of images.
g_tblSlides = {};
local nNumItems = ListBox.GetCount("lbSlides");
if(nNumItems < 1)then
	Dialog.Message("No Slides Added", "You must add slides to the slideshow first.", MB_OK, MB_ICONSTOP);
	Application.ExitScript();
end

for i = 1, nNumItems do
	g_tblSlides[i] = ListBox.GetItemText("lbSlides",i);
end

-- Go to the slideshow page
slide = true
result = DialogEx.Close(0);
Y por último el código que aparece en la página inicial para cargar la diapositiva (Lo puse en OnShow):
--Slide Show  

if slide then

g_bPlaying = false;

-- Here we need to get the global variables that were set
-- on the Setup page and initialize the SlideShow object.

-- First, get the table of properties from the object
local tblProps = SlideShow.GetProperties("slide_show");

-- Now change the properties that we want to
tblProps.Interval = g_nTimer;
tblProps.Transitions = g_bShowTransitions;
tblProps.ImageFiles = {};

if(g_strResizeMode == "Crop")then
	tblProps.ResizeMode = CROP;
elseif(g_strResizeMode == "Proportional")then
	tblProps.ResizeMode = PROPORTIONAL;
else
	tblProps.ResizeMode = STRETCH;
end

SlideShow.SetProperties("slide_show",tblProps);

for i, strSlide in pairs(g_tblSlides) do
	SlideShow.AddSlide("slide_show",strSlide);
end

-- Start the slideshow
SlideShow.Play("slide_show");
-- Fin de código de Slide
end
A ver si me podéis ayudar :D
Un saludo! :friends:

Re: Problemas con slideshows

Publicado: 18 Jun 2011 09:21
por rafaxplayer
Si no me equivoco el problema esta en  tblProps.ImageFiles = {}; , es una tabla vacía por lo tanto no hay imágenes .

Re: Problemas con slideshows

Publicado: 18 Jun 2011 23:31
por Franowar
rafaxplayer escribió:Si no me equivoco el problema esta en  tblProps.ImageFiles = {}; , es una tabla vacía por lo tanto no hay imágenes .
¿Y cómo puedo solucionarlo entonces?

Re: Problemas con slideshows

Publicado: 19 Jun 2011 00:06
por rafaxplayer
llena la tabla con las imagenes </span>