Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Class keeps switching base class upon compile
Message
From
15/02/2003 00:01:01
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00752241
Message ID:
00753630
Views:
16
>One other key to this problem.
>
>This occurs at either the point and time I save my changes or the subsequent compile. The sign post is where in the VFP source code does a write to classloc in the VCX record get occur and why.
>
>The only reasons that I can think this field should ever get written to is when you create a new class or change the parent.
>
>But obviously it gets written to in one of the process's above. Possible sceneraios.
>
>1). This field gets written to everytime you save or compile and sometimes screws up.
>
>2). This field gets written to sometimes and always screws up.
>
>3). This field gets written to sometimes and sometimes screws up.
>
>Only the record for the thing you are working on gets changed in the VCX. I don't know if it happens to anything other than forms. On the current problem that is happening on a daily basis it is only the form record that changes and only on one form of 5 in the VCX. None of the objects on this form have ever changed.
>
>This has never happened on this project before of which I have been working on 40 hours a week for a year and a half. 1 year in 3.0b 6 months in 7.0.
>
>It started happening a few weeks ago when I created a new class hierarchy in a new set of VCX's and began migrating a form from the old to the new.
>
>The VCX's are in the same pjx as the rest of the app which is based upon the original codebook framework.
>
>I created new class hierarchy from project manager. I went to old class code for form as well as class code for classes that were built outside of form but yet dropped on form and did a "View Code" to prg. Then I have been cutting and pasting the old code into new form re-working the whole thing.

My preferred method for copying code is to keep both forms/classes open, and to create edit-time references to them using aSelObj(). Then, if oFOld and oFOld are the variables referencing old and new form respectively,
cText=oFOld.readmethod("method name here")
oFNew.WriteMethod("same method name",cText, .t.)
Then just go and stuff the method names one by one. It could even be a little routine, which I think I have written, but keep forgetting its name :).

>This form calls some sub forms. I dragged those sub forms from the old VCX into the new VCX. All of these sub forms were subclassed from VFP's base form.
>
>At some point after a few days when I did all of this the first switch happened and as I have said it has been occuring almost every day at least once since. Sometimes 2 or 3 times, a few times never in a day.

Before compiling, check your set("path"). Make sure the directory where the right classes are comes before the one where the wrong classes are. If Fox gets confused, it may take the one it finds first.

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