My guess would be that first time through, the selectedText & selectedLine are not defined. Perhaps clicking the button changed the selection.
Here is how I would start:
put the hilitedLine of fld "users" into theLine put the selectedText of fld "users" into userToDelete
Then ask for confirmation and if confirmed, delete line theLine of fld "users"
Cheers, Sarah
On Tuesday, August 5, 2003, at 02:21 am, Barry Levine wrote:
I have a handler that deletes the selected line of a list (a field called "users"). However, it only seems to work the second time I run it, not the first. Here's the handler:
put the selectedText into userToDelete
put the selectedLine into whatToRemove
answer "Delete " & userToDelete & " from the student list?" with "No" or "Yes"
if it is "No" then
exit mouseUp
else
put word 2 of whatToRemove into theLine -- word 2 is the number of the line
delete line theLine of field "users"
end if
If I run it, nothing happens. If I run it again immediately thereafter, it does work.
Any ideas?
Thanks, Barry
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
