Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Array Weirdness
Message
 
To
05/02/2004 05:35:16
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00842734
Message ID:
00874421
Views:
15
Hey Chris,

I was able to finally resolve this problem. It turned out to be an "orphaned" subclass. When I recieved a new version of my development framework, some classes had been combined. Well, I still had subclasses based on parent classes that no longer existed. The worst part was that VFP offered me no errors during compiling, building, or running the application other than this strange run-time error.

Another strange thing was that I was able to stop the error (without fixing the problem) by changing my syntax from:
this.addproperty("r_SerieNummer[1]")
into this
this.addproperty("r_SerieNummer[1,1]")

I was only able to find the problem by using the Class Browser in VFP. I opened my lowest level child class, then would right-click on it and show the parent of that class. I did this all the way up my hierarchy and soon found gaps where parent classes were missing.

----

You could probably also see the problem if you used Ken Levy's "SuperCls" utility and no parent code existed where you know there should be some.

----

You might also have a "corrupted" file (scx or vcx). To resolve this, many times you can just open the file as if it were a table with a command like:
use myfile.vcx in 0 exclusive
Then you can issue a "pack" command on the file, close the file, then issue a "compile classlib myfile.vcx", then rebuild your project.

I actually created a form that will run through every classlib, form, program, etc in my directory structure and optionally pack, then recompile each one. Sometimes depending on the project to recompile anything that has changed does not work out like it should.

----

I have also seen the kind of error you mentioned where the property you are referencing is "Protected". If you have a parent class that creates the property, but it is "Protected" and then you try to access the property or redefine the existing property elsewhere in your code.

Good Luck,
Paul
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform