PowerPac error in createAlphaShadow; the miniumum object size is 25 x 25 pixels! "instructionsShadow" size is 185 x 8 pixels.
This seems to occur only if I reload the page in the browser. It suggests that the upper field "instructions" must be empty but nowhere in my code is there anything that removes the text. I can also provoke this error if I try to create the alphaShadow on load page. I do this for other fields without a problem.
I have dumped the actions into a text file and searched through them but I can't find any explanation. Here are the relevant action sequences:
- Code: Select all
--------------------------------------------------------------------------------
Actions for Button "start1" of Page id 0
--------------------------------------------------------------------------------
-- On load page... -------------------------------------------------------------
Set text of Field "instructions" to "Click here to start the exercise in preview mode. You can click here xxxx before doing the exercise." (disabled)
Set width of Field "instructionsShadow" to width of field "instructions" (disabled)
Set height of Field "instructionsShadow" to height of field "instructions" (disabled)
Execute Script createAlphaShadow (HTML) (disabled) THESE DISABLED ACTIONS ALWAYS PROVOKE THE ERROR IF ENABLED
-- On mouse over... ------------------------------------------------------------
Define local variable "number" (Initial value: "")
Set left of Group "instructions" to left of self
If previews = 1
Set number to "once"
Else if previews = 2
Set number to "twice"
Else
Set number to previews && "times"
End if
Set text of Field "instructions" to "Click here to start the exercise in preview mode. You can click here" && number && "before doing the exercise."
Set width of Field "instructionsShadow" to width of field "instructions"
Set height of Field "instructionsShadow" to height of field "instructions"
Execute Script createAlphaShadow (HTML)
Set visible of Group "instructions" to true
-- On mouse off... -------------------------------------------------------------
Execute Script createAlphaShadow (HTML) (PARAMETER REMOVE = TRUE)
Set visible of Group "instructions" to false
-- On click... -----------------------------------------------------------------
Execute Script createAlphaShadow (HTML) (PARAMETER REMOVE = TRUE)
Set visible of Group "instructions" to false
etc ...
At the moment there is only one other button using this system and its code is identical to that above.
Actually if the error message is closed thereafter everything functions normally. Is there an equivalent of sysSuspend = false or Try I could use. Maybe I could use Try in exeJavascriptDirect?