Updating a Card
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Updating a Card
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
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
Hi Jochen,
look at "pendingmessages" in the LC dictionary
Best regards
Jean-Marc
look at "pendingmessages" in the LC dictionary
Best regards
Jean-Marc
https://alternatic.ch
Re: Updating a Card
Hi Jochen,
What and where did you script?
Best
Klaus
"pre-/opencard" seems to be the best place to do so!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
What and where did you script?
Hm, can't tell without looking at your actual code!Jayare wrote:Is there any alternative to my code?

Best
Klaus
Re: Updating a Card
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
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
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
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
That should be either openCard, preOpencard openStack or preOpenStack, look them up in the dictionary, they do exactly what you want.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode