royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com.INVALID>
Subject Re: ViewStack implementation [was : Restarting contributions]
Date Sat, 04 Nov 2017 07:24:39 GMT
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" <ngranon@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" <ngranon@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 <yishayjobs@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
>> >> >
>> >
>> >
>
>

Mime
View raw message