I have removed RowHeightBead because we have "rowHeight" property on datagrid which as I understand should do exactly same what this removed Bead. DataGrid on Flash side looks like that right now [1] - It's not good, but more worries me js. [2] - Two errors in Firebug console. Both are pointing me to the line with "constructor".
What could be the root cause ?

Additionally debugger totally stopped working for me and I can't figure out why. :(

[ 1] http://images.devs-on.net/Image/rqtWOhYFiOqQUz6y-Cayekran.png
[2] https://paste.apache.org/2nq3
[3] http://images.devs-on.net/Image/NJirmhpSKeoa4BEr-Obszar.png

Piotr

W dniu 2015-07-07 o 23:26, pio...@apache.org pisze:
Repository: flex-asjs
Updated Branches:
   refs/heads/develop 64870856f -> 75cd6d171


It seems that we do not need RowHeightBead anymore.
Move jpg files to assets folder


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/75cd6d17
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/75cd6d17
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/75cd6d17

Branch: refs/heads/develop
Commit: 75cd6d171202bb0c62d970f27119ea114ced41f2
Parents: 6487085
Author: piotrz <pio...@apache.org>
Authored: Tue Jul 7 23:24:52 2015 +0200
Committer: piotrz <pio...@apache.org>
Committed: Tue Jul 7 23:24:52 2015 +0200

----------------------------------------------------------------------
  examples/DataGridExample/src/MyInitialView.mxml |  18 +--
  .../src/assets/smallbluerect.jpg                | Bin 0 -> 13500 bytes
  .../src/assets/smallgreenrect.jpg               | Bin 0 -> 13542 bytes
  .../src/assets/smallorangerect.gif              | Bin 0 -> 821 bytes
  .../src/assets/smallorangerect.jpg              | Bin 0 -> 13571 bytes
  .../src/assets/smallpurplerect.jpg              | Bin 0 -> 13517 bytes
  .../DataGridExample/src/assets/smallredrect.jpg | Bin 0 -> 13477 bytes
  .../src/assets/smallyellowrect.jpg              | Bin 0 -> 13598 bytes
  .../DataGridExample/src/models/ProductsModel.as |  10 +-
  .../src/mybeads/RowHeightBead.as                | 153 -------------------
  examples/DataGridExample/src/smallbluerect.jpg  | Bin 13500 -> 0 bytes
  examples/DataGridExample/src/smallgreenrect.jpg | Bin 13542 -> 0 bytes
  .../DataGridExample/src/smallorangerect.gif     | Bin 821 -> 0 bytes
  .../DataGridExample/src/smallorangerect.jpg     | Bin 13571 -> 0 bytes
  .../DataGridExample/src/smallpurplerect.jpg     | Bin 13517 -> 0 bytes
  examples/DataGridExample/src/smallredrect.jpg   | Bin 13477 -> 0 bytes
  .../DataGridExample/src/smallyellowrect.jpg     | Bin 13598 -> 0 bytes
  17 files changed, 12 insertions(+), 169 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/MyInitialView.mxml 
b/examples/DataGridExample/src/MyInitialView.mxml
index 7716a40..dd51c7c 100644
--- a/examples/DataGridExample/src/MyInitialView.mxml
+++ b/examples/DataGridExample/src/MyInitialView.mxml
@@ -18,29 +18,25 @@ limitations under the License.
-->
  <js:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009";
-                               xmlns:js="library://ns.apache.org/flexjs/basic"
-                               xmlns:local="*"
-                               xmlns:models="models.*" 
xmlns:mybeads="mybeads.*">
+                               xmlns:js="library://ns.apache.org/flexjs/basic">
      <fx:Script>
          <![CDATA[
-                       
-                       private function dataGridChange() : void
-                       {
-                               output.text = "Clicked on row 
"+dataGrid.selectedIndex;
-                               trace("Click on row "+dataGrid.selectedIndex);
-                       }
+                private function dataGridChange() : void
+                {
+                        output.text = "Clicked on row "+dataGrid.selectedIndex;
+                        trace("Click on row "+dataGrid.selectedIndex);
+                }
                ]]>
      </fx:Script>
        
        <js:Label id="output" x="450" y="30" width="100" />
                
-       <js:DataGrid id="dataGrid" x="20" y="30" width="400" height="300" 
change="dataGridChange()" >
+       <js:DataGrid id="dataGrid" x="20" y="30" width="400" height="300" 
change="dataGridChange()" rowHeight="30">
                <js:beads>
                        <js:ConstantBinding
                                sourceID="applicationModel"
                                sourcePropertyName="productList"
                                destinationPropertyName="dataProvider" />
-                       <mybeads:RowHeightBead rowHeight="40" />
                </js:beads>
                <js:columns>
                        <js:DataGridColumn label="Image" dataField="image" columnWidth="100" 
itemRenderer="products.ProductItemRenderer" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/assets/smallbluerect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/assets/smallbluerect.jpg 
b/examples/DataGridExample/src/assets/smallbluerect.jpg
new file mode 100644
index 0000000..80ed275
Binary files /dev/null and 
b/examples/DataGridExample/src/assets/smallbluerect.jpg differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/assets/smallgreenrect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/assets/smallgreenrect.jpg 
b/examples/DataGridExample/src/assets/smallgreenrect.jpg
new file mode 100644
index 0000000..c5f9ce6
Binary files /dev/null and 
b/examples/DataGridExample/src/assets/smallgreenrect.jpg differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/assets/smallorangerect.gif
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/assets/smallorangerect.gif 
b/examples/DataGridExample/src/assets/smallorangerect.gif
new file mode 100644
index 0000000..603f810
Binary files /dev/null and 
b/examples/DataGridExample/src/assets/smallorangerect.gif differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/assets/smallorangerect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/assets/smallorangerect.jpg 
b/examples/DataGridExample/src/assets/smallorangerect.jpg
new file mode 100644
index 0000000..4982d87
Binary files /dev/null and 
b/examples/DataGridExample/src/assets/smallorangerect.jpg differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/assets/smallpurplerect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/assets/smallpurplerect.jpg 
b/examples/DataGridExample/src/assets/smallpurplerect.jpg
new file mode 100644
index 0000000..201f625
Binary files /dev/null and 
b/examples/DataGridExample/src/assets/smallpurplerect.jpg differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/assets/smallredrect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/assets/smallredrect.jpg 
b/examples/DataGridExample/src/assets/smallredrect.jpg
new file mode 100644
index 0000000..d2cfa31
Binary files /dev/null and 
b/examples/DataGridExample/src/assets/smallredrect.jpg differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/assets/smallyellowrect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/assets/smallyellowrect.jpg 
b/examples/DataGridExample/src/assets/smallyellowrect.jpg
new file mode 100644
index 0000000..b17b62d
Binary files /dev/null and 
b/examples/DataGridExample/src/assets/smallyellowrect.jpg differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/models/ProductsModel.as
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/models/ProductsModel.as 
b/examples/DataGridExample/src/models/ProductsModel.as
index 88f6662..e3a42a9 100644
--- a/examples/DataGridExample/src/models/ProductsModel.as
+++ b/examples/DataGridExample/src/models/ProductsModel.as
@@ -29,11 +29,11 @@ package models
                }
