在柔性库循环的依赖 [英] Circular dependencies in flex libraries

查看:80
本文介绍了在柔性库循环的依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有参考两个互相的Flex库。两者都使用链接类型外部,我用手动Loader类加载即可。

I have two Flex libraries that reference each other. Both use link type "External", and I manually load then with the Loader class.

我收到了错误在项目的构建路径中检测到循环:富

有没有什么办法可以解决呢?也许一个参数,编译器什么的。

Is there any way to resolve this? Maybe a parameter for the compiler or something.

我不认为应该有一个问题,因为与外部链接类型源$ C ​​$ C不被编译到库...

I don't think there should be a problem, since with the external link type the source code doesn't get compiled into the library...

推荐答案

这听起来更像是你需要重新考虑你的code。

It sounds more like you need to rethink your code.

也许你可以通过接口单向eleminate依赖?

Maybe you can eleminate dependency one way by using interfaces?

如果你能给的依赖关系的概述,也许我或其他人可能会就如何重新设计结构的想法。

If you could give an overview of the dependencies maybe I or someone else could give ideas on how to redesign the structure.

编辑:

你真好给我负...让我引述维基百科的文章关于这个问题的:

How nice of you to give me a minus... Let me quote the Wikipedia article on the subject:

[...]在软件设计圆形   大型软件之间的依赖关系   模块被认为是   反模式,因为它们的的负面影响

[...] in software design circular dependencies between larger software modules are considered an anti-pattern because of their negative effects.

[...]

循环的依赖可能会导致许多   在软件程序不需要的效果。   大多数问题从软件   设计的角度来看是偏紧   的相互依存耦合   模块,降低或品牌   不可能的单独的再使用的   单个模块

Circular dependencies can cause many unwanted effects in software programs. Most problematic from a software design point of view is the tight coupling of the mutually dependent modules which reduces or makes impossible the separate re-use of a single module.

循环的依赖可能会导致   多米诺骨牌效应,当一个小地方   变中的一器模块S $ P $垫到   其他模块,具有无用的全局   效果(程序错误,编译   错误)。循环依赖性会   也导致无限递归或   其他的意外故障。

Circular dependencies can cause a domino effect when a small local change in one module spreads into other modules and has unwanted global effects (program errors, compile errors). Circular dependencies can also result in infinite recursions or other unexpected failures.

循环的依赖也可能会导致   由preventing一定的内存泄漏   非常原始的自动垃圾   收藏者(那些使用参考   从重新分配未使用的计数)   对象。

Circular dependencies may also cause memory leaks by preventing certain very primitive automatic garbage collectors (those that use reference counting) from deallocating unused objects.

[...]

循环的依赖往往   按经验的程序员谁需要执行介绍   某种回调功能。   有经验的程序员避免这样的   不必要的循环依赖通过   应用设计模式,如   观察者模式。

Circular dependencies are often introduced by inexperienced programmers who need to implement some kind of callback functionality. Experienced programmers avoid such unnecessary circular dependencies by applying design patterns like the observer pattern.

(强调)

但话又说回来,也许你比写在维基百科上...

But then again, maybe you are smarter than the collective that writes on wikipedia...

这篇关于在柔性库循环的依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