No such object error when stack opens
Posted: Fri May 31, 2013 12:18 pm
Hi All
I am getting the following error when I first open my stack:
_executing at 11:23:04 AM
Type_Chunk: no such object
Object_Slidercode
Line_put the round of tunits into field manfld2
Hint_Man@
I think I know why it is happening but I'm not sure how to deal with the issue.
The button 'slidercode' holds script that is set as a property for numerous other controls in the application. One of the sections of this script in the mousemove event is:
put numtochar(qnum + 64) into manfld
put "Man"&manfld into manfld2
put the round of tunits into field manfld2
This simply evaluates the name of the field to ManA, ManB, ManC, etc. up to ManL, depending on the value of qnum (a number between 1 and 12).
I am assuming that when the stack opens, before qnum has been set that it has a value of 0, which would explain why the value of manfld2 is evaluating to Man@, because numtochar(0+64) is @.
What I don't understand is why it is even trying to evaluate manfld2 when the stack first opens, before the app is in run mode or the mouse has been moved into the controls that set the value of qnum?
As long as I stay away from the 'slidercode' button (or make it invisible) the application works fine, but it is the error on opening the stack that I don't get.
Incidentally, I have gone down the route of just making the field names Man1, Man2, etc. but that caused a whole new set of problems.
Any help would be much appreciated.
Regards
Terry
I am getting the following error when I first open my stack:
_executing at 11:23:04 AM
Type_Chunk: no such object
Object_Slidercode
Line_put the round of tunits into field manfld2
Hint_Man@
I think I know why it is happening but I'm not sure how to deal with the issue.
The button 'slidercode' holds script that is set as a property for numerous other controls in the application. One of the sections of this script in the mousemove event is:
put numtochar(qnum + 64) into manfld
put "Man"&manfld into manfld2
put the round of tunits into field manfld2
This simply evaluates the name of the field to ManA, ManB, ManC, etc. up to ManL, depending on the value of qnum (a number between 1 and 12).
I am assuming that when the stack opens, before qnum has been set that it has a value of 0, which would explain why the value of manfld2 is evaluating to Man@, because numtochar(0+64) is @.
What I don't understand is why it is even trying to evaluate manfld2 when the stack first opens, before the app is in run mode or the mouse has been moved into the controls that set the value of qnum?
As long as I stay away from the 'slidercode' button (or make it invisible) the application works fine, but it is the error on opening the stack that I don't get.
Incidentally, I have gone down the route of just making the field names Man1, Man2, etc. but that caused a whole new set of problems.
Any help would be much appreciated.
Regards
Terry