Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Moving repository directory

Posted on 1998-09-24
12
Medium Priority
?
261 Views
Last Modified: 2010-04-06
I have a number of forms templates in the repository and have them all stores in one directory. I now need to move this directory, where is the repository directory information stored? Currently the durectory is not in my search path but the derived classes can find it no problem. how can I edit the location so all my derived classs are happy?

Thanks, Tom.
0
Comment
Question by:tomcorcoran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
12 Comments
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 200 total points
ID: 1340809
Hi Tom

The Object Repository isn't necessarily one directory.  There is a file in the Delphi Bin directory called DELPHI32.dro which stores information about each object in the repository, including the directory it's found in.

If you change your repository directory, you will need to edit each entry in this file.

Cheers,
JB
0
 

Author Comment

by:tomcorcoran
ID: 1340810
JimBob,

Perfect, that's what I needed to know. I was thinking last night it must be in the registry..but had no idea about the dro file.

Tom.
0
 

Author Comment

by:tomcorcoran
ID: 1340811
JimBob,

I edited the dro file. When I try and open the form that inherits from a repository object (first 8 characters are now not clashing) I now get the message: error creating form: ancestor for "the reporistory object I am deriving from" not found. Any ideas what's going on?

On a side note, when I go to File | New one of the pages is my project name and contains my mainform (only unit in project), why is this?

Thanks a lot,

Tom.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 5

Expert Comment

by:JimBob091197
ID: 1340812
Hi Tom

I'll try to work out the 1st problem and get back to you.

Regarding your 2nd point (the side note) Delphi always puts your current open project & all its forms on a page in the File|New page.  This makes it easy to create a second form that is a copy of an existing form.  Not used often I suppose, but useful if you do ever want to do it!!  :)

Bye,
JB
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1340813
Hi Tom

Had a look at the 1st problem.  Please confirm that this is the order of the steps you took:
1)  Created a project
2)  Moved the repository & edited the dro file.
3)  Open the original project and it gives the error about the ancestor not found.

If these are the steps you took then it's possible that your project source file may need to be edited.  Open your project's dpr file and check that all the entries in the "uses" clause point to valid directories & units.

Let me know what happens.
Cheers,
JB
0
 

Author Comment

by:tomcorcoran
ID: 1340814
JimBob,

Thanks a lot. Those are indeed the steps, everything is fine in the project source uses (no repository unit mentioned)....

Tom.

0
 

Author Comment

by:tomcorcoran
ID: 1340815
JimBob,

I found the reason why - the class/form being inherited from must be added to the project, otherwise you get this error. An instance of it is created of course in the project source - what happens with this instance - it's not  used when I create the derived classes right?

Thanks, Tom.
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1340816
Tom,

It seems you found the reason.
I don't think the base form needs to be created in the project source.  (You can remove Application.CreateForm(...) for the base form.  As long as it's in the uses clause it should work fine.  (Or am I mistaken??)

Cheers,
JB
0
 

Author Comment

by:tomcorcoran
ID: 1340817
JimBob, yes that worked nicely thanks. On a sidenote, in my ancestor class I have a virtual method that I call in the ancestor but override in each base class. I don't want to implement it in the ancestor but it forces me to have a implementation that just contains ";", and that appears to work fine. Is there a problem doing this - is there a beyyetr way? Thanks, Tom.
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1340818
If you are ALWAYS going to override the virtual method in an inherited class, then in the base class you can use the "abstract" keyword, like this:

type
  TMyClass = class(TSomething)
    procedure MyVirtualMethod; virtual; abstract;
  end;

By adding "abstract" to the end of the method declaration in the base class (above) you don't need to provide an implementation for the base class.  In the derived classes you add "override" as usual...

Cheers,
Dave
0
 

Author Comment

by:tomcorcoran
ID: 1340819
Dave/JimBob :-) I appreciate it, great stuff, thanks a million, Tom.
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1340820
Anytime.  Cheers...

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

647 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question