Flash CS4不肯放手

发布于 2024-08-20 07:19:39 字数 1059 浏览 6 评论 0原文

我有一个Flash项目,它有很多源文件。我有一个使用率相当高的类,称之为 Jenine。我最近(也许是冷酷无情)将 Jenine 从一个命名空间迁移到了另一个命名空间。我以为我们已经准备好了——我以为是时候了。新的 Jenine 在各方面都更好了——她去掉了一些臃肿的代码,她把自己从一些残余的类关系中解耦出来,她终于回到了她心里一直暗自知道的命名空间。属于.她属于她自己的同类。

不幸的是,Flash 没有这些。也许已经形成了执着。也许它不希望 Jenine 脱钩。不管怎样,它都坚持记忆中旧的、完美的珍妮版本。它拒绝继续前进。它忽略了她的(函数)调用。它试图忘记她新的公共界面。相反,它构建的每个 Jenine 实例始终是旧版本的副本,一直到它的类路径:

var jenineInstance:Jenine = new Jenine();
trace( getQualifiedClassName(jenineInstance));
// Should print: com.newnamespace.subspace::Jenine
// Prints: com.oldnamespace.subspace::Jenine
// Ah, young love!

我们战斗了。我对自己说过或做过的一些事情并不感到自豪。最后,我在盛怒之下彻底删除了所有关于珍妮的内容。她已经彻底从系统中删除了。我的光标落在“清空垃圾箱”菜单选项上,就像棺材的冷盖一样。

我认为 Flash 再也没有恢复过。直到今天,这件事仍然留在珍妮的记忆中。她旧的、不完美的定义仍然像被遗弃的幽灵一样漂浮在我的项目中。每当我强制 Flash 编译时,它仍然会亲切地将她插入到我的电影中,将她的定义安放在其他活生生的类中,就像一座小神殿一样。我想知道他们是否能看到她。

Flash和我真的不再说话了。我编写代码,它编译它。镇上新来了一个名叫 Summer 的女孩,她看起来和 Jenine 几乎一模一样,就好像有人刚刚将她的源代码批量复制到一个新类中,但 Flash 没有表现出任何兴趣。大多数时候,当它认为我没有在看时,它只是闷闷不乐地在我的评论中写下糟糕的诗。

我希望没有人有过类似的经历,这只是 Flash 代码库可怕的黑暗泻湖中的一个单一的、痛苦的涟漪。有谁知道如何擦除编译器正在使用的缓存?

I have a Flash project, and it has many source files. I have a fairly heavily-used class, call it Jenine. I recently (and, perhaps, callously) relocated Jenine from one namespace to another. I thought we were ready - I thought it was time. The new Jenine was better in every way - she had lost some code bloat, she had decoupled herself from a few vestigial class relationships, and she had finally come home to the namespace that she had always secretly known in her heart was the one she truly belonged to. She was among her own kind.

Unfortunately, Flash would have none of that. Perhaps it had formed an attachment. Perhaps it didn't want Jenine to be decoupled. Either way, it clung to the old, perfect version of Jenine in its memory. It refused to move on. It ignored her (function) calls. It tried to forget her new, public interfaces. Instead, every instance of Jenine that it constructed was always a copy of the old version, down to its classpath:

var jenineInstance:Jenine = new Jenine();
trace( getQualifiedClassName(jenineInstance));
// Should print: com.newnamespace.subspace::Jenine
// Prints: com.oldnamespace.subspace::Jenine
// Ah, young love!

We fought. I'm not proud of some of the things I said or did. In the end, in a towering fit of rage, I deleted all references of Jenine completely. She was utterly, completely erased from the system. My cursor fell upon the "Empty Trash" menu option like the cold lid of a casket.

I don't think Flash ever recovered. To this day it still clings to the memory of Jenine. Her old, imperfect definitions still float through my project like abandoned ghosts. Whenever I force Flash to compile, it still lovingly inserts her into my movie, nestling her definition in amongst the other, living classes, like a small shrine. I wonder if they can see her.

Flash and I don't really talk anymore. I write my code, it compiles it. There's a new girl in town named Summer who looks almost identical to Jenine, as if someone had just copied her source-code wholesale into a new class, but Flash hasn't shown any interest. Most days it just mopes around and writes bad poetry in my comments when it thinks I'm not looking.

