Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unknown Member
Message
From
10/07/2002 10:15:23
 
 
To
10/07/2002 09:43:38
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00677020
Message ID:
00677043
Views:
23
Gary,

Strange. Seems like cboTypes is not fully instantiated yet.

Where (in what method) is this piece of code ?

Try to move the piece of code to the form.Init() since the form.init() fires after all other inits

Another possibility (depending on the object hierarchy) is to delete (ctrl^x) the control having that piece of code and re-adding it to the class (ctrl^v). Then you are sure that it fires after cboTypes is fully instantiated

>I have converted an SCX form to a VXC form class. All ran OK when the form was launched via a DO FORM.
>
>However, when instantiating the same form as a class, a piece of show control logic as follows :-
>
>
>if empty(thisform.cboTypes.Value)
>   this.enabled = .f.
>endif
>
>
>Is giving the error "Unknown Member cboTypes".
>
>If I further amend the code as follows :-
>
>
>if pemstatus(thisform, "cboTypes", 5) <-- Returns True as the property exists - I can see it in the debugger too.
>   if empty(thisform.cboTypes.Value) <-- Unknown Member cboTypes
>      this.enabled = .f.
>   endif
>endif
>
>
>So, this worked as an SCX but not in an unchanged VCX form. Any ideas what is happening here?
>
>Thanks!
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform