Passing Lists II
Rob Cozens
rcozens at pon.net
Sun Jan 19 07:39:01 EST 2003
Hi All,
Put these handlers in a button, enter a time in dateItems (eg:
2003,1,19,9,26,0,0) and see what you get.
on mouseUp
ask "Enter the time in a format that converts to dateItems."
if it is empty then exit mouseUp
put it into theTime
answer "The time is"&&theTime
send "setTime"&&theTime to me in 20 milliseconds
end mouseUp
on setTime theTime
answer "setTime time is"&&theTime
end setTime
When I run this in v1.5A7, mouseUp says theTime is
2003,1,19,9,26,0,0; but setTime says theTime is 2003. I worked
around the problem by converting theTime to seconds before passing
it...but (a) I shouldn't have to, and (b) I am concerned about the
broader implications of sending any list that is input via an ask
dialog (or in general?).
Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list