Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6SP5 - Textboxes, Checkboxes, etc. share codes
Message
 
To
06/06/2003 06:20:29
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00797065
Message ID:
00797115
Views:
24
Yes, Bloated it will get and soon, also thinking more on it, it will be difficult to guess which method in the form/app will be used by which. Custom class here I come <g>. Maybe I could have custom class for controls, another for a similar lot.

Thanks.

>1) goApp or to forms via load method as I roiginally suggested.
>2) If you add the methods to the form you would need to make the form as a base form class for others and likely it'd bloat quickly with many custom methods.
>
>If you go with custom class approach and add that custom class to form, contained procedures could simply use 'thisform' too. Managing is easier as a separate prg class (for me).
>Cetin
>
>>Hi Cetin
>>
>>2 ideas from your suggestion, please advise.
>>
>>1. To add these common procs. to goApp
>>2. To add these not the custom class but to the form. I haven't studies them deeply but most of these common procs are for the data entry.
>>
>>I wanted to be sure that oop theories were maintained.
>>
>>>>Hi all
>>>>
>>>>I have this set of classes for textbox, checkbox, combo, etc. Each of them require a minimum set of codes. right now if I make any changes to one I have to remember and change all of same code in other classes.
>>>>
>>>>Any suggestions.
>>>
>>>Bhavbhuti,
>>>How about you create a custom class (need not be in a vcx) and add common metods to it ?
>>>
>>>ie:
>>>
>>>*Assumed saved as CommonProcs.Prg
>>>define class myCommonProc as Custom
>>> procedure CheckValidation
>>> lparameters toObj
>>> lcControlsource = toObj.Controlsource
>>>*...
>>>endproc
>>>enddefine
>>>
>>>
>>>
>>>* Base form class load
>>>this.oCommon = NewObject('myCommonProc','CommonProcs.prg')
>>>
>>>* A control's valid
>>>thisform.oCommon.CheckValidation(this)
>>>
>>>Cetin
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Previous
Reply
Map
View

Click here to load this message in the networking platform