Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Place of DODEFAULT()
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01605192
Message ID:
01605193
Views:
73
>I have a control class bases on the container. The hierarchy of the classes is as following:
>Container - VFP class
>MyBaseClass - based on VFP Container
>MySpecificClass - based on MyBaseClass
>
>Now I need to change the size of the MySpecificClass (bases on some semaphore flag) so that this MySpecificClass is wider and the textbox inside of this class is wider. So I need to add the code to the INIT method of MySpecificClass, something like the following:
>
>
>if file("my_semaphore")
>   this.width = this.width + 50
>   this.txt_box.width = this.txt_box.width + 50
>endif
>
>
>But of course I want the code in the MyBaseClass INIT to be fired. For example, would it correct the following?
>
>
>dodefault()
>if file("my_semaphore")
>   this.width = this.width + 50
>   this.txt_box.width = this.txt_box.width + 50
>endif
>
>
>And should dodefault() be before or after my "specific" code? Or it does not matter at all?
>
>TIA

If your code in the parent class doesn't adjust width, then it doesn't matter. Otherwise use it before calling your code to change already adjusted width.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform