Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding containers to forms and error trapping
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00193129
Message ID:
00193212
Views:
15
Moving the assingment of the rowsource from the property sheet to the combo's init worked. Thanks for your help
-john


>>>>>I am using the technique of adding containers to pages on pageframes when the user selects the page the first time.
>>>>>If the container has an error in any control in the container, the conainer is not shown. I want to be able to continue and see the error. I am able to do this if I put my container (with the error) on a form at design time. Adding to to a form at run time fails.
>>>>>Any Suggestions?
>>>>BTW, the control with the error is a combo box. I intentionally gave it an array name that does not exist.
>
>>Why does this work for a textbox? I can put a textbox on the container with an invalid controlsource and trap for the error and allow my container to be instanciated.
>>
>>-John
>
>Did you get a message box from VFP informing you that the control was being unbound? I have seen this behavior with textboxes and some other controls, if the controlsource is bad VFP simply unbinds them but does not return .F. from the Init of the control.
>
>Regarding the combobox:
>Have you tried waiting until the Init method of the container before binding the combobox to its rowsource? If you trap the error and return .T. from the Init then your object should be there. I can't say that I'm very fond of trapping errors like that however...
>
>HTH,
> Ned
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform