Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Renaming Libraries
Message
From
12/09/2008 09:18:04
 
 
To
11/09/2008 17:25:30
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01346874
Message ID:
01347026
Views:
26
Rather than trying to rename libraries, I achieved the same result by, first, setting up new libraries with
the new names (and, in my case, new locations) that I wanted, with one dummy class in each
library has a placeholder. For each new library, I did the following: (1) Opened the PROJECT in
an instance of the class browser. (2) Opened the new library in another instance of the class
browse. (3) Moved each applicable class to the new library by dragging and dropping from
the Project browser to the new-library browser. (Select class by single-clicking, then use the
icon at the upper left of the browse to drag-and-drop.) (4) After moving all the classes, I removed
the placeholder class from the new library. (5) Closed the new-library browse. (6) I then
repeated for each new library (7) Finally, I got rid of the old (now-emptied) class libraries.

Because opening the project in an instance of the browser opens everything up, all the refs
are automatically refreshed/adjusted, each time a class is moved. Still somewhat tedious,
but no VCX hacking was required.

Additional notes: (1) Back up everything before you start, and try my suggestions at your
own risk! (2) I tried this with ONE project -- can't say how/if it will work with multiple projects.
(3) Once or twice during the course of moving classes, I was asked to locate something --
i.e., a member object. I did so, and it kept on trucking/refreshing the refs just fine. (4) In the
course of moving about 50 or 60 classes, I stopped several times and ran my app, just to
confirm that everything was relocating okay.

>>>>Ah, I may have misunderstood that message from Erik. I want to rename the libraries and leave the class names inside the same. I also want the forms to reference the newly renamed libraries.
>>>>
>>>AFAIK there is no build-in way in VFP. However, there may be classes in Downloads seciton here that do this.
>>>
>>>Otherwise you may want to manually change all the references using forms/classes as tables.
>>
>>Ok, now I'm feeling stupid. How can I save the library as another name? I open it, but Save As is grayed-out in the menu. Right-Click does not have that option either.
>
>Is it possible to try a non-VFP solution? Use Windows Explorer or even DOS to make a copy of the files with the new name.
>
>Don't know if it will work and what might happen to internal references (if any) to the old library name, but that's what I'd try
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform