You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/05/14 03:47:39 UTC

[1/3] git commit: [flex-sdk] [refs/heads/develop] - cleaned up RTE check

Updated Branches:
  refs/heads/develop 1eaf95479 -> 8133e4ffd


cleaned up RTE check


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/975e4c26
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/975e4c26
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/975e4c26

Branch: refs/heads/develop
Commit: 975e4c26cf91ab105df5d873d2a42852ca9c2cc0
Parents: 1eaf954
Author: Justin Mclean <jm...@apache.org>
Authored: Tue May 14 11:43:01 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Tue May 14 11:43:01 2013 +1000

----------------------------------------------------------------------
 .../AdvancedDataGridColumn.as                      |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/975e4c26/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as b/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
index 520bf5b..d015779 100644
--- a/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
+++ b/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
@@ -1725,9 +1725,9 @@ public class AdvancedDataGridColumn extends CSSStyleDeclaration implements IIMES
     private function itemToLabelWithoutFormatting(data:Object):String
     {
         var headerInfo:AdvancedDataGridHeaderInfo  = owner.mx_internal::getHeaderInfo(this);
-        //In case of Column grouping, when a column has a parent with dataField/labelFunction set, this column is
-        //supposed to take value from what its parent supplies it
-        if(headerInfo && headerInfo.internalLabelFunction!=null)
+        // In case of Column grouping, when a column has a parent with dataField/labelFunction set, this column is
+        // supposed to take value from what its parent supplies it
+		if (headerInfo != null && headerInfo.internalLabelFunction != null)
             data = headerInfo.internalLabelFunction(data, this);
    
         if (!data)


[2/3] git commit: [flex-sdk] [refs/heads/develop] - Fixed RTE issue when change columns at run time. If you changed from a grid with a larger number of columns to one with a smaller number the headerInfo was being cached. This could cause an RTE.

Posted by jm...@apache.org.
Fixed RTE issue when change columns at run time. If you changed from a grid with a larger number of columns to one with a smaller number the headerInfo was being cached. This could cause an RTE.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/0a5f1fbc
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/0a5f1fbc
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/0a5f1fbc

Branch: refs/heads/develop
Commit: 0a5f1fbc4880382a5d257c35723019a8d4f9d92a
Parents: 975e4c2
Author: Justin Mclean <jm...@apache.org>
Authored: Tue May 14 11:44:40 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Tue May 14 11:44:40 2013 +1000

----------------------------------------------------------------------
 .../src/mx/controls/AdvancedDataGrid.as            |   30 ++++++++------
 1 files changed, 17 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/0a5f1fbc/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
index 8efb397..231929a 100644
--- a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
+++ b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
@@ -2221,12 +2221,12 @@ public class AdvancedDataGrid extends AdvancedDataGridBaseEx
      */
     override protected function createHeaders(left:Number, top:Number):void
     {       
-        if(!columnGrouping)
+        if (!columnGrouping)
         {
             var creatingHeaders:Boolean = false;
-            if(horizontalScrollPolicy != ScrollPolicy.OFF && getOptimumColumns()!= visibleColumns)
+            if (horizontalScrollPolicy != ScrollPolicy.OFF && getOptimumColumns()!= visibleColumns)
             {
-                if(!headerItems[0] || !headerItems[0][0] || (top < headerItems[0][0].y + headerItems[0][0].height)) 
+                if (!headerItems[0] || !headerItems[0][0] || (top < headerItems[0][0].y + headerItems[0][0].height)) 
                     creatingHeaders = true;
             }
 
@@ -2813,7 +2813,7 @@ public class AdvancedDataGrid extends AdvancedDataGridBaseEx
         // based on the dataProvider. Thus setting of columns by dataProvider
         // falls in the same cycle of commitProperties and if moved above will 
         // not get picked unless a second call to commitProperties come
-        if(groupedColumnsChanged)
+        if (groupedColumnsChanged)
         {
             columnGrouping = true;
             columnsChanged = false;
@@ -2833,19 +2833,23 @@ public class AdvancedDataGrid extends AdvancedDataGridBaseEx
 
             super.columns = getLeafColumns(_groupedColumns.slice(0));
         }
-        else if(columnsChanged)
+        else if (columnsChanged)
         {
             columnGrouping = false;
             columnsChanged = false;
 
             removeOldHeaders();
+			
+			columnsToInfo = new Dictionary();
+			headerInfos = initializeHeaderInfo(_columnsValue);
+			
+			headerInfoInitialized = true;
 
             super.columns = _columnsValue;
         }
 
         if (displayItemsExpandedChanged)
         {
-            displayItemsExpandedChanged = false;
             // if displayItemsExpanded is set to true, then expand all the items.
             if (displayItemsExpanded)
                 expandAll();
@@ -3324,15 +3328,15 @@ public class AdvancedDataGrid extends AdvancedDataGridBaseEx
     
     /**
      *  @private
-     *  Initialized the headerInfos structure w.r.t to the groupedColumns 
+     *  Initialized the headerInfos structure w.r.t to the columns 
      *  configuration
      */
-    override protected function initializeHeaderInfo(groupedColumns:Array):Array
+    override protected function initializeHeaderInfo(columns:Array):Array
     {
-        if(!columnGrouping)
-            return super.initializeHeaderInfo(groupedColumns);
+        if (!columnGrouping)
+            return super.initializeHeaderInfo(columns);
         else
-            return initializeGroupedHeaderInfo(groupedColumns, null,0,null);
+            return initializeGroupedHeaderInfo(columns, null,0,null);
     }
     
     /**
@@ -3340,7 +3344,7 @@ public class AdvancedDataGrid extends AdvancedDataGridBaseEx
      */
     override protected function createDisplayableColumns():void
     {
-        if(!columnGrouping)
+        if (!columnGrouping)
         {
             super.createDisplayableColumns();
         }
@@ -3364,7 +3368,7 @@ public class AdvancedDataGrid extends AdvancedDataGridBaseEx
      */
     override protected function updateVisibleHeaders():Array
     {
-        if(!columnGrouping)
+        if (!columnGrouping)
             return super.updateVisibleHeaders();
         else
             return updateVisibleHeaderInfos(headerInfos).infos;


Re: [3/3] git commit: [flex-sdk] [refs/heads/develop] - As the columns may not be committed yet initialiseHeaderInfo needs to use the column array passed not the internal one. Method is also called for non grouped columns. Caused the occasional RTE whe...

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> [1] http://answers.yahoo.com/question/index?qid=20100313060726AAdrIS8

Not quite "would have" -> "would've" which can be misheard as "would of", you don't have the same issue with "not have" (as not've is not exactly common usage). Either way have works for me if you want to change it.

Justin

Re: [3/3] git commit: [flex-sdk] [refs/heads/develop] - As the columns may not be committed yet initialiseHeaderInfo needs to use the column array passed not the internal one. Method is also called for non grouped columns. Caused the occasional RTE whe...

Posted by Alex Harui <ah...@adobe.com>.


On 5/13/13 8:28 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

> On May 13, 2013 8:25 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:
>> 
>> Hi,
>> 
>>> Shouldn't this be "...may not have been..."?
>> No but change it if you want. Non US English perhaps?
>> 
>> Justin
> 
> I always thought that was how Australians said that :-)
I don't think it is just Australians.  But [1] says I should go and change
it.

[1] http://answers.yahoo.com/question/index?qid=20100313060726AAdrIS8

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [3/3] git commit: [flex-sdk] [refs/heads/develop] - As the columns may not be committed yet initialiseHeaderInfo needs to use the column array passed not the internal one. Method is also called for non grouped columns. Caused the occasional RTE whe...

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On May 13, 2013 8:25 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:
>
> Hi,
>
> > Shouldn't this be "...may not have been..."?
> No but change it if you want. Non US English perhaps?
>
> Justin

I always thought that was how Australians said that :-)

Om

Re: [3/3] git commit: [flex-sdk] [refs/heads/develop] - As the columns may not be committed yet initialiseHeaderInfo needs to use the column array passed not the internal one. Method is also called for non grouped columns. Caused the occasional RTE whe...

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> Shouldn't this be "...may not have been..."?
No but change it if you want. Non US English perhaps?

Justin

Re: [3/3] git commit: [flex-sdk] [refs/heads/develop] - As the columns may not be committed yet initialiseHeaderInfo needs to use the column array passed not the internal one. Method is also called for non grouped columns. Caused the occasional RTE whe...

Posted by Alex Harui <ah...@adobe.com>.


On 5/13/13 6:47 PM, "jmclean@apache.org" <jm...@apache.org> wrote:

> AdvancedDataGridBase implements IIME
>      
>      /**
>       *  @private
> +  * 
> +  * Note columns may not of been committed at this point.
Shouldn't this be "...may not have been..."?

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [3/3] git commit: [flex-sdk] [refs/heads/develop] - As the columns may not be committed yet initialiseHeaderInfo needs to use the column array passed not the internal one. Method is also called for non grouped columns. Caused the occasional RTE whe...

Posted by Alex Harui <ah...@adobe.com>.


On 5/13/13 6:47 PM, "jmclean@apache.org" <jm...@apache.org> wrote:

> AdvancedDataGridBase implements IIME
>      
>      /**
>       *  @private
> +  * 
> +  * Note columns may not of been committed at this point.
Shouldn't this be "...may not have been..."?

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


[3/3] git commit: [flex-sdk] [refs/heads/develop] - As the columns may not be committed yet initialiseHeaderInfo needs to use the column array passed not the internal one. Method is also called for non grouped columns. Caused the occasional RTE when comb

Posted by jm...@apache.org.
As the columns may not be committed yet initialiseHeaderInfo needs to use the column array passed not the internal one. Method is also called for non grouped columns. Caused the occasional RTE when combined with changing columns at run time.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/8133e4ff
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/8133e4ff
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/8133e4ff

Branch: refs/heads/develop
Commit: 8133e4ffde5a188314ad32b7a50a17405ae0fe1f
Parents: 0a5f1fb
Author: Justin Mclean <jm...@apache.org>
Authored: Tue May 14 11:47:20 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Tue May 14 11:47:20 2013 +1000

----------------------------------------------------------------------
 .../src/mx/controls/AdvancedDataGridBaseEx.as      |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/8133e4ff/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
index b96ad1a..edc4161 100644
--- a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
+++ b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
@@ -2872,8 +2872,10 @@ public class AdvancedDataGridBaseEx extends AdvancedDataGridBase implements IIME
     
     /**
      *  @private
+	 * 
+	 * Note columns may not of been committed at this point.
      */
-    protected function initializeHeaderInfo(a:Array):Array
+    protected function initializeHeaderInfo(columns:Array):Array
     {
         var newArray:Array = [];
         var n:int = columns.length;