Unusual Problem
Charles Szasz
cszasz at mac.com
Sat Dec 30 19:17:42 EST 2006
I am still having an unusual problem with setting the value of three
menu option buttons. In the preOpenStack, I have a script which sets
the value of three menu option buttons, optionMenu (system date for
the year), optionMenu2 (system date for the month) and optionMenu3
(system date for the day) when the first screen is presented to the
user.
I have three other option menu buttons, optionMenu4 (the numerical
year that the user chooses), optionMenu5 (the numerical month the
user chooses) and optionMenu6 (the numerical day the user chooses).
These are subtracted from the first three optionMenu buttons.
However, when the user selects a date using the optionMenu4,
optionMenu5 and optionMenu6 and does not select the system date, that
is use the current date, the age for the year and day result in
negative numbers for year, which is the year entered and the month
entered, respectively.
I don't understand why the optionMenu, optionMenu2 and optionMenu3
are not "initialized" despite showing the system date as numerical
year, month and day. By the way I have another script that is
triggered to compute the age when the user chooses the day of the
birth date that is handled by sending a mouseUp message to another
button that takes the numbers from the option menus and does the
calculation.
Here is the preOpenStack script:
local tdate
put the short date into tDate
convert tDate from short date to dateItems
select line lineOffset(item 1 of tDate, btn "optionmenu") of btn
"optionmenu"
set the menuhistory of btn "optionmenu2" to item 2 of tDate
set the menuhistory of btn "optionmenu3"to item 3 of tDate
The only times that the age is computed correctly is if the user
selects a diffferent date using the first three option menu buttons.
Any help that I can get would be greatly appreciated!
Charles Szasz
cszasz at mac.com
More information about the use-livecode
mailing list