Page 1 of 1

Updating a Card

Posted: Fri Jun 08, 2012 10:10 am
by Jayare
Hello everyone,

i have a card, that has to be updated every time, the user gets to this card. Now i have tried prOpenCard and OpenCard, but this only runs once when the card is opened.

Is there any alternative to my code????

Greets
Jochen

Re: Updating a Card

Posted: Fri Jun 08, 2012 10:37 am
by jmburnod
Hi Jochen,

look at "pendingmessages" in the LC dictionary

Best regards

Jean-Marc

Re: Updating a Card

Posted: Fri Jun 08, 2012 11:11 am
by Klaus
Hi Jochen,
Jayare wrote:Hello everyone,
i have a card, that has to be updated every time, the user gets to this card. Now i have tried prOpenCard and OpenCard, but this only runs once when the card is opened
"pre-/opencard" seems to be the best place to do so!
What and where did you script?
Jayare wrote:Is there any alternative to my code?
Hm, can't tell without looking at your actual code! 8)


Best

Klaus

Re: Updating a Card

Posted: Fri Jun 08, 2012 2:25 pm
by dunbarx
Are you asking if it is possible to have a continuously running handler whenever the card is open? So that certain processes are executed at set intervals?

This is possible, with the "send in time" variant of the "send' command.

Usually such processes are handled whenever the user actually interfaces with card objects, for example, editing a field or moving an object. In other words, local scripts generally manage all user interaction. But your idea is interesting all by itself. Please write back with just a little more information about what you want to do.

Craig Newman

Re: Updating a Card

Posted: Fri Jun 08, 2012 2:34 pm
by Jayare
Hello everybody,

thanks for your replies. I want to run a script when the user gets to a specific card or stack.

The user can put in up to five articles in a sql database. Then my user gets to another stack where he can push buttons which are named like the articles in the first stack.

This operation is running:

databaseConnect_1  
put getDatabaseID() into tDatabaseID
revExecuteSQL tDatabaseID, tSQL
put databaseGetContactDetails() into button "kundennamen"
put databaseGetArtikelDetails() into tArtikel
put the number of lines of tArtikel into tlines
buttonaktualisieren
put line 1 of tArtikel into tArtikel1
set the label of button "Button1" to tArtikel1
put line 2 of tArtikel into tArtikel1
set the label of button "Button2" to tArtikel1
put line 3 of tArtikel into tArtikel1
set the label of button "Button3" to tArtikel1
put line 4 of tArtikel into tArtikel1
set the label of button "Button4" to tArtikel1
put line 5 of tArtikel into tArtikel1
set the label of button "Button5" to tArtikel1

I hope it gets clearer now.

Greets Jochen

Re: Updating a Card

Posted: Sun Jun 10, 2012 4:13 pm
by BvG
That should be either openCard, preOpencard openStack or preOpenStack, look them up in the dictionary, they do exactly what you want.