Flash Builder的4.5:S:的WindowedApplication不初始化 [英] Flash Builder 4.5: s:WindowedApplication does not initialize

查看:260
本文介绍了Flash Builder的4.5:S:的WindowedApplication不初始化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个非常类似的问题<一href="http://stackoverflow.com/questions/6588657/swindowedapplication-is-empty-and-does-not-initialize-show-child-components">here,但所提供的答案并没有为我工作。

这是我在做什么:

  • 创建一个Flex(airTest)项目,并用4.5选择桌面的应用程序类型 SKD。
  • 按钮添加到主应用程序,改变背景颜色。
  • 编译该项目。 我什么也没看到。我必须从任务管理器杀了ADL。

如果我去编辑airTest-app.xml中,改变可见默认为真,当我编译我在这里看到了正确的背景颜色设置的镶边。

如果我改变从&LT WindowedApplication标记; S:的WindowedApplication &LT; MX:的WindowedApplication 它的工作原理它应该。

在code是pretty的简单,但我会贴吧,以防万一:

 &LT; XML版本=1.0编码=UTF-8&GT?;
&LT; MX:的WindowedApplication
    的xmlns:FX =htt​​p://ns.adobe.com/mxml/2009
    的xmlns:MX =库://ns.adobe.com/flex/mx
    XMLNS:S =库://ns.adobe.com/flex/spark
    的backgroundColor =#ff3366
    的creationComplete =_ onCerationComplete();&GT;

    &LT; FX:脚本&GT;
        &LT;![CDATA [
            / **
             *设置的图标和菜单。
             ** /
            私有函数_onCerationComplete():无效{
                跟踪(关于建立完整的);
            }

            私有函数_onButtonInitialize():无效
            {
                跟踪(按钮);
            }
        ]]≥
    &LT; / FX:脚本&GT;
    &LT; S:按钮标签=测试初始化=_ onButtonInitialize()/&GT;
&LT; / MX:的WindowedApplication&GT;
 

而airTest-app.xml中(零下意见,并没有用过的东西)

 &LT; XML版本=1.0编码=UTF-8独立=无&GT?;
&lt;应用的xmlns =htt​​p://ns.adobe.com/air/application/2.6&GT;
    &LT; ID&GT; airTest&LT; / ID&GT;
    &LT;文件名&GT; airTest&LT; /文件名&GT;
    &LT;名称&gt;&airTest LT; /名称&gt;
    &LT;的versionNumber&GT; 0.0.0&LT; /的versionNumber&GT;
    &LT; initialWindow&GT;
        &LT;内容&GT;该值将通过Flash Builder的输出app.xml中覆盖] LT; /内容&GT;
        &LT;在autoOrients&GT;假&LT; /在autoOrients&GT;
        &LT;全屏&GT;假&LT; /全屏&GT;
        &其中;可见&GT;真&所述; /可见光&GT;
    &LT; / initialWindow&GT;
&LT; /用途&gt;
 

解决方案

我发现了一个线程在Adobe论坛上解决了这个问题。

原来有一个文件(mm.cfg中),其被损坏一些如何。通过删除该文件,一切都将按预期。

在我的Windows 7中,该文件位于: C:\用户{​​UsuarName} \的mm.cfg

这是相同的文件让我<一个href="http://superuser.com/questions/303807/flash-player-general-runtime-error-dialog-will-not-pop-up">going坚果出于不同的原因不是很久以前...

There is a really similar question here, but the provided answer does not work for me.

This is what I'm doing:

  • Create a Flex (airTest) project and chose Desktop as application type using 4.5 SKD.
  • Add a Button to the main application and change the background color.
  • Compile the project. I don't see anything. I have to kill adl from the Task Manager.

If I go and edit the airTest-app.xml and change the visible from the default to true, when i compile i get to see the chrome with the correct background color set.

If I change the WindowedApplication tag from <s:WindowedApplication to <mx:WindowedApplication it works as it should.

The code is pretty simple, but I will paste it just in case:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark"
    backgroundColor="#ff3366"
    creationComplete="_onCerationComplete();">

    <fx:Script>
        <![CDATA[
            /**
             * Set up the icon and menus.
             **/
            private function _onCerationComplete():void {
                trace("on creation complete");
            }

            private function _onButtonInitialize():void
            {
                trace("Button");
            }
        ]]>
    </fx:Script>
    <s:Button label="Test" initialize="_onButtonInitialize()"/>
</mx:WindowedApplication>

And the airTest-app.xml (minus comments and unused stuff )

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/2.6">
    <id>airTest</id>
    <filename>airTest</filename>
    <name>airTest</name>
    <versionNumber>0.0.0</versionNumber>
    <initialWindow>
        <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
        <autoOrients>false</autoOrients>
        <fullScreen>false</fullScreen>
        <visible>true</visible>
    </initialWindow>
</application>

解决方案

I found a thread on the Adobe Forums that solved the problem.

It turns out there is a file (mm.cfg) that gets corrupted some how. By deleting that file, everything works as expected.

In my Windows 7 box, the file is located at: C:\Users{UsuarName}\mm.cfg

That same file got me going nuts for a different reason not that long ago...

这篇关于Flash Builder的4.5:S:的WindowedApplication不初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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