incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject svn commit: r1303283 - in /incubator/flex/whiteboard/jmclean/datagrid/src: DataTipNullBindingSpark.mxml DataTipNullBindling.mxml
Date Wed, 21 Mar 2012 05:05:45 GMT
Author: jmclean
Date: Wed Mar 21 05:05:44 2012
New Revision: 1303283

URL: http://svn.apache.org/viewvc?rev=1303283&view=rev
Log:
Data tip issue examples

Added:
    incubator/flex/whiteboard/jmclean/datagrid/src/DataTipNullBindingSpark.mxml
    incubator/flex/whiteboard/jmclean/datagrid/src/DataTipNullBindling.mxml

Added: incubator/flex/whiteboard/jmclean/datagrid/src/DataTipNullBindingSpark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jmclean/datagrid/src/DataTipNullBindingSpark.mxml?rev=1303283&view=auto
==============================================================================
--- incubator/flex/whiteboard/jmclean/datagrid/src/DataTipNullBindingSpark.mxml (added)
+++ incubator/flex/whiteboard/jmclean/datagrid/src/DataTipNullBindingSpark.mxml Wed Mar 21
05:05:44 2012
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
+			   xmlns:s="library://ns.adobe.com/flex/spark" 
+			   xmlns:mx="library://ns.adobe.com/flex/mx" initialize="init(event)">
+	<s:layout>
+		<s:VerticalLayout />
+	</s:layout>
+	
+	<fx:Script>
+		<![CDATA[
+			import mx.collections.ArrayCollection;
+			import mx.events.FlexEvent;
+			
+			/*
+			* ISSUE: data tips show for all lines when showDataTips="true" and should only show up
for long lines
+			*
+			* WORKAROUND: None that I'm aware of
+			*
+			* NOTE s:List doesn't support dataTips unlike mx:List 
+			*/
+			
+			[Bindable] public var strings:ArrayCollection = new ArrayCollection(["one","two","a long
line for the number three","four","five","six","seven","eight","nine","ten"]);		
+			[Bindable] public var objects:ArrayCollection = new ArrayCollection();
+			
+			protected function init(event:FlexEvent):void {
+				for each (var label:String in strings) {
+			 		objects.addItem({label:label});
+				}
+			}			
+		]]>
+	</fx:Script>
+	
+	<s:DataGrid dataProvider="{objects}" showDataTips="true" />
+	
+</s:Application>

Added: incubator/flex/whiteboard/jmclean/datagrid/src/DataTipNullBindling.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/jmclean/datagrid/src/DataTipNullBindling.mxml?rev=1303283&view=auto
==============================================================================
--- incubator/flex/whiteboard/jmclean/datagrid/src/DataTipNullBindling.mxml (added)
+++ incubator/flex/whiteboard/jmclean/datagrid/src/DataTipNullBindling.mxml Wed Mar 21 05:05:44
2012
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
+			   xmlns:s="library://ns.adobe.com/flex/spark" 
+			   xmlns:mx="library://ns.adobe.com/flex/mx" initialize="init(event)">
+	<s:layout>
+		<s:VerticalLayout />
+	</s:layout>
+	
+	<fx:Script>
+		<![CDATA[
+			import mx.collections.ArrayCollection;
+			import mx.events.FlexEvent;
+			
+			/*
+			* ISSUE: data tips show for all lines when showDataTips="true" and should only show up
for long lines
+			*
+			* WORKAROUND: dataTipField="{null}" in MXML or adg.dataTipField = null in AS
+			*
+			* Note mx:DataGrid and mx:List have the same issue
+			*/
+			
+			[Bindable] public var strings:ArrayCollection = new ArrayCollection(["one","two","a long
line for the number three","four","five","six","seven","eight","nine","ten"]);		
+			[Bindable] public var objects:ArrayCollection = new ArrayCollection();
+			
+			protected function init(event:FlexEvent):void {
+				for each (var label:String in strings) {
+			 		objects.addItem({label:label});
+				}
+			}			
+		]]>
+	</fx:Script>
+	
+	<mx:AdvancedDataGrid dataProvider="{strings}" showDataTips="true" dataTipField="{null}"
/>
+	
+	<mx:DataGrid dataProvider="{strings}" showDataTips="true" dataTipField="{null}" />
+	
+	<mx:List dataProvider="{strings}" showDataTips="true" dataTipField="{null}" />
+	
+</s:Application>



Mime
View raw message