Source language: Translate to:

Image object - var problem

Questions or information that don't quite fit anywhere else

Moderator: Neosoft Support

Image object - var problem

Postby Guest » Mon Nov 29, 2004 4:26 pm

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.

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.

Postby Guest » Mon Nov 29, 2004 4:41 pm

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.

Postby Guest » Tue Nov 30, 2004 6:58 am

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)

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

Postby Guest » Tue Nov 30, 2004 7:25 am

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

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"

and let us know if this change works better?

-- Sam

Postby Neosoft Support » Wed Dec 01, 2004 11:48 am

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.
NeoSoft Support
Neosoft Support
NeoSoft Team
Posts: 5621
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Guest » Wed Dec 01, 2004 6:52 pm

Thank you Sam, and thank you NeoSoft Support.

Return to Misc. Questions and Information

Who is online

Users browsing this forum: No registered users and 0 guests