circular-dependency

Python Circular dependencies, unable to link variable to other file

你。 提交于 2019-12-25 05:01:12
问题 I am working on a program that allows me to directly edit a word document through a tkinter application. I am trying to link the tkinter input from my gui file to my main file so that I can execute my docx functions. When I try to execute my code this way, it tells me that entry in entry.get() is not defined. When I try to import this from main, I receive a circular import error. main.py from docx import Document from docx.shared import Inches import os os.chdir("\\Users\\insanepainz\Desktop"

Circular dependency with cross-cutting concern

自古美人都是妖i 提交于 2019-12-24 19:08:34
问题 So, this example is contrived to try to give a simple view of a much larger system I am trying to modify (namely, Orchard CMS). As such, it may not be perfect. I am trying to create a logging system that is managed through settings. The problem I'm running into is that retrieving the settings causes logging to occur. Here's a simple example that hopefully describes the problem: static void Main(string[] args) { string[] messages = "this is a test. but it's going to be an issue!".Split(' ');

Circular Dependecies in C++ / Classes that dpend each other

十年热恋 提交于 2019-12-24 16:24:26
问题 i have the following problem: I have a Pawn, that stands on a Field. So I have the Class Pawn and the Class Field. I want to have access from the Field to the Pawn that stands on it, and I want to have access from the Pawn to the Field it stands on. So i have classes: class Pawn; class Player; class Field; class PlayerList; class Pawn { public: int intID; Player* plrPlayer; Field* fldField; ... int getPosition() { //gets the ID of the Field it stands on return fldField->intID; //Here i get

How to import class from class included by that class

夙愿已清 提交于 2019-12-24 13:41:22
问题 I got a weird problem that I wasn't been able to find answer all over the internet (or I don't know how to ask). I have module AAA.py from BBB import BBB class AAA(): def test(self): print 'AAAA' a = BBB() and module BBB.py class BBB(): def __init__(self): print 'BBB' then when I call a = AAA() a.test() everything works as expected and I see output AAAA BBB BUT when I try to import and use class AAA from module BBB.py from AAA import AAA class BBB(): def __init__(self): print 'BBB' I get

Circular reference issue with Classes which use each other

你离开我真会死。 提交于 2019-12-24 11:30:14
问题 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; procedure Refresh; virtual; procedure Requery; virtual; abstract; public procedure Connect; published property DataConnector: TcmTPDataConnector read FDataConnector write FDataConnector; end;

Joi circular dependency error with when condition

限于喜欢 提交于 2019-12-24 06:53:29
问题 I have 3 query parameters longitude , latitude , and radius . I have 3 possible condition: radius - empty, longitude and latitude with some value all 3 parameters with value all 3 parameters empty In all other cases send validation error. e.g. longitude =3.12 - error latitude =2.12, radius =3.2 - error longitude =12.12, latitude =2.12 - ok My schema look like this one: const schema = Joi.object().keys({ longitude: Joi.number().optional().error(new Error('LBL_BAD_LONGITUDE')) .when('latitude',

Experiment trying to avoid Python circular dependencies

天大地大妈咪最大 提交于 2019-12-24 06:43:02
问题 I have a testing environment to try to understand how python circular dependencies can be avoided importing the modules with an import x statement, instead of using a from x import y : test/ __init__.py testing.py a/ __init__.py m_a.py b/ __init__.py m_b.py The files have the following content: testing.py: from a.m_a import A m_a.py: import b.m_b print b.m_b class A: pass m_b.py: import a.m_a print a.m_a class B: pass There is a situation which I can't understand: If I remove the print

'Enemy' was not declared in this scope?

别等时光非礼了梦想. 提交于 2019-12-24 03:26:20
问题 Okay, so thats my error: 'Enemy' was not declared in this scope.The error is in the map.h file, even though map.h includes enemy.h as shown #ifndef MAP_H_INCLUDED #define MAP_H_INCLUDED #include <iostream> #include <fstream> #include <string> #include <vector> #include "enemy.h" #define MAX_TILE_TYPES 20 using namespace std; class Map{ public: Map(); void loadFile(string filename); int** tile; int** ftile; bool solid[MAX_TILE_TYPES]; int width; int height; int tileSize; vector<Enemy> enemies;

Entity Framework Code First Circular dependencies

回眸只為那壹抹淺笑 提交于 2019-12-24 02:23:37
问题 I am a bit confused with Circular dependencies with EF as its seems like everything will just become a circular dependency. Looking at this tutorial public class Blog { public int BlogId { get; set; } public string Name { get; set; } public virtual List<Post> Posts { get; set; } } public class Post { public int PostId { get; set; } public string Title { get; set; } public string Content { get; set; } public int BlogId { get; set; } public virtual Blog Blog { get; set; } } When I run the "code

ImportError shows up with py.test, but not when running the app

亡梦爱人 提交于 2019-12-23 20:22:14
问题 Unlike in this question: Importing modules from a sibling directory for use with py.test I can import something from my app, but there's an import error (looking like a circular dependency) that raises from 'inside' myapp while running the test and not when running myapp alone: $ python3 myapp/myapp.py Some dummy string (correct output) But: $ python3 -m pytest ================================================================= test session starts ===============================================