You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Idylog - Nicolas Granon <ng...@idylog.com> on 2017/11/03 21:33:01 UTC

ViewStack implementation [was : Restarting contributions]

(I have changed the thread object to better reflect its content)

That is crystal clear ! Thank you for that explanation.

We are considering rewriting "ViewStack" based on Harb's work.

In order to be more compliant, how should we use the typeNames property you are talking about ?

Nicolas Granon




> -----Message d'origine-----
> De : Alex Harui [mailto:aharui@adobe.com.INVALID]
> Envoyé : vendredi 3 novembre 2017 18:23
> À : dev@royale.apache.org; ngranon@idylog.com
> Objet : Re: Restarting contributions
> 
> We do that to try to get some backward compatibility with Flex.
> 
> Flex extended the CSS type selector system to allow a type selector for
> any component.  So you could do:
> 
> DataGrid { font-weight: bold }
> 
> You can't extend the type selector system in the browser (AFAIK) so we
> mimic this by converting a non-standard type selector to a class
> selector.
>  So the CSS file in the JS output looks like:
> 
> .DataGrid { font-weight: bold }
> 
> And then to get that to work, we add DataGrid to the list of class
> names on the HTMLElement.  I think that StackedViewManager may need its
> code updated because components are supposed to use the typeNames
> property which the framework appends to the classNames list instead of
> directly setting className itself.
> 
> HTH,
> -Alex
> 
> On 11/3/17, 8:41 AM, "Idylog - Nicolas Granon" <ng...@idylog.com>
> wrote:
> 
> >Many thanks.
> >
> >Quite useful.
> >
> >Question : I read the source code, and saw that in the
> >StackedViewManager class, you explicitly assign the class name (as a
> >String) to the className property like that :
> >className = "StackedViewManager";
> >
> >Why is that ?
> >
> >Nicolas Granon
> >
> >
> >
> >
> >> -----Message d'origine-----
> >> De : Harbs [mailto:harbs.lists@gmail.com] Envoyé : jeudi 2 novembre
> >> 2017 13:37 À : dev@royale.apache.org Objet : Re: Restarting
> >> contributions
> >>
> >> The classes probably do not belong necessarily in mobile.
> >>
> >> Here’s what I’m using:
> >> css:
> >>
> >> 		js|TabbedViewManager {
> >> 			IBeadView:
> >>
> ClassReference("org.apache.royale.mobile.beads.TopTabbedViewManagerVi
> >> ew
> >> ");
> >> 		}
> >>
> >> mxml:
> >> 	<js:TabbedViewManager id="navController" x="109" y="96"
> >> width="682" height="360" viewChanged="tabbedViewChanged(event)">
> >> 		<js:views>
> >> 			<js:TitleView title="Suites">
> >> 			<!-- Suites Data Grid -->
> >> 				<ex:DataGrid id="suiteDG" x="109" y="96"
> >> width="682" height="360"
> >>
> >dataProvider="{suiteProvider}"
> >>
> >> 	change="handleExtensionDGChange(event)" rowHeight="30">
> >> 					<js:beads>
> >> 						<js:DataGridPercentageView
> >/>
> >> 					</js:beads>
> >> 					<js:columns>
> >> 						<js:DataGridColumn
> >label="Product"
> >> dataField="product" columnWidth="30"
> >>
> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"/>
> >> 						<js:DataGridColumn
> >label="Status"
> >> columnWidth="33"
> >> itemRenderer="com.intools.dashboard.renderers.StatusRenderer"/>
> >> 						<js:DataGridColumn
> >label="Version"
> >> dataField="iVersion" columnWidth="12"
> >>
> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"/>
> >> 						<js:DataGridColumn
> >label="Latest
> >> Version" columnWidth="25"
> >> itemRenderer="com.intools.dashboard.renderers.VersionUpdater"/>
> >> 					</js:columns>
> >> 				</ex:DataGrid>
> >> 			</js:TitleView>
> >> 			<js:TitleView title="Plugins">
> >> 			<!-- Suites Data Grid -->
> >> 				<ex:DataGrid id="pluginDG"
> >>
> >> 	dataProvider="{pluginProvider}"
> >>
> >> 	change="handleExtensionDGChange(event)" rowHeight="30">
> >> 					<js:beads>
> >> 						<js:DataGridPercentageView
> >/>
> >> 					</js:beads>
> >> 					<js:columns>
> >> 						<js:DataGridColumn
> >label="Product"
> >> dataField="product" columnWidth="30"
> >>
> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"/>
> >> 						<js:DataGridColumn
> >label="Status"
> >> columnWidth="33"
> >> itemRenderer="com.intools.dashboard.renderers.StatusRenderer"/>
> >> 						<js:DataGridColumn
> >label="Version"
> >> dataField="iVersion" columnWidth="12"
> >>
> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"/>
> >> 						<js:DataGridColumn
> >label="Latest
> >> Version" columnWidth="25"
> >> itemRenderer="com.intools.dashboard.renderers.VersionUpdater"/>
> >> 					</js:columns>
> >> 				</ex:DataGrid>
> >> 			</js:TitleView>
> >> 		</js:views>
> >>
> >> Things that need improvement:
> >> 1. The tabs take up the full width.
> >> 2. The tabs are simple buttons and the TabBar is hard-coded in. It
> >> really needs to be toggle buttons which have a selected state.
> >>
> >> Otherwise it works pretty well.
> >>
> >> Harbs
> >>
> >> > On Nov 2, 2017, at 2:29 PM, Yishay Weiss <yi...@hotmail.com>
> >> wrote:
> >> >
> >> >
> >> >
> >> > For now, we would like to have an Apache Royale "ViewStack"
> >> equivalent but we do not know where to start.
> >> > What do you think the parent component should be ? Could you give
> >> > to
> >> us some cues ?
> >> >
> >> > I think Harbs got StackedViewManager [1] to work for him in one of
> >> his apps. It’s in the mobile package but I’m not sure there’s a
> >> reason not to use it on desktop.
> >> > [1]
> >>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> u
> >>b.c
> >>om%2Fapache%2Froyale-
> &data=02%7C01%7C%7C8ca096bd31024951eb4608d522d16c
> >>8d%
> >>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636453205224099105&sdata
> =
> >>s%2
> >>Fr5KzGaKVqOLy8wTZ4QEHCspnV8UyHxn0XhvhN2KlM%3D&reserved=0
> >> asjs/search?p=1&q=StackedViewManager&type=&utf8=%E2%9C%93
> >> >
> >
> >



Re: ViewStack implementation [was : Restarting contributions]

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Unlike Flex, I believe the className property on HTMLElements in the
browser is a space-separate list of classes.  Royale app devs will be
setting className.  typeNames is for the component developer to dictate
part of the list that shouldn't be changed.

If it turns out that typeNames is always going to be a single value, then
yes, we could try to find some way for the compiler to auto-generate it,
but I'm not sure that will always be the case.  Having a list of class
names sort of allows a form of multiple-inheritance which might be useful.

Of course, I could be wrong...
-Alex

On 11/4/17, 2:26 AM, "Idylog - Nicolas Granon" <ng...@idylog.com> wrote:

>Ok. Thank you.
>Found the typeNames property in UIBase.
>If I read it correctly, it is possible to have several space-separated
>values in typeNames (hence the final "s") ?
>What would be the usage for that ?
>
>Is it necessary to explicitly add the class name to typeNames ? Cannot be
>done automatically ?
> 
>Nicolas Granon
>
>
>
>
>> -----Message d'origine-----
>> De : Alex Harui [mailto:aharui@adobe.com.INVALID]
>> Envoyé : samedi 4 novembre 2017 08:25
>> À : dev@royale.apache.org; ngranon@idylog.com
>> Objet : Re: ViewStack implementation [was : Restarting contributions]
>> 
>> I hope if you search the code for 'typeNames' you will find proper
>> usage.
>> The typeName is supposed to be the name of the "type selector" in CSS.
>> So I think that code should have been
>> 
>> 	typeNames = "StackedViewManager";
>> 
>> HTH,
>> -Alex
>> 
>> On 11/3/17, 2:33 PM, "Idylog - Nicolas Granon" <ng...@idylog.com>
>> wrote:
>> 
>> >(I have changed the thread object to better reflect its content)
>> >
>> >That is crystal clear ! Thank you for that explanation.
>> >
>> >We are considering rewriting "ViewStack" based on Harb's work.
>> >
>> >In order to be more compliant, how should we use the typeNames
>> property
>> >you are talking about ?
>> >
>> >Nicolas Granon
>> >
>> >
>> >
>> >
>> >> -----Message d'origine-----
>> >> De : Alex Harui [mailto:aharui@adobe.com.INVALID] Envoyé : vendredi
>> 3
>> >> novembre 2017 18:23 À : dev@royale.apache.org; ngranon@idylog.com
>> >> Objet : Re: Restarting contributions
>> >>
>> >> We do that to try to get some backward compatibility with Flex.
>> >>
>> >> Flex extended the CSS type selector system to allow a type selector
>> >> for any component.  So you could do:
>> >>
>> >> DataGrid { font-weight: bold }
>> >>
>> >> You can't extend the type selector system in the browser (AFAIK) so
>> >> we mimic this by converting a non-standard type selector to a class
>> >> selector.
>> >>  So the CSS file in the JS output looks like:
>> >>
>> >> .DataGrid { font-weight: bold }
>> >>
>> >> And then to get that to work, we add DataGrid to the list of class
>> >> names on the HTMLElement.  I think that StackedViewManager may need
>> >> its code updated because components are supposed to use the
>> typeNames
>> >> property which the framework appends to the classNames list instead
>> >> of directly setting className itself.
>> >>
>> >> HTH,
>> >> -Alex
>> >>
>> >> On 11/3/17, 8:41 AM, "Idylog - Nicolas Granon" <ng...@idylog.com>
>> >> wrote:
>> >>
>> >> >Many thanks.
>> >> >
>> >> >Quite useful.
>> >> >
>> >> >Question : I read the source code, and saw that in the
>> >> >StackedViewManager class, you explicitly assign the class name (as
>> a
>> >> >String) to the className property like that :
>> >> >className = "StackedViewManager";
>> >> >
>> >> >Why is that ?
>> >> >
>> >> >Nicolas Granon
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >> -----Message d'origine-----
>> >> >> De : Harbs [mailto:harbs.lists@gmail.com] Envoyé : jeudi 2
>> >> >> novembre
>> >> >> 2017 13:37 À : dev@royale.apache.org Objet : Re: Restarting
>> >> >> contributions
>> >> >>
>> >> >> The classes probably do not belong necessarily in mobile.
>> >> >>
>> >> >> Here’s what I’m using:
>> >> >> css:
>> >> >>
>> >> >> 		js|TabbedViewManager {
>> >> >> 			IBeadView:
>> >> >>
>> >>
>> ClassReference("org.apache.royale.mobile.beads.TopTabbedViewManagerVi
>> >> >> ew
>> >> >> ");
>> >> >> 		}
>> >> >>
>> >> >> mxml:
>> >> >> 	<js:TabbedViewManager id="navController" x="109" y="96"
>> >> >> width="682" height="360" viewChanged="tabbedViewChanged(event)">
>> >> >> 		<js:views>
>> >> >> 			<js:TitleView title="Suites">
>> >> >> 			<!-- Suites Data Grid -->
>> >> >> 				<ex:DataGrid id="suiteDG" x="109" y="96"
>> >> >> width="682" height="360"
>> >> >>
>> >> >dataProvider="{suiteProvider}"
>> >> >>
>> >> >> 	change="handleExtensionDGChange(event)" rowHeight="30">
>> >> >> 					<js:beads>
>> >> >> 						<js:DataGridPercentageView
>> >> >/>
>> >> >> 					</js:beads>
>> >> >> 					<js:columns>
>> >> >> 						<js:DataGridColumn
>> >> >label="Product"
>> >> >> dataField="product" columnWidth="30"
>> >> >>
>> >>
>> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"
>> >> />
>> >> >> 						<js:DataGridColumn
>> >> >label="Status"
>> >> >> columnWidth="33"
>> >> >> itemRenderer="com.intools.dashboard.renderers.StatusRenderer"/>
>> >> >> 						<js:DataGridColumn
>> >> >label="Version"
>> >> >> dataField="iVersion" columnWidth="12"
>> >> >>
>> >>
>> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"
>> >> />
>> >> >> 						<js:DataGridColumn
>> >> >label="Latest
>> >> >> Version" columnWidth="25"
>> >> >> itemRenderer="com.intools.dashboard.renderers.VersionUpdater"/>
>> >> >> 					</js:columns>
>> >> >> 				</ex:DataGrid>
>> >> >> 			</js:TitleView>
>> >> >> 			<js:TitleView title="Plugins">
>> >> >> 			<!-- Suites Data Grid -->
>> >> >> 				<ex:DataGrid id="pluginDG"
>> >> >>
>> >> >> 	dataProvider="{pluginProvider}"
>> >> >>
>> >> >> 	change="handleExtensionDGChange(event)" rowHeight="30">
>> >> >> 					<js:beads>
>> >> >> 						<js:DataGridPercentageView
>> >> >/>
>> >> >> 					</js:beads>
>> >> >> 					<js:columns>
>> >> >> 						<js:DataGridColumn
>> >> >label="Product"
>> >> >> dataField="product" columnWidth="30"
>> >> >>
>> >>
>> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"
>> >> />
>> >> >> 						<js:DataGridColumn
>> >> >label="Status"
>> >> >> columnWidth="33"
>> >> >> itemRenderer="com.intools.dashboard.renderers.StatusRenderer"/>
>> >> >> 						<js:DataGridColumn
>> >> >label="Version"
>> >> >> dataField="iVersion" columnWidth="12"
>> >> >>
>> >>
>> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"
>> >> />
>> >> >> 						<js:DataGridColumn
>> >> >label="Latest
>> >> >> Version" columnWidth="25"
>> >> >> itemRenderer="com.intools.dashboard.renderers.VersionUpdater"/>
>> >> >> 					</js:columns>
>> >> >> 				</ex:DataGrid>
>> >> >> 			</js:TitleView>
>> >> >> 		</js:views>
>> >> >>
>> >> >> Things that need improvement:
>> >> >> 1. The tabs take up the full width.
>> >> >> 2. The tabs are simple buttons and the TabBar is hard-coded in.
>> It
>> >> >> really needs to be toggle buttons which have a selected state.
>> >> >>
>> >> >> Otherwise it works pretty well.
>> >> >>
>> >> >> Harbs
>> >> >>
>> >> >> > On Nov 2, 2017, at 2:29 PM, Yishay Weiss
>> >> >> > <yi...@hotmail.com>
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > For now, we would like to have an Apache Royale "ViewStack"
>> >> >> equivalent but we do not know where to start.
>> >> >> > What do you think the parent component should be ? Could you
>> >> >> > give to
>> >> >> us some cues ?
>> >> >> >
>> >> >> > I think Harbs got StackedViewManager [1] to work for him in one
>> >> >> > of
>> >> >> his apps. It’s in the mobile package but I’m not sure there’s a
>> >> >> reason not to use it on desktop.
>> >> >> > [1]
>> >>
>> >>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
>> >> >>th
>> >> u
>> >> >>b.c
>> >> >>om%2Fapache%2Froyale-
>> >> &data=02%7C01%7C%7C8ca096bd31024951eb4608d522d16c
>> >> >>8d%
>> >>
>> >>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636453205224099105&sda
>> >> >>ta
>> >> =
>> >> >>s%2
>> >> >>Fr5KzGaKVqOLy8wTZ4QEHCspnV8UyHxn0XhvhN2KlM%3D&reserved=0
>> >> >> asjs/search?p=1&q=StackedViewManager&type=&utf8=%E2%9C%93
>> >> >> >
>> >> >
>> >> >
>> >
>> >
>
>


RE: ViewStack implementation [was : Restarting contributions]

Posted by Idylog - Nicolas Granon <ng...@idylog.com>.
Ok. Thank you.
Found the typeNames property in UIBase.
If I read it correctly, it is possible to have several space-separated values in typeNames (hence the final "s") ?
What would be the usage for that ?

Is it necessary to explicitly add the class name to typeNames ? Cannot be done automatically ?
 
Nicolas Granon




> -----Message d'origine-----
> De : Alex Harui [mailto:aharui@adobe.com.INVALID]
> Envoyé : samedi 4 novembre 2017 08:25
> À : dev@royale.apache.org; ngranon@idylog.com
> Objet : Re: ViewStack implementation [was : Restarting contributions]
> 
> I hope if you search the code for 'typeNames' you will find proper
> usage.
> The typeName is supposed to be the name of the "type selector" in CSS.
> So I think that code should have been
> 
> 	typeNames = "StackedViewManager";
> 
> HTH,
> -Alex
> 
> On 11/3/17, 2:33 PM, "Idylog - Nicolas Granon" <ng...@idylog.com>
> wrote:
> 
> >(I have changed the thread object to better reflect its content)
> >
> >That is crystal clear ! Thank you for that explanation.
> >
> >We are considering rewriting "ViewStack" based on Harb's work.
> >
> >In order to be more compliant, how should we use the typeNames
> property
> >you are talking about ?
> >
> >Nicolas Granon
> >
> >
> >
> >
> >> -----Message d'origine-----
> >> De : Alex Harui [mailto:aharui@adobe.com.INVALID] Envoyé : vendredi
> 3
> >> novembre 2017 18:23 À : dev@royale.apache.org; ngranon@idylog.com
> >> Objet : Re: Restarting contributions
> >>
> >> We do that to try to get some backward compatibility with Flex.
> >>
> >> Flex extended the CSS type selector system to allow a type selector
> >> for any component.  So you could do:
> >>
> >> DataGrid { font-weight: bold }
> >>
> >> You can't extend the type selector system in the browser (AFAIK) so
> >> we mimic this by converting a non-standard type selector to a class
> >> selector.
> >>  So the CSS file in the JS output looks like:
> >>
> >> .DataGrid { font-weight: bold }
> >>
> >> And then to get that to work, we add DataGrid to the list of class
> >> names on the HTMLElement.  I think that StackedViewManager may need
> >> its code updated because components are supposed to use the
> typeNames
> >> property which the framework appends to the classNames list instead
> >> of directly setting className itself.
> >>
> >> HTH,
> >> -Alex
> >>
> >> On 11/3/17, 8:41 AM, "Idylog - Nicolas Granon" <ng...@idylog.com>
> >> wrote:
> >>
> >> >Many thanks.
> >> >
> >> >Quite useful.
> >> >
> >> >Question : I read the source code, and saw that in the
> >> >StackedViewManager class, you explicitly assign the class name (as
> a
> >> >String) to the className property like that :
> >> >className = "StackedViewManager";
> >> >
> >> >Why is that ?
> >> >
> >> >Nicolas Granon
> >> >
> >> >
> >> >
> >> >
> >> >> -----Message d'origine-----
> >> >> De : Harbs [mailto:harbs.lists@gmail.com] Envoyé : jeudi 2
> >> >> novembre
> >> >> 2017 13:37 À : dev@royale.apache.org Objet : Re: Restarting
> >> >> contributions
> >> >>
> >> >> The classes probably do not belong necessarily in mobile.
> >> >>
> >> >> Here’s what I’m using:
> >> >> css:
> >> >>
> >> >> 		js|TabbedViewManager {
> >> >> 			IBeadView:
> >> >>
> >>
> ClassReference("org.apache.royale.mobile.beads.TopTabbedViewManagerVi
> >> >> ew
> >> >> ");
> >> >> 		}
> >> >>
> >> >> mxml:
> >> >> 	<js:TabbedViewManager id="navController" x="109" y="96"
> >> >> width="682" height="360" viewChanged="tabbedViewChanged(event)">
> >> >> 		<js:views>
> >> >> 			<js:TitleView title="Suites">
> >> >> 			<!-- Suites Data Grid -->
> >> >> 				<ex:DataGrid id="suiteDG" x="109" y="96"
> >> >> width="682" height="360"
> >> >>
> >> >dataProvider="{suiteProvider}"
> >> >>
> >> >> 	change="handleExtensionDGChange(event)" rowHeight="30">
> >> >> 					<js:beads>
> >> >> 						<js:DataGridPercentageView
> >> >/>
> >> >> 					</js:beads>
> >> >> 					<js:columns>
> >> >> 						<js:DataGridColumn
> >> >label="Product"
> >> >> dataField="product" columnWidth="30"
> >> >>
> >>
> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"
> >> />
> >> >> 						<js:DataGridColumn
> >> >label="Status"
> >> >> columnWidth="33"
> >> >> itemRenderer="com.intools.dashboard.renderers.StatusRenderer"/>
> >> >> 						<js:DataGridColumn
> >> >label="Version"
> >> >> dataField="iVersion" columnWidth="12"
> >> >>
> >>
> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"
> >> />
> >> >> 						<js:DataGridColumn
> >> >label="Latest
> >> >> Version" columnWidth="25"
> >> >> itemRenderer="com.intools.dashboard.renderers.VersionUpdater"/>
> >> >> 					</js:columns>
> >> >> 				</ex:DataGrid>
> >> >> 			</js:TitleView>
> >> >> 			<js:TitleView title="Plugins">
> >> >> 			<!-- Suites Data Grid -->
> >> >> 				<ex:DataGrid id="pluginDG"
> >> >>
> >> >> 	dataProvider="{pluginProvider}"
> >> >>
> >> >> 	change="handleExtensionDGChange(event)" rowHeight="30">
> >> >> 					<js:beads>
> >> >> 						<js:DataGridPercentageView
> >> >/>
> >> >> 					</js:beads>
> >> >> 					<js:columns>
> >> >> 						<js:DataGridColumn
> >> >label="Product"
> >> >> dataField="product" columnWidth="30"
> >> >>
> >>
> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"
> >> />
> >> >> 						<js:DataGridColumn
> >> >label="Status"
> >> >> columnWidth="33"
> >> >> itemRenderer="com.intools.dashboard.renderers.StatusRenderer"/>
> >> >> 						<js:DataGridColumn
> >> >label="Version"
> >> >> dataField="iVersion" columnWidth="12"
> >> >>
> >>
> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"
> >> />
> >> >> 						<js:DataGridColumn
> >> >label="Latest
> >> >> Version" columnWidth="25"
> >> >> itemRenderer="com.intools.dashboard.renderers.VersionUpdater"/>
> >> >> 					</js:columns>
> >> >> 				</ex:DataGrid>
> >> >> 			</js:TitleView>
> >> >> 		</js:views>
> >> >>
> >> >> Things that need improvement:
> >> >> 1. The tabs take up the full width.
> >> >> 2. The tabs are simple buttons and the TabBar is hard-coded in.
> It
> >> >> really needs to be toggle buttons which have a selected state.
> >> >>
> >> >> Otherwise it works pretty well.
> >> >>
> >> >> Harbs
> >> >>
> >> >> > On Nov 2, 2017, at 2:29 PM, Yishay Weiss
> >> >> > <yi...@hotmail.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> >
> >> >> > For now, we would like to have an Apache Royale "ViewStack"
> >> >> equivalent but we do not know where to start.
> >> >> > What do you think the parent component should be ? Could you
> >> >> > give to
> >> >> us some cues ?
> >> >> >
> >> >> > I think Harbs got StackedViewManager [1] to work for him in one
> >> >> > of
> >> >> his apps. It’s in the mobile package but I’m not sure there’s a
> >> >> reason not to use it on desktop.
> >> >> > [1]
> >>
> >>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
> >> >>th
> >> u
> >> >>b.c
> >> >>om%2Fapache%2Froyale-
> >> &data=02%7C01%7C%7C8ca096bd31024951eb4608d522d16c
> >> >>8d%
> >>
> >>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636453205224099105&sda
> >> >>ta
> >> =
> >> >>s%2
> >> >>Fr5KzGaKVqOLy8wTZ4QEHCspnV8UyHxn0XhvhN2KlM%3D&reserved=0
> >> >> asjs/search?p=1&q=StackedViewManager&type=&utf8=%E2%9C%93
> >> >> >
> >> >
> >> >
> >
> >



Re: ViewStack implementation [was : Restarting contributions]

Posted by Alex Harui <ah...@adobe.com.INVALID>.
I hope if you search the code for 'typeNames' you will find proper usage.
The typeName is supposed to be the name of the "type selector" in CSS.  So
I think that code should have been

	typeNames = "StackedViewManager";

HTH,
-Alex

On 11/3/17, 2:33 PM, "Idylog - Nicolas Granon" <ng...@idylog.com> wrote:

>(I have changed the thread object to better reflect its content)
>
>That is crystal clear ! Thank you for that explanation.
>
>We are considering rewriting "ViewStack" based on Harb's work.
>
>In order to be more compliant, how should we use the typeNames property
>you are talking about ?
>
>Nicolas Granon
>
>
>
>
>> -----Message d'origine-----
>> De : Alex Harui [mailto:aharui@adobe.com.INVALID]
>> Envoyé : vendredi 3 novembre 2017 18:23
>> À : dev@royale.apache.org; ngranon@idylog.com
>> Objet : Re: Restarting contributions
>> 
>> We do that to try to get some backward compatibility with Flex.
>> 
>> Flex extended the CSS type selector system to allow a type selector for
>> any component.  So you could do:
>> 
>> DataGrid { font-weight: bold }
>> 
>> You can't extend the type selector system in the browser (AFAIK) so we
>> mimic this by converting a non-standard type selector to a class
>> selector.
>>  So the CSS file in the JS output looks like:
>> 
>> .DataGrid { font-weight: bold }
>> 
>> And then to get that to work, we add DataGrid to the list of class
>> names on the HTMLElement.  I think that StackedViewManager may need its
>> code updated because components are supposed to use the typeNames
>> property which the framework appends to the classNames list instead of
>> directly setting className itself.
>> 
>> HTH,
>> -Alex
>> 
>> On 11/3/17, 8:41 AM, "Idylog - Nicolas Granon" <ng...@idylog.com>
>> wrote:
>> 
>> >Many thanks.
>> >
>> >Quite useful.
>> >
>> >Question : I read the source code, and saw that in the
>> >StackedViewManager class, you explicitly assign the class name (as a
>> >String) to the className property like that :
>> >className = "StackedViewManager";
>> >
>> >Why is that ?
>> >
>> >Nicolas Granon
>> >
>> >
>> >
>> >
>> >> -----Message d'origine-----
>> >> De : Harbs [mailto:harbs.lists@gmail.com] Envoyé : jeudi 2 novembre
>> >> 2017 13:37 À : dev@royale.apache.org Objet : Re: Restarting
>> >> contributions
>> >>
>> >> The classes probably do not belong necessarily in mobile.
>> >>
>> >> Here’s what I’m using:
>> >> css:
>> >>
>> >> 		js|TabbedViewManager {
>> >> 			IBeadView:
>> >>
>> ClassReference("org.apache.royale.mobile.beads.TopTabbedViewManagerVi
>> >> ew
>> >> ");
>> >> 		}
>> >>
>> >> mxml:
>> >> 	<js:TabbedViewManager id="navController" x="109" y="96"
>> >> width="682" height="360" viewChanged="tabbedViewChanged(event)">
>> >> 		<js:views>
>> >> 			<js:TitleView title="Suites">
>> >> 			<!-- Suites Data Grid -->
>> >> 				<ex:DataGrid id="suiteDG" x="109" y="96"
>> >> width="682" height="360"
>> >>
>> >dataProvider="{suiteProvider}"
>> >>
>> >> 	change="handleExtensionDGChange(event)" rowHeight="30">
>> >> 					<js:beads>
>> >> 						<js:DataGridPercentageView
>> >/>
>> >> 					</js:beads>
>> >> 					<js:columns>
>> >> 						<js:DataGridColumn
>> >label="Product"
>> >> dataField="product" columnWidth="30"
>> >>
>> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"/>
>> >> 						<js:DataGridColumn
>> >label="Status"
>> >> columnWidth="33"
>> >> itemRenderer="com.intools.dashboard.renderers.StatusRenderer"/>
>> >> 						<js:DataGridColumn
>> >label="Version"
>> >> dataField="iVersion" columnWidth="12"
>> >>
>> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"/>
>> >> 						<js:DataGridColumn
>> >label="Latest
>> >> Version" columnWidth="25"
>> >> itemRenderer="com.intools.dashboard.renderers.VersionUpdater"/>
>> >> 					</js:columns>
>> >> 				</ex:DataGrid>
>> >> 			</js:TitleView>
>> >> 			<js:TitleView title="Plugins">
>> >> 			<!-- Suites Data Grid -->
>> >> 				<ex:DataGrid id="pluginDG"
>> >>
>> >> 	dataProvider="{pluginProvider}"
>> >>
>> >> 	change="handleExtensionDGChange(event)" rowHeight="30">
>> >> 					<js:beads>
>> >> 						<js:DataGridPercentageView
>> >/>
>> >> 					</js:beads>
>> >> 					<js:columns>
>> >> 						<js:DataGridColumn
>> >label="Product"
>> >> dataField="product" columnWidth="30"
>> >>
>> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"/>
>> >> 						<js:DataGridColumn
>> >label="Status"
>> >> columnWidth="33"
>> >> itemRenderer="com.intools.dashboard.renderers.StatusRenderer"/>
>> >> 						<js:DataGridColumn
>> >label="Version"
>> >> dataField="iVersion" columnWidth="12"
>> >>
>> itemRenderer="com.intools.dashboard.renderers.CenteredStringRenderer"/>
>> >> 						<js:DataGridColumn
>> >label="Latest
>> >> Version" columnWidth="25"
>> >> itemRenderer="com.intools.dashboard.renderers.VersionUpdater"/>
>> >> 					</js:columns>
>> >> 				</ex:DataGrid>
>> >> 			</js:TitleView>
>> >> 		</js:views>
>> >>
>> >> Things that need improvement:
>> >> 1. The tabs take up the full width.
>> >> 2. The tabs are simple buttons and the TabBar is hard-coded in. It
>> >> really needs to be toggle buttons which have a selected state.
>> >>
>> >> Otherwise it works pretty well.
>> >>
>> >> Harbs
>> >>
>> >> > On Nov 2, 2017, at 2:29 PM, Yishay Weiss <yi...@hotmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> >
>> >> > For now, we would like to have an Apache Royale "ViewStack"
>> >> equivalent but we do not know where to start.
>> >> > What do you think the parent component should be ? Could you give
>> >> > to
>> >> us some cues ?
>> >> >
>> >> > I think Harbs got StackedViewManager [1] to work for him in one of
>> >> his apps. It’s in the mobile package but I’m not sure there’s a
>> >> reason not to use it on desktop.
>> >> > [1]
>> >>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
>> u
>> >>b.c
>> >>om%2Fapache%2Froyale-
>> &data=02%7C01%7C%7C8ca096bd31024951eb4608d522d16c
>> >>8d%
>> >>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636453205224099105&sdata
>> =
>> >>s%2
>> >>Fr5KzGaKVqOLy8wTZ4QEHCspnV8UyHxn0XhvhN2KlM%3D&reserved=0
>> >> asjs/search?p=1&q=StackedViewManager&type=&utf8=%E2%9C%93
>> >> >
>> >
>> >
>
>