Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can code be inherited?
Message
From
25/04/2002 15:16:49
 
 
To
25/04/2002 15:11:40
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00649179
Message ID:
00649274
Views:
7
>It would be nice to drag/drop an instance of the control on a form and now modify the behavior using the above 'empty' template.

In my opinion, you should try for something like this:
*** ActiveX Control Event ***
DO CASE
* Handle each event or error.
	* Events
	Case THIS.CommEvent = 1
		* SThreshold # of Characters to Transmit.
		this.OnNumberOfCharactersToTransmit()
	Case THIS.CommEvent = 2
		* RThreshold # of characters Received.
		this.OnCharactersRecieved()
	Case THIS.CommEvent = 3
		* Change in the CTS line.
		this.OnChangeCTS()

	*** ECT ECT

ENDCASE
Everyone of your case statements is handled by a method call which hides the actual implemenation of the ActiveX control. Now, you can add an instance of that class to your form, and isntead of worrying about the CommEvent property or case statements, you can just override the method(s) you want.

Does that make sense?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform