Thank you troy. I found the mistake. As a friend use to say "it was between
the chair and the keyboard". When I paste the script I noticed the problem.
It was the "else" commented at the end. Anyway I send you the script. Thanks
for your help and illumination. ;o)
Hermann
on actualizaArticulos me
global gTablaApparel, gTablaFootwear, gTablaHardware
global gSegmentoElegido, gDivisionElegida, gColeccionElegida,
gGeneroElegido
global gModelosEnLaColeccionElegida, gContadorDeLineas, gContadorDeModelos
global gNumeroDeArticulos, gModelosEnLaColeccionElegida, gModeloActual
global gImagenArticuloAcutal, gSpriteImagenArticulo,
gNumeroDeArticuloActual
global gCodigoDelArticuloActual
global gRutaDeLasImagenes
case gDivisionElegida of
"Apparel":
mGo(gTablaApparel, gNumeroDeArticuloActual)
put mGetField(gTablaApparel, "Codigo") into member "cajaCodigo"
"Footwear":
mGo(gTablaFootwear, gNumeroDeArticuloActual)
put mGetField(gTablaFootwear, "Codigo") into member "cajaCodigo"
"Hardware":
mGo(gTablaHardware, gNumeroDeArticuloActual)
put mGetField(gTablaHardware, "Codigo") into member "cajaCodigo"
end case
codigoImagen = member("cajaCodigo").text
a = member("cajaCodigo").char.count
if a=6 then
imagenDelArticulo = gRutaDeLasImagenes & codigoImagen & ".jpg"
else --Si el valor es 5
imagenDelArticulo = gRutaDeLasImagenes & "0" & codigoImagen & ".jpg"
end if
if dosIsFileExist(imagenDelArticulo) then
--sprite(2).member = member.filename(imagenDelArticulo)
member("imagen").fileName = imagenDelArticulo
--else
imagenNoDisponible = gRutaDeLasImagenes & "imagenNoDisponible.jpg"
--sprite(2).member = member.filename(imagenNoDisponible)
member("imagen").fileName = imagenNoDisponible
end if
end
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Troy Rollins
Sent: Tuesday, June 08, 2004 7:43 PM
To: [EMAIL PROTECTED]
Subject: Re: <lingo-l> Swapping images problem
On Jun 8, 2004, at 11:51 PM, Hermann Brandi wrote:
> My problem is that when the image swaps returns to
> the original one almost immediately. Why is happening this? I'm using
> this
> script as part of the larger one:
>
> if dosIsFileExist(productImage) then
> member(3).filename = productImage
> else
> member(3).filename = noImage
> end if
I'm not sure that this tells us enough. Is there a frame script
involved somewhere? What is calling this handler? You said this was
part of a much larger script... have you tried setting a breakpoint to
determine if this script is getting called without your being aware of
it?
*Something* is almost certainly resetting your values. From what you've
offered, it *sounds* like it is due to an exitframe handler or the
like.
--
Troy
RPSystems, Ltd.
http://www.rpsystems.net
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL
PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping
with programming Lingo. Thanks!]