Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class won't remember path of parent class
Message
From
20/02/1998 07:56:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
20/02/1998 07:28:35
Steve Camsell
Windmill Associates
Bath, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00079841
Message ID:
00080051
Views:
39
>>>I have a class (a custom form) which is based on a direct subclass of the VFP baseclass form. This sublcass of the VFP baseclass lives in a library called baseclas.vcx, which also contains subclasses of all the VFP baseclasses. Some time ago I was forced to move baseclas.vcx on the file server.
>>>
>>>Now when I open my custom form, I get asked to locate baseclass.vcx and the find file dialog always starts at the library's original location on the file server.
>>>
>>>Someone please help me. Is there a fix for this?
>>
>>Fix is in vcx. When you subclass two recs are created. The first contains the original class name and location (superclass) with props changed (if any) and name = "newsubclass", methods empty or new changed/added methods. The other contains "newsubclass" in objname. Change the superclass classloc.
>>
>>replace classloc with newloc for classloc = oldloc
>>
>>Cetin
>
>Hi Cetin,
>
>I've tried this and it works perfectly, thanks very much, this has saved me a great deal of stress. Now that I know where to look, I've been looking through some other VCX's and some have an explicit path, some just have a class name e.g. baseclas.vcx, some even have a relative path e.g.
>..\classlib\library\baseclas.vcx.
>
>Do you know what is going on here? Doesn't Fox have a uniform standard technique for storing this information? This seems to be very ad-hoc.

For the sake of portability Fox stores relative paths. This sometime causes the "portability" to be "nonportability".

c:\vfp50\classes\myclass.vcx
c:\project\myclass1.vcx

Here a classloc in project would be expressed as "..\vfp50\classes\myclass.vcx" and just "myclass1.vcx" respectively.
Later changing the "project" dir to "anotherproject" would still work, but moving it under another would fail "c:\vfpwork\project" (would think vfp50 dir is under \vfpwork). If fox did it as "\vfp50\classes\myclass.vcx" it would be more portable. I'm also bored with that "locate" so try to keep all classes in a specific folder as in :
\VFPCLASSES\
\VFPCLASSES\COMMON
\VFPCLASSES\COMMON\GRID
\VFPCLASSES\COMMON\COMBO
..
\VFPCLASSES\APPSPECIFIC
\VFPCLASSES\APPSPECIFIC\APPNAME
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform