Page 1 of 1

Image object - var problem

PostPosted: Mon Nov 29, 2004 4:26 pm
by Guest
Hi!
When i use a var to locate the file in the image object, it works fine, unless the image filename use spaces: it don't work in my PC. I don' t know if is it only my problem, or is it a small bug from neobook.

Solution:
To change the spaces used in the filename by another character

' ' changed by '_'

...and with this small I passed about one hour trying discovering the problem  :roll:

I don't know if this was discussed before. If so, please forgive my insistence.

PostPosted: Mon Nov 29, 2004 4:41 pm
by Guest
Hello Leos,

Using [var] for the Image File in a Picture/Graphic File object and then executing

Code: Select all
SetVar "[var]" "c:\path\My Pictures\Admit One Large.jpg"

(there are three spaces in the full path/filename) works in my 4.1.3a version of NeoBook.

PostPosted: Tue Nov 30, 2004 6:58 am
by Guest
Hi, Sam.

Thank you for your interest.

Yes, it works sometimes... but the problem is that sometimes work, sometimes not work..

I do something like that:

[path][rua_imagem]_Coimbra - 20041101 - Parque e Mondego 001.jpg


SetVar "[rua_imagem]" "1"

while "[rua_imagem]<10"
setvar "[rua_imagem]" "[rua_imagem]+1"
delay "1000" (to see the image)
endwhile

don't work. (sometimes don't work)

if you change the 'spaces' in the image filename by '_', ok it work

.. RefreshObject don't work, too

-and more strange: if you put two image objects (a copy), maybe one work, the other don't...


I think that maybe is a little problem with "setvar" command

Some of this problem can be resolved changing setvar by strreplace (when you can) ( it happens to me trying to import data from RonMarie plugins to my neopub, ...)

My conclusion: i don't know if this is my problem (using nb spanish, winXP pt...) (i had some strange errors in the past, some of them caused by this "salada mixing" of software)

I'm waiting for my next update to Neobook 5 English version

PostPosted: Tue Nov 30, 2004 7:25 am
by Guest
May I suggest that you replace

Code: Select all
[path][rua_imagem]_Coimbra - 20041101 - Parque e Mondego 001.jpg

in the picture object with

Code: Select all
[picture]

and change your loop to

Code: Select all
setvar "[rua_imagem]" "1"
while "[rua_imagem]" "<" "10"
    setvar "[picture]" "[path][rua_imagem]_Coimbra - 20041101 - Parque e Mondego 001.jpg"
    delay "1000"
    setvar "[rua_imagem]" "[rua_imagem]+1"
endwhile

and let us know if this change works better?

-- Sam

PostPosted: Wed Dec 01, 2004 11:48 am
by Neosoft Support
Sam's method is correct.

Each time a variable is changed, NeoBook sends a message to the publication's objects. Since your picture object uses multiple variables, one of them will be periodically out of sync with the other. This is likely the cause of the problem you described. Replacing the multiple variables with a single variable will eliminate the sync problem and insure that the image load process works 100% of the time.

PostPosted: Wed Dec 01, 2004 6:52 pm
by Guest
Thank you Sam, and thank you NeoSoft Support.