Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP - .NET blog
Message
From
06/05/2009 10:58:51
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01397536
Message ID:
01398158
Views:
86
>>
>>>Try programming to an interface in VFP. Try renaming a method in one of your base classes, and watch it lose all the method code you've added to that method in subclasses of that baseclass.
>>
>>Does it mean that it tracks all the places where it was subclassed and replaces there accordingly? How does it know all those places? Because they're all in the same project? Then how do you share classes among projects?
>
>A .NET solution consists of multiple projects. If the class/interface is only used within the projects in the current solution then it will automatically update all of them. It doesn't track every project where it's being used, it only knows about the current solution. This actually works really well for most things, but it doesn't work in every scenario. For example, you have a class library that you share across multiple solutions then you decide to change a method in it. At that point you'll break your other code.

Another breaking of the code by Microsoft - and I don't mean the code. It's another word of which they chose to change the meaning. Now project is not exactly what it was before, and a solution can exist independently of a problem or solvent, and it can become a problem to itself. So project is not exactly a project, solution is not a solution, they mean something else. One of the reasons I feel uneasy with M$ is their doublespeak. Never mean what they say, never say what they mean (CHankey will recognize he reference).

>>>Try extracting a code block to a new method and letting the IDE do all the work.
>>
>>Like you said, I'm calling "so what, no big deal" on that - it takes me two lines in the
>
>Really? Having the editor determine the dependencies in that chunk of code, create a new method, pass in the dependencies as parameters automatically isn't a big deal? I've found it's a huge time saver and a lot less error prone than me doing it myself. Highlight a chunk of code, click a button to extract it to a new method, name that method. Done.

I guess I could write that in a few days (in Fox, of course). Nice. My two lines were to get the reference to the object I edited, and to call its .writemethod("newmethodname", _cliptext, .t., 1, "here's why I cut this into a method of its own") - but then I do go in manually and adjust the code to take parameters, and back to its origin to insert a call. I guess reworking the references to include moving code from a method somewhere deep in the membership hierarchy to the top class level would require some reference shuffling (i.e. a "this.member1" may be called "this.container.pageframe.pg4.container.member1" from the top level, and "this.parent.parent" may become "this.container.pageframe"), so add a few hours for that.

>>> Try collapsing sections of If/Endif or Case/EndCase in the code editor to make thing easier to review.
>>
>>I tried and it worked perfectly... in GfA Basic on Atari in the late eighties. It even collapsed procedures. It's a feature I missed ever since. I loved that. Document view window comes close, but I'd love to have some collapsing there as well - just too busy to write my own :).
>
>If the VFP editor exposed more via it's API it might be possible. But I found a lot of the things I wanted to extend in the editor really difficult (impossible?) to do because it doesn't let you hook into enough of the events.

I never even tried the API. Saved once some code from UT and saw how it can be done - cool - but never got as far as to actually write an add-on of my own. Of course I didn't run into any obstacles that way :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform