Syntax for wait
Posted: Tue Dec 01, 2015 4:31 am
Hi,
I have a command in the stack script that does some checking and if there is an error it sends answer “there is a problemo.” The command is called be several cards in the stack from a preOpenCard handler. The problem is, because it’s call on preOpenCard, the answer dialog shows up before the card is displayed. I tried wait 1 sec but that didn’t work. Would wait until openCard work? I know I could just change to an openCard handler but I wanted to check with the forum first. Any suggestions would be appreciated.
I have a command in the stack script that does some checking and if there is an error it sends answer “there is a problemo.” The command is called be several cards in the stack from a preOpenCard handler. The problem is, because it’s call on preOpenCard, the answer dialog shows up before the card is displayed. I tried wait 1 sec but that didn’t work. Would wait until openCard work? I know I could just change to an openCard handler but I wanted to check with the forum first. Any suggestions would be appreciated.
Code: Select all
command GetContactName pContactID
local tFullName
if isNumber (pContactID) then
put mobileGetContactData(pContactID) into theData[contact]
if the result is an array then
if theData[contact]["middlename"] is empty then
put theData[contact]["firstname"] && theData[contact]["lastname"] into tFullName
else
put theData[contact]["firstname"] && theData[contact]["middlename"] && theData[contact]["lastname"] into tFullName
end if
if theData[contact]["suffix"] is not empty then
put comma && theData[contact]["suffix"] after tFullName
end if
else
wait for something humma humma
answer "The Contact could not be found. Contact may have been deleted."
end if
end if
return tFullName
end GetContactName