WindowShade 和 CollapsibleAccordion 问题,从 Flex3 迁移到 Flex4

发布于 2024-11-05 13:17:18 字数 3731 浏览 1 评论 0原文

我的代码中有两个问题:

第一:WindowShade 存在问题。我的应用程序中有一个 WindowShade,当我单击运行它时,一切都会挂起。当我使用 Flex3 编译时,这工作得很好。

代码如下所示:

<mdi_containers:MDIWindow xmlns:mdi_containers="flexlib.mdi.containers.*"
xmlns:flexlib_controls="flexlib.controls.*"                
xmlns:mx="http://www.adobe.com/2006/mxml"      
xmlns:containers="flexlib.containers.*"
          width="800" layout="absolute"
          height="500" title="News Articles"       
          textAlign="center"
          verticalGap="0" horizontalGap="0"
      minWidth="800"
          minHeight="500">
    <mx:Canvas  width="100%" styleName="roundedBottomCorner">

    <containers:WindowShade id="wshade_fox" top="0" width="100%" opened="false" visible="true"
            openIcon="{null}" closeIcon="{null}" paddingTop="0" 
            headerRenderer="{new ClassFactory(c7.views.components.news.header)}">                                              
<mx:VBox horizontalScrollPolicy="off" width="100%" height="225" verticalGap="0" horizontalGap="0">
</mx:VBox>                                     
                        </containers:WindowShade>                                           
</mx:Canvas>

第二:CollapsibleAccordion。我在 CollapsibleAccordion 中有两个画布,在 Flex4 中一切都工作正常,但唯一的问题是我看不到画布上的标签。

这个问题的代码如下:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"                
            xmlns:cal="cal.*"
            layout="absolute"
            addedToStage="stage_init()"
applicationComplete="init()"                            
        xmlns:geometry="com.degrafa.geometry.*"
        xmlns:degrafa="com.degrafa.*"
        xmlns:paint="com.degrafa.paint.*"
        xmlns:containers="flexlib.containers.*"
        xmlns:flexlib_controls="flexlib.controls.*"
        xmlns:mdi_containers="flexlib.mdi.containers.*"
        xmlns:auto="com.hillelcoren.components.*" 
        xmlns:local="*" backgroundColor="#f7fafe" backgroundGradientColors="[#f7fafe, #6caaeb]"
        xmlns:components="CollapsibleAccordion.*"
        xmlns:notifications="c7.views.components.notifications.*"
        xmlns:dbview="c7.views.apps.dashboard.*"
        modalTransparency="0.8" preloader="c7.views.components.Pre"
        modalTransparencyColor="0x000000" verticalScrollPolicy="auto"
        backgroundSize="100%"               
        xmlns:components1="c7.views.components.*" 
        xmlns:notification="c7.views.components.notification.*" 
        xmlns:news="c7.views.components.news.*">    
    <mdi_containers:MDICanvas id="mdic" horizontalScrollPolicy="off" verticalScrollPolicy="off"
        visible="{!GlobalModel.getInstance().dashboard_mode}"
         minWidth="{top_bar.width}"
        width="100%" height="100%" top="{top_bar.height}" backgroundAlpha="0">                              
       <mx:Canvas id="cvs_widget_bar" right="0" top="0" height="100%">
            <components:CollapsibleAccordion id="collapsibleAccordion1" height="100%" top="0" right="0"
                orientation="left" barSize="30" currentWidth="30" openSize="150"
                drawerButtonStyle="drawerButton" closeButtonStyle="drawerCloseRight" accordianStyle="drawerAccordion">
                <mx:Canvas width="100%" top="0" right="0" height="100%" label="Widget Bar">

                </mx:Canvas>
                <mx:Canvas width="100%" height="100%" label="Feedback" icon="{IconUtility.getClass(cvs_comment,'assets/cloud_main/images/article-48x48.png')}"
                    id="cvs_comment" top="0" right="0">

                </mx:Canvas>
            </components:CollapsibleAccordion>
        </mx:Canvas>    

I have two problems in my code:

First: is with the WindowShade. I have a WindowShade in my application, and the moment I click to run this everything just hangs up. This was working fine when I was using the Flex3 to compile.

The code looks like:

<mdi_containers:MDIWindow xmlns:mdi_containers="flexlib.mdi.containers.*"
xmlns:flexlib_controls="flexlib.controls.*"                
xmlns:mx="http://www.adobe.com/2006/mxml"      
xmlns:containers="flexlib.containers.*"
          width="800" layout="absolute"
          height="500" title="News Articles"       
          textAlign="center"
          verticalGap="0" horizontalGap="0"
      minWidth="800"
          minHeight="500">
    <mx:Canvas  width="100%" styleName="roundedBottomCorner">

    <containers:WindowShade id="wshade_fox" top="0" width="100%" opened="false" visible="true"
            openIcon="{null}" closeIcon="{null}" paddingTop="0" 
            headerRenderer="{new ClassFactory(c7.views.components.news.header)}">                                              
