Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
That darn .NET
Message
From
16/06/2003 10:44:55
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00799264
Message ID:
00800306
Views:
35
>>>>Take a Winform, for example. Drop a command button on it. Double click it to bring up the code window (which, BTW, very nicely builds the code for you). You see something like ... Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
>>>>More than anything else, the design simply looks like you're breaking a whole bunch of encapsulation rules.
>>>
>>>If you're used to something else, you're right, it "looks" that way. But really, you aren't breaking anything.
>>>
>>>In VFP, when you're adding code to a command button like that, what it's really doing is creating a subclass of the command button and adding specific code to the Click event. And we both know that those events should be calling methods on the form eventually anyways. By this process you are saying (in VFP) to the command button:
>>>
>>>"sit there and wait for someone to click you, when clicked you have to know what to do"
>>>
>>>Where as with .NET it's really like saying:
>>>
>>>"sit there and wait for someone to click you, I'll take care of the rest"
>>>
>>>So with VFP, it also looks like you are breaking encapsulation, and you really are! With .NET, delegation only means that the system is more encapsulated (as the command button is only interested in allowing the user to provide input and notifiying the form when that occurs).
>>
>>Mike,
>>
>>You know I understand this. The thing that bothers me is the way the syntax is constructed. Using the command button example, if the purpose of the button is to close the form, you'd stick: Me.Close(). Here the "Me" reference is to the form, not the button. I'd much prefer Fox's syntax when referencing the form. VB.NET's, to me, is unclear.
>
>Good morning George;
>
>
>Somehow the Me. Reference from VB and Access reminds me of a self-centered child! It is not a professional term – Me. Me want this, me want that. Why not use a different syntax in .NET? Me no want, cried VB.NET!
>
>Let us recall the last version of VB (6.0) was Object Based and not Object Oriented. In VFP we use This to reference the object and Thisform to reference the form. So in VB.NET why not use Me for the object (not the form) and MeME for the form? I am just trying to be Object Oriented! :)
>
>Tom
>
>P.S. Thank God it is only monday morning because I can tell by the time friday gets here things will be worse around here! :)

Tom, you're such a pessimist. Try to be more like me. I'm the absolute ultimate optimist. Every morning I wake up, stretch, and tell myself, "Well, it can't possibly get any worse than this."

Alan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform