You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2020/04/17 00:56:44 UTC

[royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 8f66e33  jewel-scrollToIndex: remove isolated function
8f66e33 is described below

commit 8f66e334aebb23c6bf802232de6f925a9e4a2a13
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Apr 17 02:56:40 2020 +0200

    jewel-scrollToIndex: remove isolated function
---
 .../jewel/beads/controls/list/scrollToIndex.as     | 97 ----------------------
 1 file changed, 97 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
deleted file mode 100644
index fd4f278..0000000
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
+++ /dev/null
@@ -1,97 +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 org.apache.royale.jewel.beads.controls.list
-{
-	import org.apache.royale.core.IItemRenderer;
-	import org.apache.royale.core.IItemRendererOwnerView;
-	import org.apache.royale.core.IStrand;
-	import org.apache.royale.html.beads.IListView;
-	import org.apache.royale.jewel.List;
-	import org.apache.royale.jewel.beads.models.ListPresentationModel;
-	
-	/**
-     *  Ensures that the data provider item at the given index is visible.
-     *  
-     *  If the item is visible, the <code>verticalScrollPosition</code>
-     *  property is left unchanged even if the item is not the first visible
-     *  item. If the item is not currently visible, the 
-     *  <code>verticalScrollPosition</code>
-     *  property is changed make the item the first visible item, unless there
-     *  aren't enough rows to do so because the 
-     *  <code>verticalScrollPosition</code> value is limited by the 
-     *  <code>maxVerticalScrollPosition</code> property.
-     *
-     *  @param index The index of the item in the data provider.
-     *
-     *  @return <code>true</code> if <code>verticalScrollPosition</code> changed.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Royale 0.9.7
-     */
-    public function scrollToIndex(list:IStrand, index:int):Boolean
-    {
-        var _list:List = list as List;
-        
-        COMPILE::SWF
-        {
-            // to implement
-
-            return false;
-        }
-
-		COMPILE::JS
-		{
-        var scrollArea:HTMLElement = _list.element;
-        var oldScroll:Number = scrollArea.scrollTop;
-
-        var totalHeight:Number = 0;
-        
-        if(_list.variableRowHeight)
-        {
-            var listView:IListView = list.getBeadByType(IListView) as IListView;
-            var dataGroup:IItemRendererOwnerView = listView.dataGroup;
-
-            //each item render can have its own height
-            var n:int = _list.dataProvider.length;
-            var irHeights:Array = [];
-            for (var i:int = 0; i <= index; i++)
-            {
-                var ir:IItemRenderer = dataGroup.getItemRendererForIndex(i) as IItemRenderer;
-                totalHeight += ir.element.clientHeight;
-                irHeights.push(totalHeight + ir.element.clientHeight - scrollArea.clientHeight);
-            }
-
-            scrollArea.scrollTop = Math.min(irHeights[index], totalHeight);
-
-        } else 
-        {
-            var rowHeight:Number;
-            // all items renderers with same height
-            rowHeight = isNaN(_list.rowHeight) ? ListPresentationModel.DEFAULT_ROW_HEIGHT : _list.rowHeight;
-            totalHeight = _list.dataProvider.length * rowHeight - scrollArea.clientHeight;
-            
-            scrollArea.scrollTop = Math.min(index * rowHeight, totalHeight);
-        }
-
-        return oldScroll != scrollArea.scrollTop; 
-		}
-    } 
-}


RE: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Posted by Yishay Weiss <yi...@hotmail.com>.
Glad you fixed it. Wasn’t in Core after all…

From: Carlos Rovira<ma...@apache.org>
Sent: Friday, April 17, 2020 8:11 PM
To: Apache Royale Development<ma...@royale.apache.org>
Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Hi Yishay,

just committed, sorry, I was not repairing on that file since is a new one
and I had several others new

sorry for the confusion

now all should work ok

Thanks

El vie., 17 abr. 2020 a las 19:05, Yishay Weiss (<yi...@hotmail.com>)
escribió:

> I’m getting
>
>      [java]
> C:\dev\flexjs\royale-asjs\frameworks\projects\Jewel\src\main\royale\org\apache\royale\jewel\List.as(277):
> col: 20 Error: Access of possibly undefine
> d property IScrollToIndexView.
>
> When building Jewel.
>
> I searched IScrollToIndexView and it doesn’t exist.
>
> From: Carlos Rovira<ma...@apache.org>
> Sent: Friday, April 17, 2020 7:53 PM
> To: Apache Royale Development<ma...@royale.apache.org>
> Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex:
> remove isolated function
>
> Hi Yishay,
>
> reverting the maven release plugin and rebuilding Jewel worked for me. I
> don't see any problem for now
>
> El vie., 17 abr. 2020 a las 17:43, Carlos Rovira (<carlosrovira@apache.org
> >)
> escribió:
>
> > Hi Yishay,
> >
> > the problem is I can't build due to develop in 0.9.8-SNAPSHOT
> > I'll try locally to reset my repo to a commit where the versions are not
> > bumped
> >
> > El vie., 17 abr. 2020 a las 14:44, Yishay Weiss (<yishayjobs@hotmail.com
> >)
> > escribió:
> >
> >> Is Jewel building for you? Even after that change it fails for me.
> >>
> >> ________________________________
> >> From: Carlos Rovira <ca...@apache.org>
> >> Sent: Friday, April 17, 2020 3:34:21 PM
> >> To: Apache Royale Development <de...@royale.apache.org>
> >> Cc: commits@royale.apache.org <co...@royale.apache.org>
> >> Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex:
> >> remove isolated function
> >>
> >> Thanks
> >> just commited :)
> >>
> >> El vie., 17 abr. 2020 a las 13:30, Yishay Weiss (<
> yishayjobs@hotmail.com
> >> >)
> >> escribió:
> >>
> >> > Build is failing. Looks like you forgot to remove scrollToIndex from
> >> > JewelClasses
> >> >
> >> > ________________________________
> >> > From: carlosrovira@apache.org <ca...@apache.org>
> >> > Sent: Friday, April 17, 2020 3:56:44 AM
> >> > To: commits@royale.apache.org <co...@royale.apache.org>
> >> > Subject: [royale-asjs] branch develop updated: jewel-scrollToIndex:
> >> remove
> >> > isolated function
> >> >
> >> > This is an automated email from the ASF dual-hosted git repository.
> >> >
> >> > carlosrovira pushed a commit to branch develop
> >> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> >> >
> >> >
> >> > The following commit(s) were added to refs/heads/develop by this push:
> >> >      new 8f66e33  jewel-scrollToIndex: remove isolated function
> >> > 8f66e33 is described below
> >> >
> >> > commit 8f66e334aebb23c6bf802232de6f925a9e4a2a13
> >> > Author: Carlos Rovira <ca...@apache.org>
> >> > AuthorDate: Fri Apr 17 02:56:40 2020 +0200
> >> >
> >> >     jewel-scrollToIndex: remove isolated function
> >> > ---
> >> >  .../jewel/beads/controls/list/scrollToIndex.as     | 97
> >> > ----------------------
> >> >  1 file changed, 97 deletions(-)
> >> >
> >> > diff --git
> >> >
> >>
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> >> >
> >>
> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> >> > deleted file mode 100644
> >> > index fd4f278..0000000
> >> > ---
> >> >
> >>
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> >> > +++ /dev/null
> >> > @@ -1,97 +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 org.apache.royale.jewel.beads.controls.list
> >> > -{
> >> > -       import org.apache.royale.core.IItemRenderer;
> >> > -       import org.apache.royale.core.IItemRendererOwnerView;
> >> > -       import org.apache.royale.core.IStrand;
> >> > -       import org.apache.royale.html.beads.IListView;
> >> > -       import org.apache.royale.jewel.List;
> >> > -       import
> >> org.apache.royale.jewel.beads.models.ListPresentationModel;
> >> > -
> >> > -       /**
> >> > -     *  Ensures that the data provider item at the given index is
> >> visible.
> >> > -     *
> >> > -     *  If the item is visible, the
> <code>verticalScrollPosition</code>
> >> > -     *  property is left unchanged even if the item is not the first
> >> > visible
> >> > -     *  item. If the item is not currently visible, the
> >> > -     *  <code>verticalScrollPosition</code>
> >> > -     *  property is changed make the item the first visible item,
> >> unless
> >> > there
> >> > -     *  aren't enough rows to do so because the
> >> > -     *  <code>verticalScrollPosition</code> value is limited by the
> >> > -     *  <code>maxVerticalScrollPosition</code> property.
> >> > -     *
> >> > -     *  @param index The index of the item in the data provider.
> >> > -     *
> >> > -     *  @return <code>true</code> if
> >> <code>verticalScrollPosition</code>
> >> > changed.
> >> > -     *
> >> > -     *  @langversion 3.0
> >> > -     *  @playerversion Flash 9
> >> > -     *  @playerversion AIR 1.1
> >> > -     *  @productversion Royale 0.9.7
> >> > -     */
> >> > -    public function scrollToIndex(list:IStrand, index:int):Boolean
> >> > -    {
> >> > -        var _list:List = list as List;
> >> > -
> >> > -        COMPILE::SWF
> >> > -        {
> >> > -            // to implement
> >> > -
> >> > -            return false;
> >> > -        }
> >> > -
> >> > -               COMPILE::JS
> >> > -               {
> >> > -        var scrollArea:HTMLElement = _list.element;
> >> > -        var oldScroll:Number = scrollArea.scrollTop;
> >> > -
> >> > -        var totalHeight:Number = 0;
> >> > -
> >> > -        if(_list.variableRowHeight)
> >> > -        {
> >> > -            var listView:IListView = list.getBeadByType(IListView) as
> >> > IListView;
> >> > -            var dataGroup:IItemRendererOwnerView =
> listView.dataGroup;
> >> > -
> >> > -            //each item render can have its own height
> >> > -            var n:int = _list.dataProvider.length;
> >> > -            var irHeights:Array = [];
> >> > -            for (var i:int = 0; i <= index; i++)
> >> > -            {
> >> > -                var ir:IItemRenderer =
> >> > dataGroup.getItemRendererForIndex(i) as IItemRenderer;
> >> > -                totalHeight += ir.element.clientHeight;
> >> > -                irHeights.push(totalHeight + ir.element.clientHeight
> -
> >> > scrollArea.clientHeight);
> >> > -            }
> >> > -
> >> > -            scrollArea.scrollTop = Math.min(irHeights[index],
> >> > totalHeight);
> >> > -
> >> > -        } else
> >> > -        {
> >> > -            var rowHeight:Number;
> >> > -            // all items renderers with same height
> >> > -            rowHeight = isNaN(_list.rowHeight) ?
> >> > ListPresentationModel.DEFAULT_ROW_HEIGHT : _list.rowHeight;
> >> > -            totalHeight = _list.dataProvider.length * rowHeight -
> >> > scrollArea.clientHeight;
> >> > -
> >> > -            scrollArea.scrollTop = Math.min(index * rowHeight,
> >> > totalHeight);
> >> > -        }
> >> > -
> >> > -        return oldScroll != scrollArea.scrollTop;
> >> > -               }
> >> > -    }
> >> > -}
> >> >
> >> >
> >>
> >> --
> >> Carlos Rovira
> >> http://about.me/carlosrovira
> >>
> >
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
> >
> >
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

--
Carlos Rovira
http://about.me/carlosrovira


Re: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Posted by Carlos Rovira <ca...@apache.org>.
Hi Yishay,

just committed, sorry, I was not repairing on that file since is a new one
and I had several others new

sorry for the confusion

now all should work ok

Thanks

El vie., 17 abr. 2020 a las 19:05, Yishay Weiss (<yi...@hotmail.com>)
escribió:

> I’m getting
>
>      [java]
> C:\dev\flexjs\royale-asjs\frameworks\projects\Jewel\src\main\royale\org\apache\royale\jewel\List.as(277):
> col: 20 Error: Access of possibly undefine
> d property IScrollToIndexView.
>
> When building Jewel.
>
> I searched IScrollToIndexView and it doesn’t exist.
>
> From: Carlos Rovira<ma...@apache.org>
> Sent: Friday, April 17, 2020 7:53 PM
> To: Apache Royale Development<ma...@royale.apache.org>
> Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex:
> remove isolated function
>
> Hi Yishay,
>
> reverting the maven release plugin and rebuilding Jewel worked for me. I
> don't see any problem for now
>
> El vie., 17 abr. 2020 a las 17:43, Carlos Rovira (<carlosrovira@apache.org
> >)
> escribió:
>
> > Hi Yishay,
> >
> > the problem is I can't build due to develop in 0.9.8-SNAPSHOT
> > I'll try locally to reset my repo to a commit where the versions are not
> > bumped
> >
> > El vie., 17 abr. 2020 a las 14:44, Yishay Weiss (<yishayjobs@hotmail.com
> >)
> > escribió:
> >
> >> Is Jewel building for you? Even after that change it fails for me.
> >>
> >> ________________________________
> >> From: Carlos Rovira <ca...@apache.org>
> >> Sent: Friday, April 17, 2020 3:34:21 PM
> >> To: Apache Royale Development <de...@royale.apache.org>
> >> Cc: commits@royale.apache.org <co...@royale.apache.org>
> >> Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex:
> >> remove isolated function
> >>
> >> Thanks
> >> just commited :)
> >>
> >> El vie., 17 abr. 2020 a las 13:30, Yishay Weiss (<
> yishayjobs@hotmail.com
> >> >)
> >> escribió:
> >>
> >> > Build is failing. Looks like you forgot to remove scrollToIndex from
> >> > JewelClasses
> >> >
> >> > ________________________________
> >> > From: carlosrovira@apache.org <ca...@apache.org>
> >> > Sent: Friday, April 17, 2020 3:56:44 AM
> >> > To: commits@royale.apache.org <co...@royale.apache.org>
> >> > Subject: [royale-asjs] branch develop updated: jewel-scrollToIndex:
> >> remove
> >> > isolated function
> >> >
> >> > This is an automated email from the ASF dual-hosted git repository.
> >> >
> >> > carlosrovira pushed a commit to branch develop
> >> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> >> >
> >> >
> >> > The following commit(s) were added to refs/heads/develop by this push:
> >> >      new 8f66e33  jewel-scrollToIndex: remove isolated function
> >> > 8f66e33 is described below
> >> >
> >> > commit 8f66e334aebb23c6bf802232de6f925a9e4a2a13
> >> > Author: Carlos Rovira <ca...@apache.org>
> >> > AuthorDate: Fri Apr 17 02:56:40 2020 +0200
> >> >
> >> >     jewel-scrollToIndex: remove isolated function
> >> > ---
> >> >  .../jewel/beads/controls/list/scrollToIndex.as     | 97
> >> > ----------------------
> >> >  1 file changed, 97 deletions(-)
> >> >
> >> > diff --git
> >> >
> >>
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> >> >
> >>
> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> >> > deleted file mode 100644
> >> > index fd4f278..0000000
> >> > ---
> >> >
> >>
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> >> > +++ /dev/null
> >> > @@ -1,97 +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 org.apache.royale.jewel.beads.controls.list
> >> > -{
> >> > -       import org.apache.royale.core.IItemRenderer;
> >> > -       import org.apache.royale.core.IItemRendererOwnerView;
> >> > -       import org.apache.royale.core.IStrand;
> >> > -       import org.apache.royale.html.beads.IListView;
> >> > -       import org.apache.royale.jewel.List;
> >> > -       import
> >> org.apache.royale.jewel.beads.models.ListPresentationModel;
> >> > -
> >> > -       /**
> >> > -     *  Ensures that the data provider item at the given index is
> >> visible.
> >> > -     *
> >> > -     *  If the item is visible, the
> <code>verticalScrollPosition</code>
> >> > -     *  property is left unchanged even if the item is not the first
> >> > visible
> >> > -     *  item. If the item is not currently visible, the
> >> > -     *  <code>verticalScrollPosition</code>
> >> > -     *  property is changed make the item the first visible item,
> >> unless
> >> > there
> >> > -     *  aren't enough rows to do so because the
> >> > -     *  <code>verticalScrollPosition</code> value is limited by the
> >> > -     *  <code>maxVerticalScrollPosition</code> property.
> >> > -     *
> >> > -     *  @param index The index of the item in the data provider.
> >> > -     *
> >> > -     *  @return <code>true</code> if
> >> <code>verticalScrollPosition</code>
> >> > changed.
> >> > -     *
> >> > -     *  @langversion 3.0
> >> > -     *  @playerversion Flash 9
> >> > -     *  @playerversion AIR 1.1
> >> > -     *  @productversion Royale 0.9.7
> >> > -     */
> >> > -    public function scrollToIndex(list:IStrand, index:int):Boolean
> >> > -    {
> >> > -        var _list:List = list as List;
> >> > -
> >> > -        COMPILE::SWF
> >> > -        {
> >> > -            // to implement
> >> > -
> >> > -            return false;
> >> > -        }
> >> > -
> >> > -               COMPILE::JS
> >> > -               {
> >> > -        var scrollArea:HTMLElement = _list.element;
> >> > -        var oldScroll:Number = scrollArea.scrollTop;
> >> > -
> >> > -        var totalHeight:Number = 0;
> >> > -
> >> > -        if(_list.variableRowHeight)
> >> > -        {
> >> > -            var listView:IListView = list.getBeadByType(IListView) as
> >> > IListView;
> >> > -            var dataGroup:IItemRendererOwnerView =
> listView.dataGroup;
> >> > -
> >> > -            //each item render can have its own height
> >> > -            var n:int = _list.dataProvider.length;
> >> > -            var irHeights:Array = [];
> >> > -            for (var i:int = 0; i <= index; i++)
> >> > -            {
> >> > -                var ir:IItemRenderer =
> >> > dataGroup.getItemRendererForIndex(i) as IItemRenderer;
> >> > -                totalHeight += ir.element.clientHeight;
> >> > -                irHeights.push(totalHeight + ir.element.clientHeight
> -
> >> > scrollArea.clientHeight);
> >> > -            }
> >> > -
> >> > -            scrollArea.scrollTop = Math.min(irHeights[index],
> >> > totalHeight);
> >> > -
> >> > -        } else
> >> > -        {
> >> > -            var rowHeight:Number;
> >> > -            // all items renderers with same height
> >> > -            rowHeight = isNaN(_list.rowHeight) ?
> >> > ListPresentationModel.DEFAULT_ROW_HEIGHT : _list.rowHeight;
> >> > -            totalHeight = _list.dataProvider.length * rowHeight -
> >> > scrollArea.clientHeight;
> >> > -
> >> > -            scrollArea.scrollTop = Math.min(index * rowHeight,
> >> > totalHeight);
> >> > -        }
> >> > -
> >> > -        return oldScroll != scrollArea.scrollTop;
> >> > -               }
> >> > -    }
> >> > -}
> >> >
> >> >
> >>
> >> --
> >> Carlos Rovira
> >> http://about.me/carlosrovira
> >>
> >
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
> >
> >
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

RE: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Posted by Yishay Weiss <yi...@hotmail.com>.
Oops, looks like I need to rebuild Core.  Ignore this.

________________________________
From: Yishay Weiss <yi...@hotmail.com>
Sent: Friday, April 17, 2020 8:05:06 PM
To: dev@royale.apache.org <de...@royale.apache.org>
Subject: RE: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

I’m getting

     [java] C:\dev\flexjs\royale-asjs\frameworks\projects\Jewel\src\main\royale\org\apache\royale\jewel\List.as(277): col: 20 Error: Access of possibly undefine
d property IScrollToIndexView.

When building Jewel.

I searched IScrollToIndexView and it doesn’t exist.

From: Carlos Rovira<ma...@apache.org>
Sent: Friday, April 17, 2020 7:53 PM
To: Apache Royale Development<ma...@royale.apache.org>
Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Hi Yishay,

reverting the maven release plugin and rebuilding Jewel worked for me. I
don't see any problem for now

El vie., 17 abr. 2020 a las 17:43, Carlos Rovira (<ca...@apache.org>)
escribió:

> Hi Yishay,
>
> the problem is I can't build due to develop in 0.9.8-SNAPSHOT
> I'll try locally to reset my repo to a commit where the versions are not
> bumped
>
> El vie., 17 abr. 2020 a las 14:44, Yishay Weiss (<yi...@hotmail.com>)
> escribió:
>
>> Is Jewel building for you? Even after that change it fails for me.
>>
>> ________________________________
>> From: Carlos Rovira <ca...@apache.org>
>> Sent: Friday, April 17, 2020 3:34:21 PM
>> To: Apache Royale Development <de...@royale.apache.org>
>> Cc: commits@royale.apache.org <co...@royale.apache.org>
>> Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex:
>> remove isolated function
>>
>> Thanks
>> just commited :)
>>
>> El vie., 17 abr. 2020 a las 13:30, Yishay Weiss (<yishayjobs@hotmail.com
>> >)
>> escribió:
>>
>> > Build is failing. Looks like you forgot to remove scrollToIndex from
>> > JewelClasses
>> >
>> > ________________________________
>> > From: carlosrovira@apache.org <ca...@apache.org>
>> > Sent: Friday, April 17, 2020 3:56:44 AM
>> > To: commits@royale.apache.org <co...@royale.apache.org>
>> > Subject: [royale-asjs] branch develop updated: jewel-scrollToIndex:
>> remove
>> > isolated function
>> >
>> > This is an automated email from the ASF dual-hosted git repository.
>> >
>> > carlosrovira pushed a commit to branch develop
>> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>> >
>> >
>> > The following commit(s) were added to refs/heads/develop by this push:
>> >      new 8f66e33  jewel-scrollToIndex: remove isolated function
>> > 8f66e33 is described below
>> >
>> > commit 8f66e334aebb23c6bf802232de6f925a9e4a2a13
>> > Author: Carlos Rovira <ca...@apache.org>
>> > AuthorDate: Fri Apr 17 02:56:40 2020 +0200
>> >
>> >     jewel-scrollToIndex: remove isolated function
>> > ---
>> >  .../jewel/beads/controls/list/scrollToIndex.as     | 97
>> > ----------------------
>> >  1 file changed, 97 deletions(-)
>> >
>> > diff --git
>> >
>> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
>> >
>> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
>> > deleted file mode 100644
>> > index fd4f278..0000000
>> > ---
>> >
>> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
>> > +++ /dev/null
>> > @@ -1,97 +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 org.apache.royale.jewel.beads.controls.list
>> > -{
>> > -       import org.apache.royale.core.IItemRenderer;
>> > -       import org.apache.royale.core.IItemRendererOwnerView;
>> > -       import org.apache.royale.core.IStrand;
>> > -       import org.apache.royale.html.beads.IListView;
>> > -       import org.apache.royale.jewel.List;
>> > -       import
>> org.apache.royale.jewel.beads.models.ListPresentationModel;
>> > -
>> > -       /**
>> > -     *  Ensures that the data provider item at the given index is
>> visible.
>> > -     *
>> > -     *  If the item is visible, the <code>verticalScrollPosition</code>
>> > -     *  property is left unchanged even if the item is not the first
>> > visible
>> > -     *  item. If the item is not currently visible, the
>> > -     *  <code>verticalScrollPosition</code>
>> > -     *  property is changed make the item the first visible item,
>> unless
>> > there
>> > -     *  aren't enough rows to do so because the
>> > -     *  <code>verticalScrollPosition</code> value is limited by the
>> > -     *  <code>maxVerticalScrollPosition</code> property.
>> > -     *
>> > -     *  @param index The index of the item in the data provider.
>> > -     *
>> > -     *  @return <code>true</code> if
>> <code>verticalScrollPosition</code>
>> > changed.
>> > -     *
>> > -     *  @langversion 3.0
>> > -     *  @playerversion Flash 9
>> > -     *  @playerversion AIR 1.1
>> > -     *  @productversion Royale 0.9.7
>> > -     */
>> > -    public function scrollToIndex(list:IStrand, index:int):Boolean
>> > -    {
>> > -        var _list:List = list as List;
>> > -
>> > -        COMPILE::SWF
>> > -        {
>> > -            // to implement
>> > -
>> > -            return false;
>> > -        }
>> > -
>> > -               COMPILE::JS
>> > -               {
>> > -        var scrollArea:HTMLElement = _list.element;
>> > -        var oldScroll:Number = scrollArea.scrollTop;
>> > -
>> > -        var totalHeight:Number = 0;
>> > -
>> > -        if(_list.variableRowHeight)
>> > -        {
>> > -            var listView:IListView = list.getBeadByType(IListView) as
>> > IListView;
>> > -            var dataGroup:IItemRendererOwnerView = listView.dataGroup;
>> > -
>> > -            //each item render can have its own height
>> > -            var n:int = _list.dataProvider.length;
>> > -            var irHeights:Array = [];
>> > -            for (var i:int = 0; i <= index; i++)
>> > -            {
>> > -                var ir:IItemRenderer =
>> > dataGroup.getItemRendererForIndex(i) as IItemRenderer;
>> > -                totalHeight += ir.element.clientHeight;
>> > -                irHeights.push(totalHeight + ir.element.clientHeight -
>> > scrollArea.clientHeight);
>> > -            }
>> > -
>> > -            scrollArea.scrollTop = Math.min(irHeights[index],
>> > totalHeight);
>> > -
>> > -        } else
>> > -        {
>> > -            var rowHeight:Number;
>> > -            // all items renderers with same height
>> > -            rowHeight = isNaN(_list.rowHeight) ?
>> > ListPresentationModel.DEFAULT_ROW_HEIGHT : _list.rowHeight;
>> > -            totalHeight = _list.dataProvider.length * rowHeight -
>> > scrollArea.clientHeight;
>> > -
>> > -            scrollArea.scrollTop = Math.min(index * rowHeight,
>> > totalHeight);
>> > -        }
>> > -
>> > -        return oldScroll != scrollArea.scrollTop;
>> > -               }
>> > -    }
>> > -}
>> >
>> >
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

--
Carlos Rovira
http://about.me/carlosrovira


RE: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Posted by Yishay Weiss <yi...@hotmail.com>.
I’m getting

     [java] C:\dev\flexjs\royale-asjs\frameworks\projects\Jewel\src\main\royale\org\apache\royale\jewel\List.as(277): col: 20 Error: Access of possibly undefine
d property IScrollToIndexView.

When building Jewel.

I searched IScrollToIndexView and it doesn’t exist.

From: Carlos Rovira<ma...@apache.org>
Sent: Friday, April 17, 2020 7:53 PM
To: Apache Royale Development<ma...@royale.apache.org>
Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Hi Yishay,

reverting the maven release plugin and rebuilding Jewel worked for me. I
don't see any problem for now

El vie., 17 abr. 2020 a las 17:43, Carlos Rovira (<ca...@apache.org>)
escribió:

> Hi Yishay,
>
> the problem is I can't build due to develop in 0.9.8-SNAPSHOT
> I'll try locally to reset my repo to a commit where the versions are not
> bumped
>
> El vie., 17 abr. 2020 a las 14:44, Yishay Weiss (<yi...@hotmail.com>)
> escribió:
>
>> Is Jewel building for you? Even after that change it fails for me.
>>
>> ________________________________
>> From: Carlos Rovira <ca...@apache.org>
>> Sent: Friday, April 17, 2020 3:34:21 PM
>> To: Apache Royale Development <de...@royale.apache.org>
>> Cc: commits@royale.apache.org <co...@royale.apache.org>
>> Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex:
>> remove isolated function
>>
>> Thanks
>> just commited :)
>>
>> El vie., 17 abr. 2020 a las 13:30, Yishay Weiss (<yishayjobs@hotmail.com
>> >)
>> escribió:
>>
>> > Build is failing. Looks like you forgot to remove scrollToIndex from
>> > JewelClasses
>> >
>> > ________________________________
>> > From: carlosrovira@apache.org <ca...@apache.org>
>> > Sent: Friday, April 17, 2020 3:56:44 AM
>> > To: commits@royale.apache.org <co...@royale.apache.org>
>> > Subject: [royale-asjs] branch develop updated: jewel-scrollToIndex:
>> remove
>> > isolated function
>> >
>> > This is an automated email from the ASF dual-hosted git repository.
>> >
>> > carlosrovira pushed a commit to branch develop
>> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>> >
>> >
>> > The following commit(s) were added to refs/heads/develop by this push:
>> >      new 8f66e33  jewel-scrollToIndex: remove isolated function
>> > 8f66e33 is described below
>> >
>> > commit 8f66e334aebb23c6bf802232de6f925a9e4a2a13
>> > Author: Carlos Rovira <ca...@apache.org>
>> > AuthorDate: Fri Apr 17 02:56:40 2020 +0200
>> >
>> >     jewel-scrollToIndex: remove isolated function
>> > ---
>> >  .../jewel/beads/controls/list/scrollToIndex.as     | 97
>> > ----------------------
>> >  1 file changed, 97 deletions(-)
>> >
>> > diff --git
>> >
>> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
>> >
>> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
>> > deleted file mode 100644
>> > index fd4f278..0000000
>> > ---
>> >
>> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
>> > +++ /dev/null
>> > @@ -1,97 +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 org.apache.royale.jewel.beads.controls.list
>> > -{
>> > -       import org.apache.royale.core.IItemRenderer;
>> > -       import org.apache.royale.core.IItemRendererOwnerView;
>> > -       import org.apache.royale.core.IStrand;
>> > -       import org.apache.royale.html.beads.IListView;
>> > -       import org.apache.royale.jewel.List;
>> > -       import
>> org.apache.royale.jewel.beads.models.ListPresentationModel;
>> > -
>> > -       /**
>> > -     *  Ensures that the data provider item at the given index is
>> visible.
>> > -     *
>> > -     *  If the item is visible, the <code>verticalScrollPosition</code>
>> > -     *  property is left unchanged even if the item is not the first
>> > visible
>> > -     *  item. If the item is not currently visible, the
>> > -     *  <code>verticalScrollPosition</code>
>> > -     *  property is changed make the item the first visible item,
>> unless
>> > there
>> > -     *  aren't enough rows to do so because the
>> > -     *  <code>verticalScrollPosition</code> value is limited by the
>> > -     *  <code>maxVerticalScrollPosition</code> property.
>> > -     *
>> > -     *  @param index The index of the item in the data provider.
>> > -     *
>> > -     *  @return <code>true</code> if
>> <code>verticalScrollPosition</code>
>> > changed.
>> > -     *
>> > -     *  @langversion 3.0
>> > -     *  @playerversion Flash 9
>> > -     *  @playerversion AIR 1.1
>> > -     *  @productversion Royale 0.9.7
>> > -     */
>> > -    public function scrollToIndex(list:IStrand, index:int):Boolean
>> > -    {
>> > -        var _list:List = list as List;
>> > -
>> > -        COMPILE::SWF
>> > -        {
>> > -            // to implement
>> > -
>> > -            return false;
>> > -        }
>> > -
>> > -               COMPILE::JS
>> > -               {
>> > -        var scrollArea:HTMLElement = _list.element;
>> > -        var oldScroll:Number = scrollArea.scrollTop;
>> > -
>> > -        var totalHeight:Number = 0;
>> > -
>> > -        if(_list.variableRowHeight)
>> > -        {
>> > -            var listView:IListView = list.getBeadByType(IListView) as
>> > IListView;
>> > -            var dataGroup:IItemRendererOwnerView = listView.dataGroup;
>> > -
>> > -            //each item render can have its own height
>> > -            var n:int = _list.dataProvider.length;
>> > -            var irHeights:Array = [];
>> > -            for (var i:int = 0; i <= index; i++)
>> > -            {
>> > -                var ir:IItemRenderer =
>> > dataGroup.getItemRendererForIndex(i) as IItemRenderer;
>> > -                totalHeight += ir.element.clientHeight;
>> > -                irHeights.push(totalHeight + ir.element.clientHeight -
>> > scrollArea.clientHeight);
>> > -            }
>> > -
>> > -            scrollArea.scrollTop = Math.min(irHeights[index],
>> > totalHeight);
>> > -
>> > -        } else
>> > -        {
>> > -            var rowHeight:Number;
>> > -            // all items renderers with same height
>> > -            rowHeight = isNaN(_list.rowHeight) ?
>> > ListPresentationModel.DEFAULT_ROW_HEIGHT : _list.rowHeight;
>> > -            totalHeight = _list.dataProvider.length * rowHeight -
>> > scrollArea.clientHeight;
>> > -
>> > -            scrollArea.scrollTop = Math.min(index * rowHeight,
>> > totalHeight);
>> > -        }
>> > -
>> > -        return oldScroll != scrollArea.scrollTop;
>> > -               }
>> > -    }
>> > -}
>> >
>> >
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

--
Carlos Rovira
http://about.me/carlosrovira


Re: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Posted by Carlos Rovira <ca...@apache.org>.
Hi Yishay,

reverting the maven release plugin and rebuilding Jewel worked for me. I
don't see any problem for now

El vie., 17 abr. 2020 a las 17:43, Carlos Rovira (<ca...@apache.org>)
escribió:

> Hi Yishay,
>
> the problem is I can't build due to develop in 0.9.8-SNAPSHOT
> I'll try locally to reset my repo to a commit where the versions are not
> bumped
>
> El vie., 17 abr. 2020 a las 14:44, Yishay Weiss (<yi...@hotmail.com>)
> escribió:
>
>> Is Jewel building for you? Even after that change it fails for me.
>>
>> ________________________________
>> From: Carlos Rovira <ca...@apache.org>
>> Sent: Friday, April 17, 2020 3:34:21 PM
>> To: Apache Royale Development <de...@royale.apache.org>
>> Cc: commits@royale.apache.org <co...@royale.apache.org>
>> Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex:
>> remove isolated function
>>
>> Thanks
>> just commited :)
>>
>> El vie., 17 abr. 2020 a las 13:30, Yishay Weiss (<yishayjobs@hotmail.com
>> >)
>> escribió:
>>
>> > Build is failing. Looks like you forgot to remove scrollToIndex from
>> > JewelClasses
>> >
>> > ________________________________
>> > From: carlosrovira@apache.org <ca...@apache.org>
>> > Sent: Friday, April 17, 2020 3:56:44 AM
>> > To: commits@royale.apache.org <co...@royale.apache.org>
>> > Subject: [royale-asjs] branch develop updated: jewel-scrollToIndex:
>> remove
>> > isolated function
>> >
>> > This is an automated email from the ASF dual-hosted git repository.
>> >
>> > carlosrovira pushed a commit to branch develop
>> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>> >
>> >
>> > The following commit(s) were added to refs/heads/develop by this push:
>> >      new 8f66e33  jewel-scrollToIndex: remove isolated function
>> > 8f66e33 is described below
>> >
>> > commit 8f66e334aebb23c6bf802232de6f925a9e4a2a13
>> > Author: Carlos Rovira <ca...@apache.org>
>> > AuthorDate: Fri Apr 17 02:56:40 2020 +0200
>> >
>> >     jewel-scrollToIndex: remove isolated function
>> > ---
>> >  .../jewel/beads/controls/list/scrollToIndex.as     | 97
>> > ----------------------
>> >  1 file changed, 97 deletions(-)
>> >
>> > diff --git
>> >
>> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
>> >
>> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
>> > deleted file mode 100644
>> > index fd4f278..0000000
>> > ---
>> >
>> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
>> > +++ /dev/null
>> > @@ -1,97 +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 org.apache.royale.jewel.beads.controls.list
>> > -{
>> > -       import org.apache.royale.core.IItemRenderer;
>> > -       import org.apache.royale.core.IItemRendererOwnerView;
>> > -       import org.apache.royale.core.IStrand;
>> > -       import org.apache.royale.html.beads.IListView;
>> > -       import org.apache.royale.jewel.List;
>> > -       import
>> org.apache.royale.jewel.beads.models.ListPresentationModel;
>> > -
>> > -       /**
>> > -     *  Ensures that the data provider item at the given index is
>> visible.
>> > -     *
>> > -     *  If the item is visible, the <code>verticalScrollPosition</code>
>> > -     *  property is left unchanged even if the item is not the first
>> > visible
>> > -     *  item. If the item is not currently visible, the
>> > -     *  <code>verticalScrollPosition</code>
>> > -     *  property is changed make the item the first visible item,
>> unless
>> > there
>> > -     *  aren't enough rows to do so because the
>> > -     *  <code>verticalScrollPosition</code> value is limited by the
>> > -     *  <code>maxVerticalScrollPosition</code> property.
>> > -     *
>> > -     *  @param index The index of the item in the data provider.
>> > -     *
>> > -     *  @return <code>true</code> if
>> <code>verticalScrollPosition</code>
>> > changed.
>> > -     *
>> > -     *  @langversion 3.0
>> > -     *  @playerversion Flash 9
>> > -     *  @playerversion AIR 1.1
>> > -     *  @productversion Royale 0.9.7
>> > -     */
>> > -    public function scrollToIndex(list:IStrand, index:int):Boolean
>> > -    {
>> > -        var _list:List = list as List;
>> > -
>> > -        COMPILE::SWF
>> > -        {
>> > -            // to implement
>> > -
>> > -            return false;
>> > -        }
>> > -
>> > -               COMPILE::JS
>> > -               {
>> > -        var scrollArea:HTMLElement = _list.element;
>> > -        var oldScroll:Number = scrollArea.scrollTop;
>> > -
>> > -        var totalHeight:Number = 0;
>> > -
>> > -        if(_list.variableRowHeight)
>> > -        {
>> > -            var listView:IListView = list.getBeadByType(IListView) as
>> > IListView;
>> > -            var dataGroup:IItemRendererOwnerView = listView.dataGroup;
>> > -
>> > -            //each item render can have its own height
>> > -            var n:int = _list.dataProvider.length;
>> > -            var irHeights:Array = [];
>> > -            for (var i:int = 0; i <= index; i++)
>> > -            {
>> > -                var ir:IItemRenderer =
>> > dataGroup.getItemRendererForIndex(i) as IItemRenderer;
>> > -                totalHeight += ir.element.clientHeight;
>> > -                irHeights.push(totalHeight + ir.element.clientHeight -
>> > scrollArea.clientHeight);
>> > -            }
>> > -
>> > -            scrollArea.scrollTop = Math.min(irHeights[index],
>> > totalHeight);
>> > -
>> > -        } else
>> > -        {
>> > -            var rowHeight:Number;
>> > -            // all items renderers with same height
>> > -            rowHeight = isNaN(_list.rowHeight) ?
>> > ListPresentationModel.DEFAULT_ROW_HEIGHT : _list.rowHeight;
>> > -            totalHeight = _list.dataProvider.length * rowHeight -
>> > scrollArea.clientHeight;
>> > -
>> > -            scrollArea.scrollTop = Math.min(index * rowHeight,
>> > totalHeight);
>> > -        }
>> > -
>> > -        return oldScroll != scrollArea.scrollTop;
>> > -               }
>> > -    }
>> > -}
>> >
>> >
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Everything built for me with 0.9.8-SNAPSHOT in Maven up until the error in Jewel.  What error are you getting?

