General information
Category:
Object Oriented Programming
Title:
Form initialization problem - random behavior
Ok, this one isn't going to be easy to desscribe so please bear with me.
I have an application whose main form consiste of a pageframe with 9 tabs. Each of the tabs has a container associated with it that contains the names and initial values for these properties. Most of these properties are essentially variables which hold the values of data entry text boxes.
In the activate property of each tab on the pageframe, I assign values to all of the properties. These values are .F. for all logicals, space(x) for character, and ctod(space(6)) for dates.
When the form finished activating, all the text boxes which are assigned for data entry contain blank data until either data is entered or a record is loaded from a database. At that time, the values of the data are assigned to the appropriate property.
What will happen occassionally, and I can find no pattern to this, is that the form will initialize with the literals of the initialized properties. For example, a date field will contain "ctod(space(6))" rather than simply the blank date, character field will contain "space(x)" rather than simply displaying spaces, etc. I have to restart the application to clear these out.
There DOES seem to be some association between running the debugger and this display anomoly, but only on occassion. The application seems to decide when it wasnts to behave and when it doesn't. Obviously something is causing this bizarre behavior, but I can't for the life of me figure out what it might be.
I have built the form and the pageframe using the visual tools rather than with code, if this makes any difference. I am using VFP 6.0.
Any ideas?
TIA
Richard Bates
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only