I hope no one else has had a similar experience, that this is just a singular, painful ripple in the horrifying dark lagoon that is the Flash code-base. Does anyone have any idea how to erase whatever cache the compiler is using?

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

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

发布评论

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

评论(7

疧_╮線 2024-08-27 07:19:39

Flash 仍然具有 ASO 文件,它是类的编译字节码。在 Windows 上,您可以在此处查看 ASO 文件:

C:\Documents and Settings\username\Local Settings\Application Data\Adobe\Flash CS4\en\Configuration\Classes\aso

在 Mac 上,目录结构类似于 /Users/username/Library/Application Support/


您可以手动删除这些文件,也可以在 Flash 中删除这些文件。可以选择Control->Delete ASO files来删除它们。

Flash still has the ASO file, which is the compiled byte code for your classes. On Windows, you can see the ASO files here:

C:\Documents and Settings\username\Local Settings\Application Data\Adobe\Flash CS4\en\Configuration\Classes\aso

On a Mac, the directory structure is similar in /Users/username/Library/Application Support/


You can remove those files by hand, or in Flash you can select Control->Delete ASO files to remove them.

请帮我爱他 2024-08-27 07:19:39

尝试删除您的 ASO 文件。

ASO 文件是类文件的缓存编译版本。尽管 IDE 在进行更改时可以更好地释放旧缓存,但有时您必须手动删除它们。要删除 ASO 文件:控制>删除 ASO 文件。

这也是 CS3 中引入的“I-am-not-seeing-my-changes-so-let-me-add-a-trace-now-everything-works”错误的原因。

Try deleting your ASO files.

ASO files are cached compiled versions of your class files. Although the IDE is a lot better at letting go of old caches when changes are made, sometimes you have to manually delete them. To delete ASO files: Control>Delete ASO Files.

This is also the cause of the "I-am-not-seeing-my-changes-so-let-me-add-a-trace-now-everything-works" bug that was introduced in CS3.

沐歌 2024-08-27 07:19:39

如果使用另一台机器编译怎么办?全新安装的会很可爱。我希望你的机器不会嫉妒。

What if you compile it using another machine? A fresh installed one would be lovely. I hope your machine is not jealous.

茶花眉 2024-08-27 07:19:39

我发现了一种可能有帮助的相关行为(听起来您的具体问题似乎更深入):

Flash 通过查看时间戳来检查源文件是否需要重新编译。如果其编译版本比源文件,它将重新编译。但它不检查编译版本是否是从同一源文件生成的。

具体来说,如果您的动作脚本文件处于版本控制之下,并且您恢复更改,则恢复的文件通常会有较旧的时间戳,Flash 将忽略它。

I have found one related behaviour that may help (sounds like your specific problem runs deeper though):

Flash checks whether a source file needs recompiling by looking at timestamps. If its compiled version is older than the source file, it will recompile. But it doesn't check whether the compiled version was generated from the same source file or not.

Specifically, if you have your actionscript files under version control, and you Revert a change, the reverted file will usually have an older timestamp, and Flash will ignore it.

-小熊_ 2024-08-27 07:19:39

另外,要使用新的命名空间类,您也可以这样做

var jenine:com.newnamespace.subspace.Jenine = com.newnamespace.subspace.Jenine()

Also, to use your new namespaced class you can also do

var jenine:com.newnamespace.subspace.Jenine = com.newnamespace.subspace.Jenine()
匿名。 2024-08-27 07:19:39

您有多个 swf 文件吗?如果您的类在其中一个 swf 中导入,则其他 swf 也将使用该类的相同版本。在一个 swf 中使用一个带有 * 的旧导入即可完成此操作。重新编译所有内容,看看它是否有效。

Do you have several swf-files? If your class is imported in one of the swf's, other swf's will also use the same version of the class. One old import with * in one swf will do it. Recompile everything and see if it works.

最单纯的乌龟 2024-08-27 07:19:39

使用 grep 模拟在整个项目文件夹的文件中查找字符串 oldnamespaceJenine。然后你就会知道下一步该做什么。

Use a grep analog to find the strings oldnamespace and Jenine inside the files in your whole project folder. Then you'd know what step to do next.

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