On 4/17/20, 8:44 AM, "Carlos Rovira" <ca...@apache.org> wrote:

    Hi Yishay,
    
    the problem is I can't build due to develop in 0.9.8-SNAPSHOT
    I'll try locally to reset my repo to a commit where the versions are not
    bumped
    
    El vie., 17 abr. 2020 a las 14:44, Yishay Weiss (<yi...@hotmail.com>)
    escribió:
    
    > Is Jewel building for you? Even after that change it fails for me.
    >
    > ________________________________
    > From: Carlos Rovira <ca...@apache.org>
    > Sent: Friday, April 17, 2020 3:34:21 PM
    > To: Apache Royale Development <de...@royale.apache.org>
    > Cc: commits@royale.apache.org <co...@royale.apache.org>
    > Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex:
    > remove isolated function
    >
    > Thanks
    > just commited :)
    >
    > El vie., 17 abr. 2020 a las 13:30, Yishay Weiss (<yi...@hotmail.com>)
    > escribió:
    >
    > > Build is failing. Looks like you forgot to remove scrollToIndex from
    > > JewelClasses
    > >
    > > ________________________________
    > > From: carlosrovira@apache.org <ca...@apache.org>
    > > Sent: Friday, April 17, 2020 3:56:44 AM
    > > To: commits@royale.apache.org <co...@royale.apache.org>
    > > Subject: [royale-asjs] branch develop updated: jewel-scrollToIndex:
    > remove
    > > isolated function
    > >
    > > This is an automated email from the ASF dual-hosted git repository.
    > >
    > > carlosrovira pushed a commit to branch develop
    > > in repository https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.git&amp;data=02%7C01%7Caharui%40adobe.com%7C6ae85bec1e8d46765a0b08d7e2e62f1a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637227350593801407&amp;sdata=3CNYVSG4izly2Cd79jfmAuNa4%2BYoosTO5Wj7m9VdLVg%3D&amp;reserved=0
    > >
    > >
    > > The following commit(s) were added to refs/heads/develop by this push:
    > >      new 8f66e33  jewel-scrollToIndex: remove isolated function
    > > 8f66e33 is described below
    > >
    > > commit 8f66e334aebb23c6bf802232de6f925a9e4a2a13
    > > Author: Carlos Rovira <ca...@apache.org>
    > > AuthorDate: Fri Apr 17 02:56:40 2020 +0200
    > >
    > >     jewel-scrollToIndex: remove isolated function
    > > ---
    > >  .../jewel/beads/controls/list/scrollToIndex.as     | 97
    > > ----------------------
    > >  1 file changed, 97 deletions(-)
    > >
    > > diff --git
    > >
    > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
    > >
    > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
    > > deleted file mode 100644
    > > index fd4f278..0000000
    > > ---
    > >
    > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
    > > +++ /dev/null
    > > @@ -1,97 +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
    > > -//
    > > -//      https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apache.org%2Flicenses%2FLICENSE-2.0&amp;data=02%7C01%7Caharui%40adobe.com%7C6ae85bec1e8d46765a0b08d7e2e62f1a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637227350593801407&amp;sdata=DJd5XohspnzFix0P4RaAKeiMeu%2BF%2FlR3yPj1R3%2Fi71Y%3D&amp;reserved=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 org.apache.royale.jewel.beads.controls.list
    > > -{
    > > -       import org.apache.royale.core.IItemRenderer;
    > > -       import org.apache.royale.core.IItemRendererOwnerView;
    > > -       import org.apache.royale.core.IStrand;
    > > -       import org.apache.royale.html.beads.IListView;
    > > -       import org.apache.royale.jewel.List;
    > > -       import
    > org.apache.royale.jewel.beads.models.ListPresentationModel;
    > > -
    > > -       /**
    > > -     *  Ensures that the data provider item at the given index is
    > visible.
    > > -     *
    > > -     *  If the item is visible, the <code>verticalScrollPosition</code>
    > > -     *  property is left unchanged even if the item is not the first
    > > visible
    > > -     *  item. If the item is not currently visible, the
    > > -     *  <code>verticalScrollPosition</code>
    > > -     *  property is changed make the item the first visible item, unless
    > > there
    > > -     *  aren't enough rows to do so because the
    > > -     *  <code>verticalScrollPosition</code> value is limited by the
    > > -     *  <code>maxVerticalScrollPosition</code> property.
    > > -     *
    > > -     *  @param index The index of the item in the data provider.
    > > -     *
    > > -     *  @return <code>true</code> if <code>verticalScrollPosition</code>
    > > changed.
    > > -     *
    > > -     *  @langversion 3.0
    > > -     *  @playerversion Flash 9
    > > -     *  @playerversion AIR 1.1
    > > -     *  @productversion Royale 0.9.7
    > > -     */
    > > -    public function scrollToIndex(list:IStrand, index:int):Boolean
    > > -    {
    > > -        var _list:List = list as List;
    > > -
    > > -        COMPILE::SWF
    > > -        {
    > > -            // to implement
    > > -
    > > -            return false;
    > > -        }
    > > -
    > > -               COMPILE::JS
    > > -               {
    > > -        var scrollArea:HTMLElement = _list.element;
    > > -        var oldScroll:Number = scrollArea.scrollTop;
    > > -
    > > -        var totalHeight:Number = 0;
    > > -
    > > -        if(_list.variableRowHeight)
    > > -        {
    > > -            var listView:IListView = list.getBeadByType(IListView) as
    > > IListView;
    > > -            var dataGroup:IItemRendererOwnerView = listView.dataGroup;
    > > -
    > > -            //each item render can have its own height
    > > -            var n:int = _list.dataProvider.length;
    > > -            var irHeights:Array = [];
    > > -            for (var i:int = 0; i <= index; i++)
    > > -            {
    > > -                var ir:IItemRenderer =
    > > dataGroup.getItemRendererForIndex(i) as IItemRenderer;
    > > -                totalHeight += ir.element.clientHeight;
    > > -                irHeights.push(totalHeight + ir.element.clientHeight -
    > > scrollArea.clientHeight);
    > > -            }
    > > -
    > > -            scrollArea.scrollTop = Math.min(irHeights[index],
    > > totalHeight);
    > > -
    > > -        } else
    > > -        {
    > > -            var rowHeight:Number;
    > > -            // all items renderers with same height
    > > -            rowHeight = isNaN(_list.rowHeight) ?
    > > ListPresentationModel.DEFAULT_ROW_HEIGHT : _list.rowHeight;
    > > -            totalHeight = _list.dataProvider.length * rowHeight -
    > > scrollArea.clientHeight;
    > > -
    > > -            scrollArea.scrollTop = Math.min(index * rowHeight,
    > > totalHeight);
    > > -        }
    > > -
    > > -        return oldScroll != scrollArea.scrollTop;
    > > -               }
    > > -    }
    > > -}
    > >
    > >
    >
    > --
    > Carlos Rovira
    > https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C6ae85bec1e8d46765a0b08d7e2e62f1a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637227350593801407&amp;sdata=SzJs1QGiZxEjthYCj2zcZd0gwJQTVrA%2F4ngi9T5Uajk%3D&amp;reserved=0
    >
    
    
    -- 
    Carlos Rovira
    https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C6ae85bec1e8d46765a0b08d7e2e62f1a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637227350593801407&amp;sdata=SzJs1QGiZxEjthYCj2zcZd0gwJQTVrA%2F4ngi9T5Uajk%3D&amp;reserved=0
    


Re: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Posted by Carlos Rovira <ca...@apache.org>.
Hi Yishay,

the problem is I can't build due to develop in 0.9.8-SNAPSHOT
I'll try locally to reset my repo to a commit where the versions are not
bumped

El vie., 17 abr. 2020 a las 14:44, Yishay Weiss (<yi...@hotmail.com>)
escribió:

> Is Jewel building for you? Even after that change it fails for me.
>
> ________________________________
> From: Carlos Rovira <ca...@apache.org>
> Sent: Friday, April 17, 2020 3:34:21 PM
> To: Apache Royale Development <de...@royale.apache.org>
> Cc: commits@royale.apache.org <co...@royale.apache.org>
> Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex:
> remove isolated function
>
> Thanks
> just commited :)
>
> El vie., 17 abr. 2020 a las 13:30, Yishay Weiss (<yi...@hotmail.com>)
> escribió:
>
> > Build is failing. Looks like you forgot to remove scrollToIndex from
> > JewelClasses
> >
> > ________________________________
> > From: carlosrovira@apache.org <ca...@apache.org>
> > Sent: Friday, April 17, 2020 3:56:44 AM
> > To: commits@royale.apache.org <co...@royale.apache.org>
> > Subject: [royale-asjs] branch develop updated: jewel-scrollToIndex:
> remove
> > isolated function
> >
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > carlosrovira pushed a commit to branch develop
> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> >
> >
> > The following commit(s) were added to refs/heads/develop by this push:
> >      new 8f66e33  jewel-scrollToIndex: remove isolated function
> > 8f66e33 is described below
> >
> > commit 8f66e334aebb23c6bf802232de6f925a9e4a2a13
> > Author: Carlos Rovira <ca...@apache.org>
> > AuthorDate: Fri Apr 17 02:56:40 2020 +0200
> >
> >     jewel-scrollToIndex: remove isolated function
> > ---
> >  .../jewel/beads/controls/list/scrollToIndex.as     | 97
> > ----------------------
> >  1 file changed, 97 deletions(-)
> >
> > diff --git
> >
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> >
> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> > deleted file mode 100644
> > index fd4f278..0000000
> > ---
> >
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> > +++ /dev/null
> > @@ -1,97 +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 org.apache.royale.jewel.beads.controls.list
> > -{
> > -       import org.apache.royale.core.IItemRenderer;
> > -       import org.apache.royale.core.IItemRendererOwnerView;
> > -       import org.apache.royale.core.IStrand;
> > -       import org.apache.royale.html.beads.IListView;
> > -       import org.apache.royale.jewel.List;
> > -       import
> org.apache.royale.jewel.beads.models.ListPresentationModel;
> > -
> > -       /**
> > -     *  Ensures that the data provider item at the given index is
> visible.
> > -     *
> > -     *  If the item is visible, the <code>verticalScrollPosition</code>
> > -     *  property is left unchanged even if the item is not the first
> > visible
> > -     *  item. If the item is not currently visible, the
> > -     *  <code>verticalScrollPosition</code>
> > -     *  property is changed make the item the first visible item, unless
> > there
> > -     *  aren't enough rows to do so because the
> > -     *  <code>verticalScrollPosition</code> value is limited by the
> > -     *  <code>maxVerticalScrollPosition</code> property.
> > -     *
> > -     *  @param index The index of the item in the data provider.
> > -     *
> > -     *  @return <code>true</code> if <code>verticalScrollPosition</code>
> > changed.
> > -     *
> > -     *  @langversion 3.0
> > -     *  @playerversion Flash 9
> > -     *  @playerversion AIR 1.1
> > -     *  @productversion Royale 0.9.7
> > -     */
> > -    public function scrollToIndex(list:IStrand, index:int):Boolean
> > -    {
> > -        var _list:List = list as List;
> > -
> > -        COMPILE::SWF
> > -        {
> > -            // to implement
> > -
> > -            return false;
> > -        }
> > -
> > -               COMPILE::JS
> > -               {
> > -        var scrollArea:HTMLElement = _list.element;
> > -        var oldScroll:Number = scrollArea.scrollTop;
> > -
> > -        var totalHeight:Number = 0;
> > -
> > -        if(_list.variableRowHeight)
> > -        {
> > -            var listView:IListView = list.getBeadByType(IListView) as
> > IListView;
> > -            var dataGroup:IItemRendererOwnerView = listView.dataGroup;
> > -
> > -            //each item render can have its own height
> > -            var n:int = _list.dataProvider.length;
> > -            var irHeights:Array = [];
> > -            for (var i:int = 0; i <= index; i++)
> > -            {
> > -                var ir:IItemRenderer =
> > dataGroup.getItemRendererForIndex(i) as IItemRenderer;
> > -                totalHeight += ir.element.clientHeight;
> > -                irHeights.push(totalHeight + ir.element.clientHeight -
> > scrollArea.clientHeight);
> > -            }
> > -
> > -            scrollArea.scrollTop = Math.min(irHeights[index],
> > totalHeight);
> > -
> > -        } else
> > -        {
> > -            var rowHeight:Number;
> > -            // all items renderers with same height
> > -            rowHeight = isNaN(_list.rowHeight) ?
> > ListPresentationModel.DEFAULT_ROW_HEIGHT : _list.rowHeight;
> > -            totalHeight = _list.dataProvider.length * rowHeight -
> > scrollArea.clientHeight;
> > -
> > -            scrollArea.scrollTop = Math.min(index * rowHeight,
> > totalHeight);
> > -        }
> > -
> > -        return oldScroll != scrollArea.scrollTop;
> > -               }
> > -    }
> > -}
> >
> >
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>


-- 
Carlos Rovira
http://about.me/carlosrovira

RE: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Posted by Yishay Weiss <yi...@hotmail.com>.
Is Jewel building for you? Even after that change it fails for me.

________________________________
From: Carlos Rovira <ca...@apache.org>
Sent: Friday, April 17, 2020 3:34:21 PM
To: Apache Royale Development <de...@royale.apache.org>
Cc: commits@royale.apache.org <co...@royale.apache.org>
Subject: Re: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Thanks
just commited :)

El vie., 17 abr. 2020 a las 13:30, Yishay Weiss (<yi...@hotmail.com>)
escribió:

> Build is failing. Looks like you forgot to remove scrollToIndex from
> JewelClasses
>
> ________________________________
> From: carlosrovira@apache.org <ca...@apache.org>
> Sent: Friday, April 17, 2020 3:56:44 AM
> To: commits@royale.apache.org <co...@royale.apache.org>
> Subject: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove
> isolated function
>
> This is an automated email from the ASF dual-hosted git repository.
>
> carlosrovira pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>
>
> The following commit(s) were added to refs/heads/develop by this push:
>      new 8f66e33  jewel-scrollToIndex: remove isolated function
> 8f66e33 is described below
>
> commit 8f66e334aebb23c6bf802232de6f925a9e4a2a13
> Author: Carlos Rovira <ca...@apache.org>
> AuthorDate: Fri Apr 17 02:56:40 2020 +0200
>
>     jewel-scrollToIndex: remove isolated function
> ---
>  .../jewel/beads/controls/list/scrollToIndex.as     | 97
> ----------------------
>  1 file changed, 97 deletions(-)
>
> diff --git
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> deleted file mode 100644
> index fd4f278..0000000
> ---
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> +++ /dev/null
> @@ -1,97 +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 org.apache.royale.jewel.beads.controls.list
> -{
> -       import org.apache.royale.core.IItemRenderer;
> -       import org.apache.royale.core.IItemRendererOwnerView;
> -       import org.apache.royale.core.IStrand;
> -       import org.apache.royale.html.beads.IListView;
> -       import org.apache.royale.jewel.List;
> -       import org.apache.royale.jewel.beads.models.ListPresentationModel;
> -
> -       /**
> -     *  Ensures that the data provider item at the given index is visible.
> -     *
> -     *  If the item is visible, the <code>verticalScrollPosition</code>
> -     *  property is left unchanged even if the item is not the first
> visible
> -     *  item. If the item is not currently visible, the
> -     *  <code>verticalScrollPosition</code>
> -     *  property is changed make the item the first visible item, unless
> there
> -     *  aren't enough rows to do so because the
> -     *  <code>verticalScrollPosition</code> value is limited by the
> -     *  <code>maxVerticalScrollPosition</code> property.
> -     *
> -     *  @param index The index of the item in the data provider.
> -     *
> -     *  @return <code>true</code> if <code>verticalScrollPosition</code>
> changed.
> -     *
> -     *  @langversion 3.0
> -     *  @playerversion Flash 9
> -     *  @playerversion AIR 1.1
> -     *  @productversion Royale 0.9.7
> -     */
> -    public function scrollToIndex(list:IStrand, index:int):Boolean
> -    {
> -        var _list:List = list as List;
> -
> -        COMPILE::SWF
> -        {
> -            // to implement
> -
> -            return false;
> -        }
> -
> -               COMPILE::JS
> -               {
> -        var scrollArea:HTMLElement = _list.element;
> -        var oldScroll:Number = scrollArea.scrollTop;
> -
> -        var totalHeight:Number = 0;
> -
> -        if(_list.variableRowHeight)
> -        {
> -            var listView:IListView = list.getBeadByType(IListView) as
> IListView;
> -            var dataGroup:IItemRendererOwnerView = listView.dataGroup;
> -
> -            //each item render can have its own height
> -            var n:int = _list.dataProvider.length;
> -            var irHeights:Array = [];
> -            for (var i:int = 0; i <= index; i++)
> -            {
> -                var ir:IItemRenderer =
> dataGroup.getItemRendererForIndex(i) as IItemRenderer;
> -                totalHeight += ir.element.clientHeight;
> -                irHeights.push(totalHeight + ir.element.clientHeight -
> scrollArea.clientHeight);
> -            }
> -
> -            scrollArea.scrollTop = Math.min(irHeights[index],
> totalHeight);
> -
> -        } else
> -        {
> -            var rowHeight:Number;
> -            // all items renderers with same height
> -            rowHeight = isNaN(_list.rowHeight) ?
> ListPresentationModel.DEFAULT_ROW_HEIGHT : _list.rowHeight;
> -            totalHeight = _list.dataProvider.length * rowHeight -
> scrollArea.clientHeight;
> -
> -            scrollArea.scrollTop = Math.min(index * rowHeight,
> totalHeight);
> -        }
> -
> -        return oldScroll != scrollArea.scrollTop;
> -               }
> -    }
> -}
>
>

--
Carlos Rovira
http://about.me/carlosrovira

