Welcome! Log In Create A New Profile

Advanced

Problem showing data in a Looper (WD 12)

Posted by Victoria Caballero 
Victoria Caballero
Problem showing data in a Looper (WD 12)
August 26, 2008 12:36PM
Hi all,
I've a problem with a looper I've created in my page.
This is a looper filled with a direct access to a file (not manually filed). Inside of the Looper I have 2 static controls (STC_SUBJECT_NEWS and STC_TEXT_NEWS) where I want to show some information according with the language selected by the user.
In the file used to fill the looper I've 3 fields with the same text in 3 different languages.
So in the Row display of Looper (server) I've this code:

SWITCH Nation()
CASE 6:
STC_SUBJECT_NEWS = Looper.ATT_SUBJECT_DANISH // Danish
STC_TEXT_NEWS = Looper.ATT_TEXT_DANISH // Danish
CASE 3:
STC_SUBJECT_NEWS = Looper.ATT_SUBJECT_ENGLISH // English
STC_TEXT_NEWS = Looper.ATT_TEXT_ENGLISH // English
CASE 7:
STC_SUBJECT_NEWS = Looper.ATT_SUBJECT_SPANISH // Spanish
STC_TEXT_NEWS = Looper.ATT_TEXT_SPANISH // Spanish
END

The problem is that when I see the looper in the page the text showed in every row is exactly the same, doesn't change.??? The text changes according with the language but not according with the row.
Could be some refreshing problem or is something wrong in my code?
I've attached an image showing the problem.



Any help or sugestion will be apreciated. Thanks in advance.
Regards!!

Victoria Caballero
Copenhague
Denmark

Piet van Zanten
Re: Problem showing data in a Looper (WD 12)
August 26, 2008 01:08PM
Hi Victoria,

I've had many problems with loopers too, so I switched to using tables, which are very powerful and versatile in Windev 12.
First, consider using the language when filling the looper, so use the Switch Nation on the LooperAdd and add the correct language right away.
Second, in my experience you should always declare an attribute to address a control, so try using an attribute for the statics.
HTH, best regards,
Piet
Victoria Caballero
Re: Problem showing data in a Looper (WD 12)
August 26, 2008 01:43PM
Hi Piet,
thanks for your response.
I guess I understand your point. But I have a question: where do you fill the Looper?, in the Initialization of the page or in the Initialization of the Looper it self?
I will try to do it like this and see what happens.

Regards


Jeff Graham
Re: Problem showing data in a Looper (WD 12)
August 26, 2008 02:57PM
Hi Victoria,

It seems you are actually using WebDev. Are you using AWP?

I always put the fill processing in the row display process.

Note that AWP does have problems/limitation with loopers. For example, you cannot display images from a memo file on any page but the first and it is very slow.

Piet van Zanten
Re: Problem showing data in a Looper (WD 12)
August 26, 2008 03:18PM
Hi Victoria,

I think Jeff is right, you are using Webdev. (WB 12)
As you could see my answer was based on Windev. I don't know if filling a looper is the same in Webdev (using LooperAddLine)

Best regards,
Piet



Edited 1 time(s). Last edit at 08/26/2008 03:19PM by Piet van Zanten.
Victoria Caballero
Re: Problem showing data in a Looper (WD 12)
August 26, 2008 03:23PM
Hi Jeff,
I'm not using AWP, my project it is a Webdev dynamic project. What is the difference?

Regards.

Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: