(Java question)
If I reference a field in an inner class, does this cause a circular dependency between the enclosing class and the inner class?
How can I avoid this?
Here is an example:
public class Outer {
private Other o;
private Inner i;
public Outer() {
o = new Other();
i = new Inner() {
public void d...
Ok I have two modules, each containing a class, the problem is there classes refrence each other.
Lets say for example I had a room module and a person module containing CRoom and CPerson.
The CRoom class contains infomation about the room, and a CPerson list of every one in the room.
The CPerson class however sometimes needs to use t...
I'm experiencing what I believe is a circular dependency issue with my PHP application. Please let me know if this is incorrect. Here is the situation:
Two classes, LogManager and DBSession.
DBSession is used to interact with the database, and LogManager is used to log to files. Both are widely used in my application. When you create a...
I'm looking for a good pattern to resolve the following circular reference in a Windows Form application:
Assembly 1 contains a Windows Form with an Infragistics menu item ".Show"ing a Form in Assembly 2
Assembly 2 contains a Windows Form with an Infragistics menu item ".Show"ing a Form in Assembly 1
The menu has generally the same i...
I'm trying to run down a memory leak in a windows forms application. I'm looking now at a form which contains several embedded forms. What worries me is that the child forms, in their constructor, take a reference to the parent form, and keep it in a private member field. So it seems to me that come garbage-collection time:
Parent ha...
I'm designing a re-usable class library that contains 2 assemblies (amongst others) named core.xml.dll and core.string.dll.
The xml assembly references the string assembly in order to use some string helper methods.
However now there is an string method that would be benefit from using a method contained in the xml assembly.
If I...
I have the following two classes:
TcmTPDataPanel = class(TcmTPBasePanel)
Database: TnxDatabase;
Session: TnxSession;
private
FDataConnector: TcmTPDataConnector;
MyNxDataBase: TnxDatabase;
MyNxSession: TnxSession;
MyRefNxDataBase: TnxDatabase;
protected
procedure Disconnect; virtual; abstract;
procedur...
Hi everyone,
[EDIT]
Thank you for your answer, my problem is the following :
Module A called Map.ml
let lst = ref [Instance1_ModuleB; Instance2_ModuleB; ...];;
let is_coliding p = DoSomeWork_And_Return_A_Bool ;;
.... other things here.
Module B called Player.ml
Open Map
class player_object (x_in, y_in, name_in)=
object (self)
me...
What will happen if two modules import each other?
To generalize the problem, what about the cyclic imports in Python.
...
What is the best way to resolve the following circular dependency in typedef-ing these structs?
Note the C language tag - I'm looking for a solution in standard gcc C.
typedef struct {
char* name;
int age;
int lefthanded;
People* friends;
} Person;
typedef struct {
int count;
int max;
Person* data;
} People;...
I have two files, node.py and path.py, which define two classes, Node and Path, respectively.
Up to today, the definition for Path referenced the Node object, and therefore I had done
from node.py import *
in the path.py file.
However, as of today I created a new method for Node that references the Path object.
I had problems when ...
When are circular references acceptable in database?
Theoretical and practical, any help is appreciated.
...
I am just reading Agile Principles, Patterns and Practices in C# by R. Martin and M. Martin and they suggest in their book, to keep all your interfaces in a separate project, eg. Interfaces.
As an example, if I have a Gui project, that contains all my custom Gui classes, I will keep their interfaces in the Interfaces project. Specifica...
I have the following situation:
1) A project MyCompany.MyProject.Domain which contains my domain model, and partial classes (such as Contact).
2) I want to 'extend' (by partial class, not extension method) my Contact class with a property "Slug" which will give me a simple URL friendly text representation of first and last name.
3) I ...
I was writing some C# code recursively walking the referenced assemblies of a base assembly, building up a directed acyclic graph of these references to do a topological sort. I'm doing this by means of the GetReferencedAssemblies() method on the Assembly class.
While testing the code, I found - to my surprise - that some assemblies in ...
I have a graph of multi-level dependecies like this, and I need to detect any circular reference in this graph.
A = B
B = C
C = [D, B]
D = [C, A]
Somebody have a problem like this?
Any solution???
Thanks and sorry by english.
========= updated ==========
I had another situation.
1
2 = 1
3 = 2
4 = [2, 3]
5 = 4
In this case,...
Based on feedback I got from this question, I'm interested in using Lazy C++ on my OSX laptop. The Lazy C++ webpage has binaries for Linux and Windows available, but nothing for OSX. There's also a link to download for the Lazy C++ source, but it requires a lzz binary as part of the build process. This creates a situation where I need an...
Hi!
This question is about Unity Container but I guess it is applicable to any dependency container.
I have two classes with circular dependencies:
class FirstClass
{
[Dependency]
public SecondClass Second { get; set; }
}
class SecondClass
{
public readonly FirstClass First;
public SecondClass(FirstClass first)
{...
Imagine the following database:
Table 'companies' has fields id, name and flagship_product_id.
Table 'products' have fields id, name and company_id.
A company must have a flagship product (1:1 relationship) and all products have one company (1:N relationship).
When using a storage engine such as MyISM, there shouldn't be any problem ...
hello
again i have a little problem with the creation of a user control.
though i have made a control i want to use in another control.
as soon as i want to add the reference (would like to use it as compiled OCX) in the Component's list, the message "Wechselseitiger Verweis zwischen Projekten nicht zulässig" which means something like...