<mx:VBox horizontalScrollPolicy="off" width="100%" height="225" verticalGap="0" horizontalGap="0">
</mx:VBox>                                     
                        </containers:WindowShade>                                           
</mx:Canvas>

Second: The CollapsibleAccordion. I have two canvas inside the CollapsibleAccordion, and everything works fine in Flex4 also, but the only problem, that i am unable to see the label on the Canvas.

The code for this problem is below:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"                
            xmlns:cal="cal.*"
            layout="absolute"
            addedToStage="stage_init()"
applicationComplete="init()"                            
        xmlns:geometry="com.degrafa.geometry.*"
        xmlns:degrafa="com.degrafa.*"
        xmlns:paint="com.degrafa.paint.*"
        xmlns:containers="flexlib.containers.*"
        xmlns:flexlib_controls="flexlib.controls.*"
        xmlns:mdi_containers="flexlib.mdi.containers.*"
        xmlns:auto="com.hillelcoren.components.*" 
        xmlns:local="*" backgroundColor="#f7fafe" backgroundGradientColors="[#f7fafe, #6caaeb]"
        xmlns:components="CollapsibleAccordion.*"
        xmlns:notifications="c7.views.components.notifications.*"
        xmlns:dbview="c7.views.apps.dashboard.*"
        modalTransparency="0.8" preloader="c7.views.components.Pre"
        modalTransparencyColor="0x000000" verticalScrollPolicy="auto"
        backgroundSize="100%"               
        xmlns:components1="c7.views.components.*" 
        xmlns:notification="c7.views.components.notification.*" 
        xmlns:news="c7.views.components.news.*">    
    <mdi_containers:MDICanvas id="mdic" horizontalScrollPolicy="off" verticalScrollPolicy="off"
        visible="{!GlobalModel.getInstance().dashboard_mode}"
         minWidth="{top_bar.width}"
        width="100%" height="100%" top="{top_bar.height}" backgroundAlpha="0">                              
       <mx:Canvas id="cvs_widget_bar" right="0" top="0" height="100%">
            <components:CollapsibleAccordion id="collapsibleAccordion1" height="100%" top="0" right="0"
                orientation="left" barSize="30" currentWidth="30" openSize="150"
                drawerButtonStyle="drawerButton" closeButtonStyle="drawerCloseRight" accordianStyle="drawerAccordion">
                <mx:Canvas width="100%" top="0" right="0" height="100%" label="Widget Bar">

                </mx:Canvas>
                <mx:Canvas width="100%" height="100%" label="Feedback" icon="{IconUtility.getClass(cvs_comment,'assets/cloud_main/images/article-48x48.png')}"
                    id="cvs_comment" top="0" right="0">

                </mx:Canvas>
            </components:CollapsibleAccordion>
        </mx:Canvas>    

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

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

发布评论

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

评论(1

凉世弥音 2024-11-12 13:17:18

我在从 Flex 3 到 Flex 4 的 WindowShade 中遇到了类似的问题。我必须为 headerClass 定义一个按钮。由于我有一堆 WindowShades,所以我在样式表中添加了:

flexlib|WindowShade {
   headerClass:ClassReference("mx.controls.Button");
}

或者,如果您希望在声明 WindowShade 时添加,您可以在 MXML 中添加:

headerClass="mx.controls.Buttons" 

...这样您的“wshade_fox”声明看起来像这样:

<containers:WindowShade id="wshade_fox" top="0" width="100%" opened="false" visible="true"
        openIcon="{null}" closeIcon="{null}" paddingTop="0" 
        headerRenderer="{new ClassFactory(c7.views.components.news.header)}"
        headerClass="mx.controls.Button">

希望帮助您解决问题的第一部分。

I had simliar problems with WindowShade going from Flex 3 to Flex 4. I had to define a button for the headerClass. Since I had a bunch of WindowShades, I added in my style sheet:

flexlib|WindowShade {
   headerClass:ClassReference("mx.controls.Button");
}

Or, if you want when you declare a WindowShade, you can add in your MXML:

headerClass="mx.controls.Buttons" 

...so that way your "wshade_fox" declaration looks something like:

<containers:WindowShade id="wshade_fox" top="0" width="100%" opened="false" visible="true"
        openIcon="{null}" closeIcon="{null}" paddingTop="0" 
        headerRenderer="{new ClassFactory(c7.views.components.news.header)}"
        headerClass="mx.controls.Button">

Hope that helps the first part of your problem.

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