Re: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Posted by Carlos Rovira <ca...@apache.org>.
Thanks
just commited :)

El vie., 17 abr. 2020 a las 13:30, Yishay Weiss (<yi...@hotmail.com>)
escribió:

> Build is failing. Looks like you forgot to remove scrollToIndex from
> JewelClasses
>
> ________________________________
> From: carlosrovira@apache.org <ca...@apache.org>
> Sent: Friday, April 17, 2020 3:56:44 AM
> To: commits@royale.apache.org <co...@royale.apache.org>
> Subject: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove
> isolated function
>
> This is an automated email from the ASF dual-hosted git repository.
>
> carlosrovira pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>
>
> The following commit(s) were added to refs/heads/develop by this push:
>      new 8f66e33  jewel-scrollToIndex: remove isolated function
> 8f66e33 is described below
>
> commit 8f66e334aebb23c6bf802232de6f925a9e4a2a13
> Author: Carlos Rovira <ca...@apache.org>
> AuthorDate: Fri Apr 17 02:56:40 2020 +0200
>
>     jewel-scrollToIndex: remove isolated function
> ---
>  .../jewel/beads/controls/list/scrollToIndex.as     | 97
> ----------------------
>  1 file changed, 97 deletions(-)
>
> diff --git
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> deleted file mode 100644
> index fd4f278..0000000
> ---
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
> +++ /dev/null
> @@ -1,97 +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 org.apache.royale.jewel.beads.controls.list
> -{
> -       import org.apache.royale.core.IItemRenderer;
> -       import org.apache.royale.core.IItemRendererOwnerView;
> -       import org.apache.royale.core.IStrand;
> -       import org.apache.royale.html.beads.IListView;
> -       import org.apache.royale.jewel.List;
> -       import org.apache.royale.jewel.beads.models.ListPresentationModel;
> -
> -       /**
> -     *  Ensures that the data provider item at the given index is visible.
> -     *
> -     *  If the item is visible, the <code>verticalScrollPosition</code>
> -     *  property is left unchanged even if the item is not the first
> visible
> -     *  item. If the item is not currently visible, the
> -     *  <code>verticalScrollPosition</code>
> -     *  property is changed make the item the first visible item, unless
> there
> -     *  aren't enough rows to do so because the
> -     *  <code>verticalScrollPosition</code> value is limited by the
> -     *  <code>maxVerticalScrollPosition</code> property.
> -     *
> -     *  @param index The index of the item in the data provider.
> -     *
> -     *  @return <code>true</code> if <code>verticalScrollPosition</code>
> changed.
> -     *
> -     *  @langversion 3.0
> -     *  @playerversion Flash 9
> -     *  @playerversion AIR 1.1
> -     *  @productversion Royale 0.9.7
> -     */
> -    public function scrollToIndex(list:IStrand, index:int):Boolean
> -    {
> -        var _list:List = list as List;
> -
> -        COMPILE::SWF
> -        {
> -            // to implement
> -
> -            return false;
> -        }
> -
> -               COMPILE::JS
> -               {
> -        var scrollArea:HTMLElement = _list.element;
> -        var oldScroll:Number = scrollArea.scrollTop;
> -
> -        var totalHeight:Number = 0;
> -
> -        if(_list.variableRowHeight)
> -        {
> -            var listView:IListView = list.getBeadByType(IListView) as
> IListView;
> -            var dataGroup:IItemRendererOwnerView = listView.dataGroup;
> -
> -            //each item render can have its own height
> -            var n:int = _list.dataProvider.length;
> -            var irHeights:Array = [];
> -            for (var i:int = 0; i <= index; i++)
> -            {
> -                var ir:IItemRenderer =
> dataGroup.getItemRendererForIndex(i) as IItemRenderer;
> -                totalHeight += ir.element.clientHeight;
> -                irHeights.push(totalHeight + ir.element.clientHeight -
> scrollArea.clientHeight);
> -            }
> -
> -            scrollArea.scrollTop = Math.min(irHeights[index],
> totalHeight);
> -
> -        } else
> -        {
> -            var rowHeight:Number;
> -            // all items renderers with same height
> -            rowHeight = isNaN(_list.rowHeight) ?
> ListPresentationModel.DEFAULT_ROW_HEIGHT : _list.rowHeight;
> -            totalHeight = _list.dataProvider.length * rowHeight -
> scrollArea.clientHeight;
> -
> -            scrollArea.scrollTop = Math.min(index * rowHeight,
> totalHeight);
> -        }
> -
> -        return oldScroll != scrollArea.scrollTop;
> -               }
> -    }
> -}
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

RE: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

Posted by Yishay Weiss <yi...@hotmail.com>.
Build is failing. Looks like you forgot to remove scrollToIndex from JewelClasses

________________________________
From: carlosrovira@apache.org <ca...@apache.org>
Sent: Friday, April 17, 2020 3:56:44 AM
To: commits@royale.apache.org <co...@royale.apache.org>
Subject: [royale-asjs] branch develop updated: jewel-scrollToIndex: remove isolated function

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 8f66e33  jewel-scrollToIndex: remove isolated function
8f66e33 is described below

commit 8f66e334aebb23c6bf802232de6f925a9e4a2a13
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Apr 17 02:56:40 2020 +0200

    jewel-scrollToIndex: remove isolated function
---
 .../jewel/beads/controls/list/scrollToIndex.as     | 97 ----------------------
 1 file changed, 97 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
deleted file mode 100644
index fd4f278..0000000
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/list/scrollToIndex.as
+++ /dev/null
@@ -1,97 +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 org.apache.royale.jewel.beads.controls.list
-{
-       import org.apache.royale.core.IItemRenderer;
-       import org.apache.royale.core.IItemRendererOwnerView;
-       import org.apache.royale.core.IStrand;
-       import org.apache.royale.html.beads.IListView;
-       import org.apache.royale.jewel.List;
-       import org.apache.royale.jewel.beads.models.ListPresentationModel;
-
-       /**
-     *  Ensures that the data provider item at the given index is visible.
-     *
-     *  If the item is visible, the <code>verticalScrollPosition</code>
-     *  property is left unchanged even if the item is not the first visible
-     *  item. If the item is not currently visible, the
-     *  <code>verticalScrollPosition</code>
-     *  property is changed make the item the first visible item, unless there
-     *  aren't enough rows to do so because the
-     *  <code>verticalScrollPosition</code> value is limited by the
-     *  <code>maxVerticalScrollPosition</code> property.
-     *
-     *  @param index The index of the item in the data provider.
-     *
-     *  @return <code>true</code> if <code>verticalScrollPosition</code> changed.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Royale 0.9.7
-     */
-    public function scrollToIndex(list:IStrand, index:int):Boolean
-    {
-        var _list:List = list as List;
-
-        COMPILE::SWF
-        {
-            // to implement
-
-            return false;
-        }
-
-               COMPILE::JS
-               {
-        var scrollArea:HTMLElement = _list.element;
-        var oldScroll:Number = scrollArea.scrollTop;
-
-        var totalHeight:Number = 0;
-
-        if(_list.variableRowHeight)
-        {
-            var listView:IListView = list.getBeadByType(IListView) as IListView;
-            var dataGroup:IItemRendererOwnerView = listView.dataGroup;
-
-            //each item render can have its own height
-            var n:int = _list.dataProvider.length;
-            var irHeights:Array = [];
-            for (var i:int = 0; i <= index; i++)
-            {
-                var ir:IItemRenderer = dataGroup.getItemRendererForIndex(i) as IItemRenderer;
-                totalHeight += ir.element.clientHeight;
-                irHeights.push(totalHeight + ir.element.clientHeight - scrollArea.clientHeight);
-            }
-
-            scrollArea.scrollTop = Math.min(irHeights[index], totalHeight);
-
-        } else
-        {
-            var rowHeight:Number;
-            // all items renderers with same height
-            rowHeight = isNaN(_list.rowHeight) ? ListPresentationModel.DEFAULT_ROW_HEIGHT : _list.rowHeight;
-            totalHeight = _list.dataProvider.length * rowHeight - scrollArea.clientHeight;
-
-            scrollArea.scrollTop = Math.min(index * rowHeight, totalHeight);
-        }
-
-        return oldScroll != scrollArea.scrollTop;
-               }
-    }
-}