Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
That darn .NET
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00799264
Message ID:
00800323
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.
>
>It's funny, but the VB syntax is so odd compared to VFP that it doesn't bother me as much as the C# syntax in which, in that same button, 'this.Dispose();' will close the form. The 'this' refers to the form and not to the button. Now that really bothers me coming from a VFP background.
>
Alan,

Same here. It's not that .NET does have some really cool features, but there are some things that just get to me.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform