|
-
Aug 6th, 2003, 05:29 PM
#1
Inheritance and References
Hmm I just noticed something I thought was strange, I have a base class in Edneeis.Utilities.dll and I use this base class in Tracker.Framework.dll which is used in ObjectTester.dll. ObjectTester only has a reference to Tracker.Framework.dll and this gives me an error when any base class methods are called that originate in Edneeis.Utilities.dll because it isn't directly referenced in ObjectTester. Has that confusing enough? Is this correct does a project have to reference all base classes/dependent classes of the objects it uses? Or did I miss something?
As a recap in my ObjectTester app I use a Nurse object (from Tracker.Framework.dll) which inherits from the DataLayer object (from Edneeis.Utilities.dll). ObjectTester has a reference to Tracker.Framework but not Edneeis.Utilities and this gives an error.
-
Aug 6th, 2003, 05:37 PM
#2
Stranger still it only happens when I use a method/event/whatever that is only directly related to the base class object. For instance the child class has a Save method with no parameters that calls the Save method in the base class and passes parameters to it. This doesn't have a problem, unless I call the parameterized version that is in the base class directly. The same with events, if the event is declared in the base class only then I can't use it without a reference to the base class assembly, but if I redeclare it and call the base event from the child object then I don't need the reference.
It must be some sort of casting issue.
-
Aug 10th, 2003, 06:53 PM
#3
Hyperactive Member
any possibility it thinks you are trying to use multiple inheritance?
-
Aug 11th, 2003, 08:51 AM
#4
Addicted Member
When you add a reference to a dll, you should get a copy of of it, and all of its dependancy dlls in your project's bin directory.
-
Aug 11th, 2003, 10:02 AM
#5
I just ended up making a reference to it. It seemed to be the only way to fix the problem. The dll was in the application directory but not referenced and it still didn't like it. The trouble began when I switched from referencing the Project to the actual DLL.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|