>中 500 行一切都停止了

发布于 2024-11-06 20:49:47 字数 729 浏览 1 评论 0原文

嗯,这有点可笑;可能令人难以置信,但是当我的 MXML FLEX Main.mxml 中的标签中有超过 500 行动作脚本时,所有语法突出显示、错误和语法验证、错误报告、“问题”窗格,甚至有时编译都会失败。删除任何代码块后,它会再次工作。

我不明白为什么 Adob​​e 会发布像 Flash Builder 4.5 Premium 这样的产品,却有这么大的问题;没有人注意到。因此我认为问题与我的电脑或我的项目有关;因为现在有更多的人发生过这种情况,如果我在谷歌上找不到它的话。

此外,在代码上方的 MXML 属性中定义的许多对象(甚至是所有状态中的对象)现在显示为警告:在我的文档一侧访问未定义的属性。然而,这些警告没有显示在“问题窗格”中,甚至没有用黄色波浪线强调与消息相关的正确代码部分。

我已采取的尝试并解决此问题的步骤: 我尝试过重新启动以及重新安装 IDE (Adobe Flash Builder 4.5)。 我尝试过创建一个新项目。 我尝试将代码拆分为较小的 .as 文件并包含它们。 我尝试编译我的应用程序。

没有任何效果,请帮忙。

--

编辑1:针对第一个答案,我已经尝试通过编辑主安装文件夹中的flashbuilder.ini和flashbuilderC.ini文件来增加分配给Adobe Flash Builder 4.5的内存,它没有帮助;因为我的堆(堆显示在右下角)从来没有使用超过 128MB 的空间(即使在编译期间),这并没有解决任何问题。

Well, it's a little ridiculous; and probably unbelievable, but when I have more than five hundred lines of actionscript in tags in my MXML FLEX Main.mxml, all syntax highlighting, error and syntax verification, error reporting, "Problems" pane, and even sometimes compilation fail. Upon removing any chunk of code, it works again.

I don't see why Adobe could release a product such as Flash Builder 4.5 Premium, have this big of a problem; and nobody notice. Therefore I believe the problem has to do with my computer, or my project; as there's now ay more people have had this happen if I can't even find it on Google.

Additionally, many objects that have been defined in the MXML properties above the code, even those in All States, are now showing as warning: Access of undefined property down the side of my document. However, these warnings are not showing up in the "Problems pane", and aren't even yellow squigly underlining the right sections of code to pertain to the message.

Steps I have taken to TRY and fix this:
I have tried restarting, as well as re-installing the IDE (Adobe Flash Builder 4.5).
I have tried creating a new project.
I have tried splitting my code into smaller .as files and including them.
I have tried compiling my application.

Nothing has worked, PLEASE HELP.

--

Edit 1: In response to the first answer, I have already tried increasing the memory allotted to Adobe Flash Builder 4.5 by editing the flashbuilder.ini and flashbuilderC.ini files in the main installation folder, it did not help; as my heap (heap display in bottom right) never uses more than 128MB anyways (even during compile) this did not fix anything.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅浅淡淡 2024-11-13 20:49:47

您可以尝试以下步骤:

  1. 您可以尝试通过编辑 eclipse.xml 来为 Eclipse/Flash Builder 分配额外的内存。 ini.
  2. 您可以尝试使用 mxmlc< 从命令行编译项目/code> 编译器并比较结果。
  3. 您可以尝试拆分代码,但不要仅使用代码包含(您应该永远避免),而是使用提取子组件(关键字是重构、OOP、组合等)。

当然,您可以一起使用所有这些建议:)

无论如何,您应该避免在单个 MXML 文件的 Script 块中列出大量代码。 MXML 的 Script 块的主要目的是通过事件处理程序和必填字段声明获得简单明了的代码。

You can try the following steps:

  1. You can try to allocate additional memory for your Eclipse/Flash Builder by editing of eclipse.ini.
  2. You can try to compile your project from the command line using mxmlc compiler and compare result.
  3. You can try to split your code but not using just code including (which you should avoid forever) but extraction subcomponents (keywords are refactoring, OOP, composition etc.).

And of course you can use all of these advices together :)

Anyway you should avoid large code listings in a Script block of a single MXML file. The main purpose of Script block of MXML is to have simple and clear code with event handlers and required fields declarations.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文