I recently purchased this course and its a lot of fun!!
I have two major issues with the clock app as follows:
1. When I click anywhere on any free space on any card, the app navigates away from the current card. I am not sure why!!
2. The list of alarms are saved successfully to the file but they are not loaded to the list of alarms on the alarm card. Very wierd!!!
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
If anyone could please help me out as this is my first post in the forum and I hope to get some good initial impression.
Here is my code for the show list command.
I have debugged it and tFormattedArray contains the desired contents as follows:
tFormattedArray
1
edit = false
id = 1
label = morning alarm
on = false
sound = Beep
time = 11:31
But when the curser reaches the the following statement, the debugger exits with no error but no list is displayed:
set the dgData of group "alarmList" to tFormattedArray
I have set up my data grid behavior as follows:
##############################################################
on FillInData pDataArray
set the text of field "time" of me to pDataArray["time"]
set the text of field "alarmLabel" of me to pDataArray["label"]
set the text of field "id" of me to pDataArray["id"]
if pDataArray["on"] is true then
set the hilite of button "alarmOn" of me to true
else
set the hilite of button "alarmOn" of me to false
end if
if pDataArray["edit"] is true then
hide button "alarmOn" of me
show button "edit" of me
else
show button "alarmOn" of me
hide button "edit" of me
end if
end FillInData
################################################################
on LayoutControl pControlRect
local theFieldRect
if the hilite of button "alarmOn" of me is true then
set the backGroundColor of graphic "alarmBackground" of me to 255,255,255
else
set the backGroundColor of graphic "alarmBackground" of me to 239,239,244
end if
set the rect of graphic "alarmBackground" of me to pControlRect
end LayoutControl
######################################################################
Please I need your help guys!!!
Regards,
Salah.