Could someone help me with this function?
Please note that:
(1) This is an abridge code.
(2) performAfterDelay is a beebegames class.
(3) ‘Timer’ is used twice for different call function. Not sure if this is the problem.
However, it is not executing Validate_Date local function at all.
Any clues will be appreciated.
Regards.
[lua]-----------------------------------------------------------------------------
local function Validate_Date ()
– Day must be > 0 but < 32
if InpDate_Day <= 0 then
Date_Invalid = true
Msg_Line.text = “Day must be greater than zero.”
end
end
– Calculate Calendar days difference –
local function Calc_Days_Diff (event)
Date_Invalid = false
if event.phase == “began” then
Msg_Line.text = nil
InpDate_Day = FromDate_Group[1].text
InpDate_Month = FromDate_Group[2].text
InpDate_Year = FromDate_Group[3].text
Timer.performAfterDelay(0, Validate_Date, 1)
end
end[/lua] [import]uid: 93204 topic_id: 19008 reply_id: 319008[/import]
Post back if it doesn’t work as I have some more ideas as to why it’s not working