`
lxs647
  • 浏览: 523223 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Flex 4:The default property contents must be contiguous

 
阅读更多

In Flash Builder 4, when tried to create a MXML component and instantiate it in the main MXML application, I found that the "Outline" explorer is not displaying the correct tree view anymore, instead it displayed excalmatory marks for each of the components' icon:


And when I switched to the design view in the MXML editor, it failed to render the preview and showed an error message "The default property contents must be contiguous":


However, when I compiled and run the application, everything looked OK. I think this was just an error for the Flash Builder 4 failing to parse and render the outline and preview. The code which was generating such error looks like this:

Code - MXMLPlain Text
 
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"   
  3.                xmlns:s="library://ns.adobe.com/flex/spark"   
  4.                xmlns:mx="library://ns.adobe.com/flex/mx"   
  5.                xmlns:components="components.*">  
  6.     <fx:Declarations>  
  7.         <!-- Place non-visual elements (e.g., services, value objects) here -->  
  8.     </fx:Declarations>  
  9.       
  10.     <s:layout>  
  11.         <s:VerticalLayout horizontalAlign="center" paddingTop="20"/>  
  12.     </s:layout>  
  13.       
  14.     <!-- shorthand MXML bindings -->  
  15.     <s:TextInput id="sourceText" text="some value"/>  
  16.     <s:Label text="{sourceText.text}"/>  
  17.           
  18.     <!-- two-way bindings -->  
  19.     <s:TextInput id="input1" text="@{input2.text}"/>  
  20.     <s:TextInput id="input2"/>  
  21.       
  22.       
  23.     <!-- Using <fx:Binding> -->  
  24.     <s:TextInput id="sourceText2" text="some value 2"/>  
  25.     <s:Label id="destinationText"/>  
  26.     <fx:Binding source="sourceText2.text" destination="destinationText.text"/>  
  27.       
  28.     <!-- Instantiate a MXML component -->  
  29.     <components:MyComponent id="comp1"/>  
  30. </s:Application>  


As the error message said, the visual componets (default property contents) must  be contiguous. So I tried to move the "fx:Binding" tag to just behind the "fx:Declaration" tag, then the error went away.

Code - XML/HTMLPlain Text
 
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"   
  3.                xmlns:s="library://ns.adobe.com/flex/spark"   
  4.                xmlns:mx="library://ns.adobe.com/flex/mx"   
  5.                xmlns:components="components.*">  
  6.     <fx:Declarations>  
  7.         <!-- Place non-visual elements (e.g., services, value objects) here -->  
  8.     </fx:Declarations>  
  9.     <fx:Binding source="sourceText2.text" destination="destinationText.text"/>  
  10.       
  11.     <s:layout>  
  12.         <s:VerticalLayout horizontalAlign="center" paddingTop="20"/>  
  13.     </s:layout>  
  14.       
  15.     <!-- shorthand MXML bindings -->  
  16.     <s:TextInput id="sourceText" text="some value"/>  
  17.     <s:Label text="{sourceText.text}"/>  
  18.           
  19.     <!-- two-way bindings -->  
  20.     <s:TextInput id="input1" text="@{input2.text}"/>  
  21.     <s:TextInput id="input2"/>  
  22.           
  23.     <!-- Using <fx:Binding> -->  
  24.     <s:TextInput id="sourceText2" text="some value 2"/>  
  25.     <s:Label id="destinationText"/>  
  26.       
  27.     <!-- Instantiate a MXML component -->  
  28.     <components:MyComponent id="comp1"/>  
  29. </s:Application>  




Note that the "s:layout" from the spark library is also a non-visual component, so it can't be placed between any of the visual components neither, otherwise the same error would occur.

 

from:http://www.inluck.net/Blog/Flash-Builder-4-error-The-default-property-contents-must-be-contiguous

分享到:
评论

相关推荐

    VclZip pro v3.10.1

    This modification means that if you are creating zip files to be used as SFX's you will want to leave the OEMConvert property mentioned above, set to it's default value of True. Modified so that ...

    微软内部资料-SQL性能优化3

    Lesson 4: Information Collection and Analysis 63 Lesson 5: Concepts – Formulating and Implementing Resolution 81 Module 4: Troubleshooting Locking and Blocking Overview At the end of ...

    微软内部资料-SQL性能优化5

    Lesson 4: Information Collection and Analysis 61 Lesson 5: Formulating and Implementing Resolution 75 Module 6: Troubleshooting Query Performance Overview At the end of this module, you ...

    Algorithms in C++, Parts 1-4: Fundamentals, Data Structures, Sorting, Searching

    ### Algorithms in C++, Parts 1-4: Fundamentals, Data Structures, Sorting, Searching #### Part One: Fundamentals ##### Chapter One: Introduction 1. **Algorithms**: This chapter introduces the ...

    contiguous()方法

    contiguous()方法

    Cisco Press - OSPF Network Design Solutions, 2nd Edition

    Step 4: Provision the Hardware 186 Step 5: Deploy Protocol and Cisco IOS Software Features 187 OSPF Features 187 Cisco IOS Software Features 188 Step 6: Implement, Monitor, and Manage the Network 189 ...

    Finding Maximum Contiguous Subsequence Sum using divide-and-conquer approach

    最大连续子序列和(Maximal Contiguous Subsequence Sum,简称MCSS)问题是一个经典的计算机科学问题,主要涉及算法设计和分析,尤其是动态规划和分治策略。在这个问题中,目标是从一个整数数组中找到一个子序列,...

    实验三:数组及其应用.doc

    4. The fourth program concatenates two strings using the `strcat` function. 5. The fifth program converts a hexadecimal string to an integer. 6. The sixth program compares two strings and prints the ...

    dma-contiguous.rar_memory

    "dma-contiguous.rar_memory"这个压缩包文件可能包含的是关于Linux内核中连续内存分配器(Contiguous Memory Allocator)的源代码和头文件,用于DMA映射框架。 首先,我们来了解什么是连续内存。在DMA操作中,硬件...

    pytorch-contiguous() 函数.pdf

    ### PyTorch中contiguous()函数详解 #### 1. 背景 在深度学习领域,特别是使用PyTorch框架进行模型开发时,我们经常需要对张量(Tensor)进行各种各样的操作,比如切片(slicing)、视图(viewing)、扩展...

    Contiguous_List.cpp

    Contiguous_List.cpp

    子数组最大和 Maximal Contiguous Subsequent Sum Problem

    ### 子数组最大和问题(Maximal Contiguous Subsequent Sum Problem) #### 一、问题定义与背景 在计算机科学领域,子数组最大和问题(Maximal Contiguous Subsequent Sum Problem)是一个经典的问题,旨在从一个...

    CImg Reference

    - Copies of images can be made, either as deep copies (creating a new copy of the pixel data) or shallow copies (sharing the pixel data). **Image Methods:** - **Loading and Saving:** Functions like `...

    Advanced MFC Programming

    1.7. Modifying the Default Styles of Tool Bar 1.8. Dialog Bar 1.9. Resizable Dialog Bar Deriving New Class from CDialogBar Resizing Edit Control Dynamic Layout Using the New Class 1.10. Adding Flyby ...

    The Algorithm Design Manual (2rd Edition)

    3.1 Contiguous vs. Linked Data Structures 3.2 Stacks and Queues 3.3 Dictionaries 3.4 Binary Search Trees 3.5 Priority Queues 3.6 War Story: Stripping Triangulations 3.7 Hashing and Strings 3.8...

    CONTIGUOUS -- 连续运行的开始和停止索引:RUNS = CONTIGUOUS(A,NUM) 返回元素 NUM 连续运行的开始和停止索引-matlab开发

    RUNS = CONTIGUOUS(A,NUM) 返回向量 A 中元素 NUM 的连续运行的开始和停止索引。A 和 NUM 可以是整数或字符的向量。 输出 RUNS 是一个 2 列元胞数组,其中第一列的第 i 行包含来自向量 NUM 的第 i 个值,第二列的第 ...

    sort-contiguous:连续列表排序,类似于macOS Finder排序

    将使用数字后缀值进行排序,结果是: 0: "N1"1: "N2"2: "N10"3: "N100"入门要安装,请执行: npm i sort-contiguous然后,以以下方式导入到项目中: import { contiguousPrefixComparer , contiguousSuffixComparer ...

    0692-极智开发-解读pytorch contiguous函数

    0692_极智开发_解读pytorch contiguous函数

    数据结构 - 顺序表(Contiguous-List)

    **数据结构 - 顺序表(Contiguous-List)** 顺序表是数据结构中的一种基本类型,它是线性表的一种具体实现方式。在计算机科学中,数据结构的选择与操作直接影响到程序的效率和性能。理解并掌握顺序表的概念、特点以及...

    Microsoft Codeview and Utilities User's Guide

    The software may be used or copied only in accordance with the terms of the agreement. It is against the law to copy the software on any medium except as specifically allowed in the license or non...

Global site tag (gtag.js) - Google Analytics