private var _productList:Array = [
-                       new 
Product("ps100","Widgets",44,200,"smallbluerect.jpg"),
-                       new 
Product("tx200","Thingys",5,285,"smallgreenrect.jpg"),
-                       new 
Product("rz300","Sprockets",80,105,"smallyellowrect.jpg"),
-                       new 
Product("dh440","Doohickies",10,340,"smallredrect.jpg"),
-                       new 
Product("ps220","Weejets",35,190,"smallorangerect.jpg")
+                       new 
Product("ps100","Widgets",44,200,"assets/smallbluerect.jpg"),
+                       new 
Product("tx200","Thingys",5,285,"assets/smallgreenrect.jpg"),
+                       new 
Product("rz300","Sprockets",80,105,"assets/smallyellowrect.jpg"),
+                       new 
Product("dh440","Doohickies",10,340,"assets/smallredrect.jpg"),
+                       new 
Product("ps220","Weejets",35,190,"assets/smallorangerect.jpg")
                        ];
                public function get productList():Array
                {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/mybeads/RowHeightBead.as
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/mybeads/RowHeightBead.as 
b/examples/DataGridExample/src/mybeads/RowHeightBead.as
deleted file mode 100644
index b5f711a..0000000
--- a/examples/DataGridExample/src/mybeads/RowHeightBead.as
+++ /dev/null
@@ -1,153 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package mybeads
-{
-
-       import org.apache.flex.core.IBead;
-       import org.apache.flex.core.IDataGridModel;
-       import org.apache.flex.core.IItemRendererParent;
-       import org.apache.flex.core.IStrand;
-       import org.apache.flex.core.UIBase;
-       import org.apache.flex.events.Event;
-       import org.apache.flex.events.IEventDispatcher;
-       import org.apache.flex.html.List;
-       import org.apache.flex.html.beads.DataGridView;
-       import org.apache.flex.html.beads.IListView;
-       
-       public class RowHeightBead implements IBead
-       {
-               public function RowHeightBead()
-               {
-               }
-               
-               private var _strand:IStrand;
-               public function set strand(value:IStrand):void
-               {
-                       _strand = value;
-                       
-                       
IEventDispatcher(_strand).addEventListener("layoutComplete",handleLayoutComplete);
-               }
-               
-               private var _rowHeight:Number = 30;
-               public function get rowHeight():Number
-               {
-                       return _rowHeight;
-               }
-               public function set rowHeight(value:Number):void
-               {
-                       _rowHeight = value;
-                       // dispatch some event which will trigger layout 
recalculation
-               }
-               
-               private var _minRowHeight:Number = 30;
-               public function get minRowHeight():Number
-               {
-                       return _minRowHeight;
-               }
-               public function set minRowHeight(value:Number):void
-               {
-                       _minRowHeight = value;
-                       // dispatch some event which will trigger layout 
recalculation
-               }
-               
-               private var _variableRowHeight:Boolean = false;
-               public function get variableRowHeight():Boolean
-               {
-                       return _variableRowHeight;
-               }
-               public function set variableRowHeight(value:Boolean):void
-               {
-                       _variableRowHeight = value;
-                       // dispatch some event which will trigger a layout 
recalculation
-               }
-               
-               private function handleLayoutComplete(event:Event):void
-               {
-                       if (variableRowHeight) {
-                               makeAllRowsVariableHeight(minRowHeight);
-                       }
-                       else {
-                               makeAllRowsSameHeight(rowHeight);
-                       }
-               }
-               
-               private function makeAllRowsSameHeight(newHeight:Number):void
-               {
-                       // this function forces every cell in the DataGrid to 
be the same height
-                       var view:DataGridView = 
_strand.getBeadByType(DataGridView) as DataGridView;
-                       var lists:Array = view.getColumnLists();
-                       
-                       for(var i:int=0; i < lists.length; i++)
-                       {
-                               var list:List = lists[i] as List;
-                               var listView:IListView = 
list.getBeadByType(IListView) as IListView;
-                               var p:IItemRendererParent = listView.dataGroup;
-                               var n:Number = (list.dataProvider as 
Array).length;
-
-                               for(var j:int=0; j < n; j++)
-                               {
-                                       var c:UIBase = 
p.getItemRendererForIndex(j) as UIBase;
-                                       c.height = newHeight;
-                               }
-                               
-                               IEventDispatcher(list).dispatchEvent( new 
Event("layoutNeeded") );
-                       }
-               }
-               
-               private function 
makeAllRowsVariableHeight(minHeight:Number):void
-               {
-                       // this function makes every cell in a row the same 
height
-                       // (at least minHeight) but all the rows can have 
different
-                       // heights
-                       var view:DataGridView = 
_strand.getBeadByType(DataGridView) as DataGridView;
-                       var lists:Array = view.getColumnLists();
-                       
-                       // future: maybe IDataGridModel.dataProvider should 
implement IDataProvider which
-                       // can have a length property and not assume that the 
.dataProvider is an Array.
-                       var n:Number = ((_strand.getBeadByType(IDataGridModel) 
as IDataGridModel).dataProvider as Array).length;
-                       
-                       for(var i:int=0; i < n; i++)
-                       {
-                               var maxHeight:Number = minHeight;
-                               for(var j:int=0; j < lists.length; j++)
-                               {
-                                       var list:List = lists[j] as List;
-                                       var listView:IListView = 
list.getBeadByType(IListView) as IListView;
-                                       var p:IItemRendererParent = 
listView.dataGroup;
-                                       var c:UIBase = 
p.getItemRendererForIndex(i) as UIBase;
-                                       maxHeight = 
Math.max(maxHeight,c.height);
-                               }
-                               for(j=0; j < lists.length; j++)
-                               {
-                                       list = lists[j] as List;
-                                       listView = 
list.getBeadByType(IListView) as IListView;
-                                       p = listView.dataGroup;
-                                       c = p.getItemRendererForIndex(i) as 
UIBase;
-                                       c.height = maxHeight;
-                               }
-                       }
-                       
-                       for(j=0; j < lists.length; j++)
-                       {
-                               list = lists[j] as List;
-                               IEventDispatcher(list).dispatchEvent( new 
Event("layoutNeeded") );
-                       }
-               }
-       }
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/smallbluerect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/smallbluerect.jpg 
b/examples/DataGridExample/src/smallbluerect.jpg
deleted file mode 100755
index 80ed275..0000000
Binary files a/examples/DataGridExample/src/smallbluerect.jpg and /dev/null 
differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/smallgreenrect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/smallgreenrect.jpg 
b/examples/DataGridExample/src/smallgreenrect.jpg
deleted file mode 100755
index c5f9ce6..0000000
Binary files a/examples/DataGridExample/src/smallgreenrect.jpg and /dev/null 
differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/smallorangerect.gif
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/smallorangerect.gif 
b/examples/DataGridExample/src/smallorangerect.gif
deleted file mode 100644
index 603f810..0000000
Binary files a/examples/DataGridExample/src/smallorangerect.gif and /dev/null 
differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/smallorangerect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/smallorangerect.jpg 
b/examples/DataGridExample/src/smallorangerect.jpg
deleted file mode 100755
index 4982d87..0000000
Binary files a/examples/DataGridExample/src/smallorangerect.jpg and /dev/null 
differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/smallpurplerect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/smallpurplerect.jpg 
b/examples/DataGridExample/src/smallpurplerect.jpg
deleted file mode 100755
index 201f625..0000000
Binary files a/examples/DataGridExample/src/smallpurplerect.jpg and /dev/null 
differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/smallredrect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/smallredrect.jpg 
b/examples/DataGridExample/src/smallredrect.jpg
deleted file mode 100644
index d2cfa31..0000000
Binary files a/examples/DataGridExample/src/smallredrect.jpg and /dev/null 
differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/75cd6d17/examples/DataGridExample/src/smallyellowrect.jpg
----------------------------------------------------------------------
diff --git a/examples/DataGridExample/src/smallyellowrect.jpg 
b/examples/DataGridExample/src/smallyellowrect.jpg
deleted file mode 100755
index b17b62d..0000000
Binary files a/examples/DataGridExample/src/smallyellowrect.jpg and /dev/null 
differ


Reply via email to