handler: error in statement
mfstuart
mfstuart at cox.net
Wed Jan 16 11:28:10 EST 2008
So here's the exact RunRev error message:
Type - Handler: error in statement
Object - Results
Line - go card "EditRecord" of stack "names"
Hint - mouseDoubleUp
When I click the "Script" button from the RunRev Errors dialog box, it
hilights the following part of the script...
go card "EditRecord" of stack "names"
And I am using the global gRecord statement.
On the "EditRecord" card, I have the following scripts:
global dbConnID,gRecord
on openCard
getRecord
setFields
end openCard
on closeStack
--no script here
end closeStack
on getRecord
if gRecord is a number then
put "SELECT NameID,FirstName,LastName,Address,City,State,ZipCode,PhoneNo
FROM subprimeNames WHERE NameID = " & gRecord into rSQL
put revDataFromQuery(,,dbConnID,rSQL) into theRecord
set itemDel to comma
put item 1 of theRecord into vNameID
put item 2 of theRecord into vFirstName
put item 3 of theRecord into vLastName
put item 4 of theRecord into vAddress
put item 5 of theRecord into vCity
put item 6 of theRecord into vState
put item 7 of theRecord into vZipCode
put item 8 of theRecord into vPhoneNo
end if
end getRecord
on setFields
put vNameID into fld "fNameID"
put vFirstName into fld "fFirstName"
put vLastName into fld "fLastName"
put vAddress into fld "fAddress"
put vCity into fld "fCity"
put vState into fld "fState"
put vZipCode into fld "fZipCode"
put vPhoneNo into fld "fPhoneNo"
end setFields
So what causes RunRev to stop and raise the error?
Regards,
Mark Stuart
mfstuart wrote:
>
> Hi all,
>
> This error (see subject) happens when I double-click on a table field of
> data that has an "on mouseDoubleUp" in it.
> The idea of the script is to get the ID value (item 1) and place it into a
> global variable.
> Then go to a card to edit the record.
>
> Here's the RunRevScript:
>
> on mouseDoubleUp
> set the itemDel to tab
> put item 1 of the selectedText into gRecord
> go card "EditRecord" of stack "names"
> end mouseDoubleUp
>
> Anything wrong with this script?
> 3rd line causes the error.
>
> With some testing, I did the following to get this to break - to cause the
> above error:
> Created a New Stack
> placed a button on the card
> created a card named: "EditRecord"
> added a script for the button: "on mouseUp"
> script:
> go card "EditRecord"
> That's it, and it works.
>
> As soon as I put this script (go card...) into the table field and use it
> there, the above error occurs.
> Any help is much appreciated.
>
> Thanx,
> Mark Stuart
>
>
--
View this message in context: http://www.nabble.com/handler%3A-error-in-statement-tp14860651p14884445.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list