Re: Type Selector Approximation (was Re: [DISCUSS] Explanation of the changes)

2018-05-19 Thread Peter Ent
I know I am late to this very, very long discussion, but after wading through 
(and even skipping over some of the more “complex” emails), I think this is 
become overly complicated. My understanding has been that RadioButton (for 
example) in basic.css would provide the beads while .RadioButton (the same 
thing, except with a defining namespace) in the theme.css would give it color, 
font, and so forth. 

You can use namespaces to qualify the CSS to make it less confusing. Further, 
developers using className should find their selector name appended to the 
class list:  where they specified 
 The default.css would supply the beads, 
the theme.css would supply the common style, and the user’s style would add or 
replace styles.

While building that Simple package, I went through dozens of tests. The browser 
and CSS engine are fine at putting things together. The technique I used is 
this:

addClassName(s:String) - appends the class selector to the class selector 
string chain.
removeClassName(s:String) - removes the class selector from the chain (useful 
for doing selection highlighting)
setClassName(s:String) - replaces the chain and resets it.

The most basic class used setClassName to establish the initial class selector. 
Sub-classes, if they wanted to build a chain, used addClassName, which appended 
their name to the list (eg, class=“Group List”). If a subclass was so special 
that it did not want the chain and wanted to the first, then it would use 
setClassName (eg, class=“List”).

The className property ALWAYS became the last in the chain. The setClassName 
had no effect on it, className was always appended before the HTML was 
generated. This technique gave me complete control over how things styles were 
applied.  would be class=“Group List MyList” or if 
List did setClassName(“List”) to wipe out what its superclass(es) did, then you 
would get class=“List MyList”.

HTH,
Peter

> On May 18, 2018, at 7:50 PM, Alex Harui  wrote:
> 
> 
> 
> On 5/18/18, 2:50 AM, "Harbs"  wrote:
>And basic.css has:
>RadioButton
>{
>   font-size: 12px;
>   font-family: sans-serif;
>}
> 
>RadioButton is a Royale Type Selector as it should be. No discussion on 
> that front (with the exception that the styling should be removed from the 
> defaults.css).
> 
>Te whole question is what happens in MyApp.css which is compiled standard 
> HTML CSS.
> 
>Currently we get:
> 
>.RadioButton {
>font-family: sans-serif;
>font-size: 12px;
>}
> 
>This CSS comes from the Type Selector in basic.css. This seems to be 
> included in the app.css even if RadioButton is not included. But putting that 
> point aside at the moment, the question is what the class selector (in 
> app.css) should be *produced* from the type selector.
> 
> It is not obvious why RadioButton is in the app.css.  This might be a new bug 
> from the theme handling I did recently.  I will investigate more.
> 
>I think we agree that “.RadioButton" is not right because there can be 
> RadioButton from more than one component set.
> 
>One option is to fully qualify the *compiled* class selector so it’s named 
> “.org_apache_royale_html_RadioButton”. I’m pretty sure this is what you are 
> proposing. The primary objection to that is that it’s a rather long string 
> and kind of “ugly”.
> 
> You can choose other string transformations, but the key point is that they 
> should be derived from the unique QName.  Any other scheme just means that 
> the developer has to solve the unique name problem twice which increases the 
> chance of collision.
> 
>Another option is “.basic.Button”. The advantage of this approach is 
> mostly aesthetics. It also has the advantage of being theoretically more 
> flexible because CSS can be applied to “basic" and “Button” separately. Of 
> course that goes both ways and if there’s css applied to “.Button” by 
> mistake, it can effect the “basic” Button where it’s not supposed to.
> 
> I'm not clear how the compiler or the ValuesManager (at runtime) can 
> efficiently associate .basic.Button with org.apache.royale.basic.Button.  
> Metadata lookups can be expensive.
> 
> 
>> If one problem is with Type Selectors in Royale inheriting styles from Base 
>> Classes, we should discuss ways to manage that.  Metadata is possible, but 
>> metadata is expensive at runtime.
> 
>Good point about extra code from meta tags. Maybe the compiler could strip 
> these out?
> 
> My point is that ValuesManager will need this information at runtime.
> 
>My suggestion with meta-data was a way to enable the second option. It 
> does not need to be specifically meta-tags. It could be something like this 
> as well:
> 
>/**
>* royaleclassselector RadioButton
>* royaleclassprefix basic
>* royaleinheritsbaseselector
>*/
> 
> These ASDoc directives are definitely not available at runtime.
> 
> 
>> There are two parts to how Type Selectors work.  The main conc

Re: Container change

2018-05-07 Thread Peter Ent
I agree, to some extent, with Alex on this. One of the reasons I played around 
with the Simple project was that I thought Core was pretty much good as-is. I 
thought IUIBase needed some more stuff, but Core is pretty universal. As such, 
I was able to build a new framework on top of it (with the minor changes). If 
you move things like ContainerBase into it, it makes Core less adaptable to 
future ideas. 

For me, the real power of Royale is the compiler + Core. With that, you can go 
in many directions. Plus, if one day there is an ActionScript to Swift or 
ActionScript to WebAssembly, you would want Core to be as universal as possible.

I strongly urge you to keep Core as agnostic as possible. Or make something 
underneath it.

—peter

> On May 7, 2018, at 1:25 AM, Alex Harui  wrote:
> 
> For something to be in Core, it really should be a "universal 
> implementation", meaning it contains code that just about every component set 
> will need.
> 
> I don't think Container is universal.  ContainerBase might be.
> ItemRendererMouseController and DataItemRenderer?  Not sure.
> 
> FWIW, trying to eliminate all dependencies from Jewel to Basic doesn't make 
> sense to me.  Especially if it is going to result in duplication of code.  So 
> what if Jewel components want to use some Basic class?  Sometimes a Basic 
> implementation is all you need.
> 
> My 2 cents,
> -Alex
> 
> On 5/6/18, 10:28 AM, "carlos.rov...@gmail.com 
>  on behalf of Carlos Rovira" 
> mailto:carlos.rov...@gmail.com> on behalf of 
> carlosrov...@apache.org > wrote:
> 
>Hi Harbs,
> 
>just commited a change that return the controller to Basic to html package
>let me now if that fixes your problem
> 
>thanks
> 
>Carlos
> 
> 
>2018-05-06 12:25 GMT+02:00 Carlos Rovira :
> 
>> Just returned Container to Basic without problem.
>> 
>> But seems to me that this change should not make any problem at all for
>> anyone, since is in the same package (core) and all examples build without
>> problem, so any other App should as well build without any change.
>> 
>> 
>> 
>> 
>> 2018-05-06 12:00 GMT+02:00 Carlos Rovira :
>> 
>>> Hi
>>> 
>>> dealing with ItemRendererMouseController there's a dependency in
>>> DataItemRenderer, and that was needed to move to Core, since is core in
>>> itself. Thinking about it that controller seems to have a very core
>>> functionality, so IMHO is that is better to upgrade Apps changing "html"
>>> package to "core". If I'm not missing something that change should be
>>> very straight forward to do (I made lots of this in examples, and use to be
>>> one or two places)
>>> 
>>> I'll go to revise Container
>>> 
>>> 
>>> 
>>> 2018-05-06 11:39 GMT+02:00 Carlos Rovira :
>>> 
 Hi Piotr,
 
 I'm using HTML only for some headings, at the moment, but as Harbs said
 in the other thread about HTML, it was depending from Group and that wasn't
 needed, and that make HTML pull the complete Basic dependency when not
 required, and that's made lots of CSS be linked.
 
 So HTML for me was only used to use some H3, headings, and SPAN
 
 In the other hand the controller seems to me more from Basic so I think
 is ok to return it to Basic, it doesn't nothing to do with HTML.
 
 In the end some last fixes are normal in a refactor like this.
 
 thanks! :)
 
 2018-05-06 10:09 GMT+02:00 Piotr Zarzycki :
 
> I'm a bit afraid to pull down changes. :) Let's think a bit more about
> that. Carlos wanted to totally separate each module. He didn't want to
> have
> dependency in Jewel from Basic.
> 
> As I understand he was using HTML module which seems to be dependent on
> Basic as well.
> 
> His changes are get rid off Basic things not only from Jewel, but also
> from
> HTML which makes Jewel clear - Am I right Carlos?
> 
> If yes - what does that mean that such controller like
> ItemRendererMouseController is in HTML?
> 
> Is it mean that it does use only HTML module thing not Basic at all? It
> is
> JS only controller?
> 
> Piotr
> 
> On Sun, May 6, 2018, 10:02 AM Harbs  wrote:
> 
>> Actually my whole app is broken now… :-(
>> 
>>> On May 6, 2018, at 10:14 AM, Harbs  wrote:
>>> 
>>> org.apache.royale.html.beads.controllers.ItemRendererMouseController
> was
>> changed to the core package as well (which also broke my app)
>>> 
>>> I did not notice discussion about this. Why the package name
> change? How
>> many more changes were there like this?
>>> 
>>> Harbs
>>> 
 On May 6, 2018, at 10:07 AM, Harbs  wrote:
 
 Why did Container become org.apache.royale.core.Container instead
> of
>> org.apache.royale.html.Container?
 
 Why is Container Core at all?
 
 This change broke my app. While it’s not

New email

2018-05-04 Thread Peter Ent
Hi,

I've got a lot on my mind today (last day with Adobe) and I'm transferring my 
Apache stuff to my personal accounts. I was wondering if someone could point me 
in the right direction.

I went to the Apache LDAP and changed my forwarding email address. After a bit 
I sent an email from a non-related account to my Apache.org email address and 
the email was forwarded. Yeah!

I thought that was enough to direct anything from these email lists but there 
must be another step since I'm still getting email to my Adobe account. Do I 
need to unsubscribe and re-subscribe to the lists? I really would like to 
contribute some more once things settle down for me.

Thanks. Sorry for being a dunce, just distracted today.

—peter


Re: Newest little Harbs (was Re: Null pointer errors)

2018-05-02 Thread Peter Ent
Congratulations! I hope all are doing well.
‹peter

On 5/2/18, 9:35 AM, "Harbs"  wrote:

>Well, how about a baby sister? ;-)
>
>We just had a baby girl about a half hour ago. :-)
>
>(I¹ll post a picture as soon as I take one.)
>
>Harbs
>
>> On May 1, 2018, at 11:33 PM, Alex Harui 
>>wrote:
>> 
>> I can think of better graduation gifts than the chance to learn the
>>compiler code __.
>



Re: Welcome Alina Kazi as Apache Royale Committer

2018-04-26 Thread Peter Ent
Hi Alina,

Welcome to the Apache Royale team. Have fun building MX Royale components
and making Royale a hit!

‹peter

On 4/26/18, 1:13 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi Alina,
>
>Welcome to the team! :)
>
>talking about team, let me know if you can provide a square photo for the
>Team Page on the website, here:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Froyale.apa
>che.org%2Fteam%2F&data=02%7C01%7Cpent%40adobe.com%7C9629c6a676fd40f397e108
>d5ab991a12%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636603596466821461
>&sdata=djsOhxAuP0yu5iKZPK6I5tkn0xm8UMtxSOzbnMT%2BSAU%3D&reserved=0
>
>Great to have you with us! Happy "Royaleing" ;)
>
>Carlos
>
>
>
>
>2018-04-26 18:24 GMT+02:00 Piotr Zarzycki :
>
>> Welcome on board Alina!
>>
>> Good Luck! :)
>> Piotr
>>
>> 2018-04-26 18:21 GMT+02:00 Alex Harui :
>>
>> > Hi folks,
>> >
>> > The Apache Royale PMC is excited to welcome Alina Kazi as our newest
>> > committer!  Alina has recently been helping create the emulation
>> components
>> > that should ease the effort of migrating Flex apps to Royale, which
>> earned
>> > her
>> > the merit to become a committer (yes, you can become a committer the
>>same
>> > way).
>> >
>> > Please join us in welcoming Alina as a committer to the Apache Royale
>> > project.
>> >
>> > Welcome Alina!
>> > -Alex
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>> --
>>
>> Piotr Zarzycki
>>
>> Patreon: 
>>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C9629c6a676fd40
>>f397e108d5ab991a12%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636603596
>>466821461&sdata=S%2FDkxcUnLI%2Fa1WV5mQT8GAw4b5alMZ0Y6kNSqA1KftY%3D&reserv
>>ed=0
>> 
>>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C9629c6a676fd40
>>f397e108d5ab991a12%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636603596
>>466821461&sdata=S%2FDkxcUnLI%2Fa1WV5mQT8GAw4b5alMZ0Y6kNSqA1KftY%3D&reserv
>>ed=0>*
>>
>
>
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%7C9629c6a676fd40f397e108d5ab
>991a12%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636603596466821461&sda
>ta=hzEz2RWtr5lUsDCMWqcxlLve9weLbn17dNbKli464uY%3D&reserved=0



Re: Royale Simple(jsonly) and More

2018-04-25 Thread Peter Ent
Hi,

I have renamed the repository to "royale-simple-jsonly" and changed the
ActionScript project name to Simple and the package name to "simple" as
well. 

https://github.com/pentapache/royale-simple-jsonly/wiki

Enjoy!
—peter

On 4/24/18, 11:07 AM, "Peter Ent"  wrote:

>I do like simple-js-only but that's not really what it could be. I didn't
>turn off the SWF build for the repo because I thought maybe I (or someone
>else) would go back and add the SWF side. I did write that at this point
>it is JS-only, but it still stands as possible to add SWF.
>
>We have -asjs which is really -asjs+swf+js or, more important, it can be
>anything.
>
>However, given that right now it is a JS-only code base, I think naming it
>simple-js-only is a better choice. I will work on renaming it over the
>next few days.
>
>Thank you so much for your input.
>‹peter
>
>On 4/24/18, 4:28 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
> wrote:
>
>>maybe better saying what's in and not what's out. For example
>>"royale-simple-js-only" ?
>>
>>just my 2 :)
>>
>>2018-04-24 8:36 GMT+02:00 Alex Harui :
>>
>>> IMO, "simple" is too subjective.  IMO, the name should indicate the key
>>> differentiators.  So "no-swf" might be part of the name.
>>>
>>> My 2 cents,
>>> -Alex
>>>
>>> On 4/23/18, 11:59 AM, "Peter Ent"  wrote:
>>>
>>> Hi,
>>>
>>> I picked "Foundation" because "Basic" was taken and I was thinking
>>>of
>>> "foundation classes". I guess I should have been more open on the
>>>list
>>> that I was creating a new set of components. I did this as a fun
>>>task
>>> for
>>> myself while I was discharging all of the thoughts on Royale Basic
>>>in
>>> my
>>> head about these years in FlexJS/Royale and I wanted to preserve
>>>those
>>> thoughts. I did not intend this to be disruptive in any way; I
>>>didn't
>>> think people would be obliged to look at it right away (or even at
>>>all
>>> if
>>> they didn't feel interested).
>>>
>>> Perhaps it is best if I rename the repository. How do you feel
>>>about
>>> "royale-simple"? I think "simple" is good because the classes are
>>>not
>>> that
>>> complex.
>>>
>>> I have been asked why I thought this was necessary to do and if I
>>> looked
>>> at the MDL project to see about leveraging it. I did not look at
>>>MDL (I
>>> did follow MDL when it was being developed but it has been a long
>>> while),
>>> but I have today gone back and looked at some key classes.
>>>
>>> First, this project was not necessary to fill any deficiencies in
>>> Royale.
>>> This was, as I said above, just a fun project for me. I like to
>>>write
>>> code. There's something very creative about starting with a nearly
>>> blank
>>> slate and producing something, even if something like already
>>>exists.
>>>
>>> One main thing I did that is different from MDL and Basic, is that
>>>I
>>> made
>>> everything inherit from a common base class - UIComponent. In Basic
>>> (and
>>> MDL), buttons are different due to their SWF-side implementation. I
>>> made
>>> Buttons a UIComponent and I made the Application a UIComponent as
>>> well. I
>>> also enhanced IUIBase and added other properties. I also wanted to
>>> give it
>>> some Flex-like appeal so I kept some of the same class names that I
>>> liked;
>>> I was inspired by revisiting Flex recently.
>>>
>>> There is nothing wrong with what we have created in Royale. I think
>>>it
>>> is
>>> a testament to its design that a new framework can be added without
>>> much
>>> work and demonstrates to people that they can make their own
>>>frameworks
>>> using Apache Royale as their starting point.
>>>
>>> I'll wait a few days and if there are no objections, I'll rename
>>> "royale-foundation" to "royale-simple".
>>>
>>> Thanks,
>>> Peter
>>>
>>>
>>> On 4/22/18, 7:55 PM, "Niclas Hedhman"  wrote:

Re: Royale Foundation and More

2018-04-24 Thread Peter Ent
I do like simple-js-only but that's not really what it could be. I didn't
turn off the SWF build for the repo because I thought maybe I (or someone
else) would go back and add the SWF side. I did write that at this point
it is JS-only, but it still stands as possible to add SWF.

We have -asjs which is really -asjs+swf+js or, more important, it can be
anything.

However, given that right now it is a JS-only code base, I think naming it
simple-js-only is a better choice. I will work on renaming it over the
next few days.

Thank you so much for your input.
‹peter

On 4/24/18, 4:28 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>maybe better saying what's in and not what's out. For example
>"royale-simple-js-only" ?
>
>just my 2 :)
>
>2018-04-24 8:36 GMT+02:00 Alex Harui :
>
>> IMO, "simple" is too subjective.  IMO, the name should indicate the key
>> differentiators.  So "no-swf" might be part of the name.
>>
>> My 2 cents,
>> -Alex
>>
>> On 4/23/18, 11:59 AM, "Peter Ent"  wrote:
>>
>> Hi,
>>
>> I picked "Foundation" because "Basic" was taken and I was thinking
>>of
>> "foundation classes". I guess I should have been more open on the
>>list
>> that I was creating a new set of components. I did this as a fun
>>task
>> for
>> myself while I was discharging all of the thoughts on Royale Basic
>>in
>> my
>> head about these years in FlexJS/Royale and I wanted to preserve
>>those
>> thoughts. I did not intend this to be disruptive in any way; I
>>didn't
>> think people would be obliged to look at it right away (or even at
>>all
>> if
>> they didn't feel interested).
>>
>> Perhaps it is best if I rename the repository. How do you feel about
>> "royale-simple"? I think "simple" is good because the classes are
>>not
>> that
>> complex.
>>
>> I have been asked why I thought this was necessary to do and if I
>> looked
>> at the MDL project to see about leveraging it. I did not look at
>>MDL (I
>> did follow MDL when it was being developed but it has been a long
>> while),
>> but I have today gone back and looked at some key classes.
>>
>> First, this project was not necessary to fill any deficiencies in
>> Royale.
>> This was, as I said above, just a fun project for me. I like to
>>write
>> code. There's something very creative about starting with a nearly
>> blank
>> slate and producing something, even if something like already
>>exists.
>>
>> One main thing I did that is different from MDL and Basic, is that I
>> made
>> everything inherit from a common base class - UIComponent. In Basic
>> (and
>> MDL), buttons are different due to their SWF-side implementation. I
>> made
>> Buttons a UIComponent and I made the Application a UIComponent as
>> well. I
>> also enhanced IUIBase and added other properties. I also wanted to
>> give it
>> some Flex-like appeal so I kept some of the same class names that I
>> liked;
>> I was inspired by revisiting Flex recently.
>>
>> There is nothing wrong with what we have created in Royale. I think
>>it
>> is
>> a testament to its design that a new framework can be added without
>> much
>> work and demonstrates to people that they can make their own
>>frameworks
>> using Apache Royale as their starting point.
>>
>> I'll wait a few days and if there are no objections, I'll rename
>> "royale-foundation" to "royale-simple".
>>
>> Thanks,
>> Peter
>>
>>
>> On 4/22/18, 7:55 PM, "Niclas Hedhman"  wrote:
>>
>> >If this goes forward, I hope to see a different name... Apache
>>Royale
>> >Foundation sounds like some daughter/sibling organization of Apache
>> >Software Foundation.
>> >
>> >I.e. I understand that "Foundation" here is similar to that of
>> Microsoft
>> >Foundation Classes, but due to ASF's name, I think it is
>>unfortunate
>> if
>> >this name persist.
>> >
>> >My 2 cent
>> >Niclas
>> >
>> >On Mon, Apr 23, 2018, 00:37 Peter Ent 
>>wrote:
>> >
>> >> Hi,
>> >>
>> >> As many 

Re: Royale Foundation and More

2018-04-23 Thread Peter Ent
Hi,

I picked "Foundation" because "Basic" was taken and I was thinking of
"foundation classes". I guess I should have been more open on the list
that I was creating a new set of components. I did this as a fun task for
myself while I was discharging all of the thoughts on Royale Basic in my
head about these years in FlexJS/Royale and I wanted to preserve those
thoughts. I did not intend this to be disruptive in any way; I didn't
think people would be obliged to look at it right away (or even at all if
they didn't feel interested).

Perhaps it is best if I rename the repository. How do you feel about
"royale-simple"? I think "simple" is good because the classes are not that
complex. 

I have been asked why I thought this was necessary to do and if I looked
at the MDL project to see about leveraging it. I did not look at MDL (I
did follow MDL when it was being developed but it has been a long while),
but I have today gone back and looked at some key classes.

First, this project was not necessary to fill any deficiencies in Royale.
This was, as I said above, just a fun project for me. I like to write
code. There's something very creative about starting with a nearly blank
slate and producing something, even if something like already exists.

One main thing I did that is different from MDL and Basic, is that I made
everything inherit from a common base class - UIComponent. In Basic (and
MDL), buttons are different due to their SWF-side implementation. I made
Buttons a UIComponent and I made the Application a UIComponent as well. I
also enhanced IUIBase and added other properties. I also wanted to give it
some Flex-like appeal so I kept some of the same class names that I liked;
I was inspired by revisiting Flex recently.

There is nothing wrong with what we have created in Royale. I think it is
a testament to its design that a new framework can be added without much
work and demonstrates to people that they can make their own frameworks
using Apache Royale as their starting point.

I'll wait a few days and if there are no objections, I'll rename
"royale-foundation" to "royale-simple".

Thanks,
Peter


On 4/22/18, 7:55 PM, "Niclas Hedhman"  wrote:

>If this goes forward, I hope to see a different name... Apache Royale
>Foundation sounds like some daughter/sibling organization of Apache
>Software Foundation.
>
>I.e. I understand that "Foundation" here is similar to that of Microsoft
>Foundation Classes, but due to ASF's name, I think it is unfortunate if
>this name persist.
>
>My 2 cent
>Niclas
>
>On Mon, Apr 23, 2018, 00:37 Peter Ent  wrote:
>
>> Hi,
>>
>> As many of you know, over five years ago Adobe Systems donated Flex to
>>the
>> Apache Foundation. My time on this mission is drawing to a close in a
>> couple of weeks. I am actively trying to find a new position within
>>Adobe.
>> I hope to continue to participate in the Royale project, but that may be
>> determined by my next employer/manager.
>>
>> In the meantime, I decided to look back through all my notes and ideas
>>and
>> I created a "thesis" project to express what I've learned and to leave
>>my
>> ideas out there for others to use.
>>
>> I've created what I call "Apache Royale Foundation" - an alternative to
>> the Basic project in Royale. I have this stored in a public
>>repository[1],
>> separate from royale-asjs. The Foundation project (in
>>frameworks/projects)
>> would be a sibling to Basic, but I needed to make a few changes to the
>>Core
>> project and I did not want take the chance of messing up the royale-asjs
>> repository, even with a separate branch. I just felt it was safer to
>>make a
>> new public repo using my Apache Github account.
>>
>> The royale-foundation repo is a downsized version of royale-asjs. I took
>> only a handful of projects from frameworks (e.g., Core, Network) that I
>> thought I could make use of either directly in Foundation or in
>>examples. I
>> set up the commits to first put in the downsized code, then changes to
>> Core, then the main Foundation classes. This way you can see what
>>changes
>> were made to Core (mainly to IUIBase and a just a few others).
>>
>> For a more detailed explanation of Foundation, I wrote a Wiki page[2] to
>> go with the code. I really wanted to see what writing an
>> almost-from-scratch framework involved. I decided to ignore the Flash
>> Player and concentrate exclusively on HTML/JS. While royale-foundation
>>will
>> build something on the SWF side, it will either not run or produce just
>>a
>> blank window. This was a fun proje

Re: About Peter's Royale Foundation

2018-04-23 Thread Peter Ent
Thanks for this analysis, Carlos! I'll address just a couple of things:

First, can you not see the code because of some issue with Github (did I
forget to make it public) or is it just because you are too busy?

Secondly - view beads. I love the idea of separating them and I found it
frustrating that a component might have a SWF view bead but not a JS view
bead. And I originally wrote down in my notes that I would want everything
to have view beads. But as I started to compose this, and overrode
createElement() and made an input, then a button, then a span, it just
seemed like making a view bead for the sake of making it. Plus there are
issues of when to really know the right time to construct the parts. I
don't think view beads are unnecessary; I think the concept needs tighter
integration into the life cycle. Perhaps the strand loads the view bead
and instead of relying on events, does viewBead.createElement() and calls
on IBeadView API instead.

Panel was something traditional from Flex. I think it might just
old-fashioned now, but I also wanted to show how you could achieve the
look of a Panel without having to proxy the content area. And as for
left-items and right-items, I borrowed that concept from mobile apps that
have navigation bars.

Date controls - I think a polyfill is a good way to go. Just didn't look
into writing one yet.

SVG: I wrote the SVG components mainly as a way to lay the groundwork for
charts. But maybe the real way to do that is simply with the charts
producing the bars and wedges and what-not and draw them using SVG
specified in CSS. So many different possibilities!

Again, thanks for taking the time to look at this.

‹peter



On 4/23/18, 3:56 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi,
>
>I want to discuss some interesting things on Peter's Royale-foundation, or
>things that make me thing about it:
>
>1.- One important concept I think is important is that he wants is point
>1:
>
>
>
>   1. *Make a framework independent of Basic and Express but based on the
>   Core project work.*
>
>
>With Jewel I want to do the same, at the end people using Jewel should not
>need to have "Basic" dependency.
>That's why we talked about moving UIBase to Core, but I think we have more
>things on Basic that right now are needed and we should take a look to
>what
>things are.
>
>For example: Layouts. I'm creating my own CSS Layouts (still in the works
>since I want to use mainly flex box). But Maybe I should not bake Jewel
>Layouts in Jewel, but make it a separate library, and that should happen
>the same in Basic and have "BasicLayouts" library.
>
>
> 2.- For point 2 (focus on HTML/JS), I think is clear that right now is
>our
>main focus, even in Jewel for me, but I don't want to loose the
>possibility
>to create SWF, and I think that with time we can reach SWF and maybe other
>native platforms and that indepence of platform will be amazing.
>
>3.- Point 3 is important:
>
>
>   1. *Use MXML to create the DOM, use ActionScript to handle events, and
>   use CSS to make it look good and useful.*
>
>I'd like to see how this resolves (still could not look at the code), but
>I
>think that should apply to actual ASJS, even if we deal with SWF, that
>should be the way things work for flash as for html.
>
>4.- View Beads, I think this is important. In actual UI sets we have
>"createElement" method that makes us to create the view (or at least the
>main part of it). In Button we add the html button tag or in jewel slider,
>the input range, and so on... this seems to me wrong since we have the
>concept of View Beads. I think all of that should be delegated to the View
>Bead and make possible for others to change the bead for another if they
>want/need. For example in themes, I was able to exchange view beads
>successfully and even in flex times I always designed the "visuals" in
>separate SWC that has the flex skins, code and css while in normal app
>libraries we had controllers, models, and app business logic.
>
>So could be enforce to instead of use "createElement" use a ViewBead? I
>think maybe at least in Jewel, since is an UI set very focused on visuals,
>and maybe Basic should not?...
>
>5.- for CSS and className point, need to see the code to see how much it
>shares with the actual way to handle that in Jewel.
>
>6.- In List the concept of having each data to be represented with
>different item renderers seems useful, I found that need some years ago in
>a couple of scenarios, if we don't support it in current List, we should
>
>7.- Panel. this flex component never was very needed for me, and I think
>is
>mainly to the way it enforce the layout in flex and the visuals. I'll be
>looking at it when I reach that in Jewel. I was thinking in using
>something
>more like an MDL Card, that seems to be what people needs nowadays and can
>replace the panel.
>
>Like the concept of interact with content. I think is the way to go. Panel
>is only a shell or chrome to layout and present 

Royale Foundation and More

2018-04-22 Thread Peter Ent
Hi,

As many of you know, over five years ago Adobe Systems donated Flex to the 
Apache Foundation. My time on this mission is drawing to a close in a couple of 
weeks. I am actively trying to find a new position within Adobe. I hope to 
continue to participate in the Royale project, but that may be determined by my 
next employer/manager.

In the meantime, I decided to look back through all my notes and ideas and I 
created a "thesis" project to express what I've learned and to leave my ideas 
out there for others to use.

I've created what I call "Apache Royale Foundation" - an alternative to the 
Basic project in Royale. I have this stored in a public repository[1], separate 
from royale-asjs. The Foundation project (in frameworks/projects) would be a 
sibling to Basic, but I needed to make a few changes to the Core project and I 
did not want take the chance of messing up the royale-asjs repository, even 
with a separate branch. I just felt it was safer to make a new public repo 
using my Apache Github account.

The royale-foundation repo is a downsized version of royale-asjs. I took only a 
handful of projects from frameworks (e.g., Core, Network) that I thought I 
could make use of either directly in Foundation or in examples. I set up the 
commits to first put in the downsized code, then changes to Core, then the main 
Foundation classes. This way you can see what changes were made to Core (mainly 
to IUIBase and a just a few others).

For a more detailed explanation of Foundation, I wrote a Wiki page[2] to go 
with the code. I really wanted to see what writing an almost-from-scratch 
framework involved. I decided to ignore the Flash Player and concentrate 
exclusively on HTML/JS. While royale-foundation will build something on the SWF 
side, it will either not run or produce just a blank window. This was a fun 
project to fill the time and improve my JavaScript and CSS skills while looking 
for my next challenge.

I could not have done this without the Core project and the work of everyone 
who has contributed to Royale. There are a lot of background pieces that go 
into make a framework viable and I made use of them as much as possible.

I suggest starting with the Wiki[2] before looking at the code[1]. Once you do 
get the code, you should be able to build it using ANT (I did not modify the 
maven pom files yet) and then build the examples.

[1] Apache Royale Foundation Repo:
https://github.com/pentapache/royale-foundation

[2] Apache Royale Foundation Wiki (in the Repo):
https://github.com/pentapache/royale-foundation/wiki

Regards,
Peter Ent



Re: ItemRenderer is not PAYG

2018-04-18 Thread Peter Ent
In my spare time I've been playing around with components that just build
HTML without SWF and it does make it easier. I saw the range input and
that's a great way IMO to handle the browser side.

—peter

On 4/16/18, 12:38 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi Peter,
>
>that's mainly the problem. As Alex said in some moment, I'll be happy if
>we
>approach the SWF in two phase,
>one that at least show minimal bounding boxes, interaction and events
>working ok. Then go the "skinning" phase.
>
>We should have to look at some particularities. For example Slider in
>Jewel
>is done like in MDL with an input range,
>that makes lots for you, but in Flash there's no such control, so the
>current basic implementation is ok (two buttons, one
>for track and one for thumb), but again our ISliderView interface is not
>right anymore since in JS we don't need "track"
>and "thumb" since input range does not has that parts, although in CSS
>there's something similar
>
>Thanks, for looking the virtual list bug! :)
>
>
>
>2018-04-16 17:40 GMT+02:00 Peter Ent :
>
>> Sure, I'll be happy to look at the bug.
>>
>> I was asking about SWF because I was toying with the idea of a SWF-free
>> framework and how much time is spent to get the SWF side working when
>>the
>> browser just does so much for you. Not everything of course, but
>>sometimes
>> simple things for the browser is a good chunk of work for SWF.
>>
>> —peter
>>
>> On 4/16/18, 11:36 AM, "carlos.rov...@gmail.com on behalf of Carlos
>>Rovira"
>>  wrote:
>>
>> >Hi Peter,
>> >
>> >thanks! I really didn't look too much at SWF. I really would like to do
>> >but
>> >it's a huge amount of work to deal with HTML only.
>> >But I don't want to left SWF version undone, and I try to think on it
>>in
>> >order to give a revision at some time and see what's failing and what
>>not.
>> >Another thing in the same boat are for example transitions and effects
>>(at
>> >least CSS for JS). I think we need all components working and good
>> >looking,
>> >then we can start looking to see more things in terms of effects and
>> >transitions. At least this is my plan so I can deal with all of it.
>> >
>> >Peter, one thing I need from you is if you can take a look at this bug
>> >[1],
>> >I'm now dealing with lists, and virtual list are very important.
>> >
>> >thanks!
>> >
>> >[1] Virtual List handles final items incorrectly
>> ><https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fgithub.c
>> 
>>>om%2Fapache%2Froyale-asjs%2Fissues%2F177&data=02%7C01%7Cpent%40adobe.com
>> %7
>> >C67df4df73179488905ab08d5a3afd574%7Cfa7b1b5a7b34438794aed2c178de
>> cee1%7C0%7
>> >C0%7C636594897951239437&sdata=vEgd35Vs%2B6DW%
>> 2BtWsYk0U9cQOCmJwGuYGnRvgPcqJ
>> >frY%3D&reserved=0>
>> >
>> ><https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fgithub.c
>> 
>>>om%2Fapache%2Froyale-asjs%2Fissues%2F177&data=02%7C01%7Cpent%40adobe.com
>> %7
>> >C67df4df73179488905ab08d5a3afd574%7Cfa7b1b5a7b34438794aed2c178de
>> cee1%7C0%7
>> >C0%7C636594897951239437&sdata=vEgd35Vs%2B6DW%
>> 2BtWsYk0U9cQOCmJwGuYGnRvgPcqJ
>> >frY%3D&reserved=0>
>> >
>> >
>> >
>> >2018-04-16 15:52 GMT+02:00 Peter Ent :
>> >
>> >> There's been a huge amount of email surrounding Jewel - which is
>> >>terrific.
>> >> I haven't been able to digest all of it, but one question I have is,
>>how
>> >> much did you need to write to support SWF vs HTML/JS? Is that is in
>>the
>> >> framework (eg, Core, Basic) sufficient to support Jewel?
>> >>
>> >> ‹peter
>> >>
>> >> On 4/16/18, 4:15 AM, "carlos.rov...@gmail.com on behalf of Carlos
>> >>Rovira"
>> >>  wrote:
>> >>
>> >> >Hi,
>> >> >
>> >> >maybe the decision was as well to support SWF? didn't look still to
>>how
>> >> >SWF
>> >> >does its duty but
>> >> >as JS has already ":hover", JS side doesn't need to deal with that
>> >>since
>> >> >CSS make that directly for you.
>> >> >
>> >> >Anyway.I&#

Re: ItemRenderer is not PAYG

2018-04-16 Thread Peter Ent
Sure, I'll be happy to look at the bug.

I was asking about SWF because I was toying with the idea of a SWF-free
framework and how much time is spent to get the SWF side working when the
browser just does so much for you. Not everything of course, but sometimes
simple things for the browser is a good chunk of work for SWF.

—peter

On 4/16/18, 11:36 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi Peter,
>
>thanks! I really didn't look too much at SWF. I really would like to do
>but
>it's a huge amount of work to deal with HTML only.
>But I don't want to left SWF version undone, and I try to think on it in
>order to give a revision at some time and see what's failing and what not.
>Another thing in the same boat are for example transitions and effects (at
>least CSS for JS). I think we need all components working and good
>looking,
>then we can start looking to see more things in terms of effects and
>transitions. At least this is my plan so I can deal with all of it.
>
>Peter, one thing I need from you is if you can take a look at this bug
>[1],
>I'm now dealing with lists, and virtual list are very important.
>
>thanks!
>
>[1] Virtual List handles final items incorrectly
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>om%2Fapache%2Froyale-asjs%2Fissues%2F177&data=02%7C01%7Cpent%40adobe.com%7
>C67df4df73179488905ab08d5a3afd574%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7
>C0%7C636594897951239437&sdata=vEgd35Vs%2B6DW%2BtWsYk0U9cQOCmJwGuYGnRvgPcqJ
>frY%3D&reserved=0>
>
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>om%2Fapache%2Froyale-asjs%2Fissues%2F177&data=02%7C01%7Cpent%40adobe.com%7
>C67df4df73179488905ab08d5a3afd574%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7
>C0%7C636594897951239437&sdata=vEgd35Vs%2B6DW%2BtWsYk0U9cQOCmJwGuYGnRvgPcqJ
>frY%3D&reserved=0>
>
>
>
>2018-04-16 15:52 GMT+02:00 Peter Ent :
>
>> There's been a huge amount of email surrounding Jewel - which is
>>terrific.
>> I haven't been able to digest all of it, but one question I have is, how
>> much did you need to write to support SWF vs HTML/JS? Is that is in the
>> framework (eg, Core, Basic) sufficient to support Jewel?
>>
>> ‹peter
>>
>> On 4/16/18, 4:15 AM, "carlos.rov...@gmail.com on behalf of Carlos
>>Rovira"
>>  wrote:
>>
>> >Hi,
>> >
>> >maybe the decision was as well to support SWF? didn't look still to how
>> >SWF
>> >does its duty but
>> >as JS has already ":hover", JS side doesn't need to deal with that
>>since
>> >CSS make that directly for you.
>> >
>> >Anyway.I'm in favor to move that part of the code off from
>> >UIItemRendererBase, so people could "plug-in" what they want
>> >
>> >About Layout I still need to look at how layouts are done in that part
>> >
>> >I could raise a "refactoring ticket" so we could look at it at some
>>point
>> >if it's ok for all
>> >
>> >thanks
>> >
>> >
>> >2018-04-16 4:16 GMT+02:00 Alex Harui :
>> >
>> >> I didn't do most of this code.  Although even if I did, it might be
>>time
>> >> for some refactoring.  Thinking about it briefly:
>> >>
>> >> Adding the ability to subclass in MXML is introduced at several
>>points
>> >>in
>> >> the SDK.  We should be choosing not to weigh down the lowest-level
>> >>classes
>> >> with MXML capability (at least for now).
>> >>
>> >> I think UIItemRendererBase doesn't need to have the MXML capability.
>> >>That
>> >> way, AS-based ItemRenderers will be a bit lighter and faster.
>> >> I think that the reason there are selectedColor, highlightColor, and
>> >> downColor properties is for backward compatibility with Flex item
>> >> renderers and maybe because there is no "down" or "selected"
>> >>pseudo-states
>> >> in CSS, but I agree those can be moved off of UIItemRendererBase to
>>some
>> >> other class. And the implementation of those color properties could
>>just
>> >> set styles or class selectors.
>> >>
>> >> I think assignable layout is not required in item renderers.  Simple
>> >>ones
>> >> can just set x,y,width,height.   So maybe MXMLItemRenderer should add
>> >>the
>> >> code that calls MXMLDataInterpreter a

Re: ItemRenderer is not PAYG

2018-04-16 Thread Peter Ent
There's been a huge amount of email surrounding Jewel - which is terrific.
I haven't been able to digest all of it, but one question I have is, how
much did you need to write to support SWF vs HTML/JS? Is that is in the
framework (eg, Core, Basic) sufficient to support Jewel?

‹peter

On 4/16/18, 4:15 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi,
>
>maybe the decision was as well to support SWF? didn't look still to how
>SWF
>does its duty but
>as JS has already ":hover", JS side doesn't need to deal with that since
>CSS make that directly for you.
>
>Anyway.I'm in favor to move that part of the code off from
>UIItemRendererBase, so people could "plug-in" what they want
>
>About Layout I still need to look at how layouts are done in that part
>
>I could raise a "refactoring ticket" so we could look at it at some point
>if it's ok for all
>
>thanks
>
>
>2018-04-16 4:16 GMT+02:00 Alex Harui :
>
>> I didn't do most of this code.  Although even if I did, it might be time
>> for some refactoring.  Thinking about it briefly:
>>
>> Adding the ability to subclass in MXML is introduced at several points
>>in
>> the SDK.  We should be choosing not to weigh down the lowest-level
>>classes
>> with MXML capability (at least for now).
>>
>> I think UIItemRendererBase doesn't need to have the MXML capability.
>>That
>> way, AS-based ItemRenderers will be a bit lighter and faster.
>> I think that the reason there are selectedColor, highlightColor, and
>> downColor properties is for backward compatibility with Flex item
>> renderers and maybe because there is no "down" or "selected"
>>pseudo-states
>> in CSS, but I agree those can be moved off of UIItemRendererBase to some
>> other class. And the implementation of those color properties could just
>> set styles or class selectors.
>>
>> I think assignable layout is not required in item renderers.  Simple
>>ones
>> can just set x,y,width,height.   So maybe MXMLItemRenderer should add
>>the
>> code that calls MXMLDataInterpreter and MXMLItemRendererWithLayout would
>> add the assignable layout support.
>>
>> Thoughts?
>> -Alex
>>
>> On 4/15/18, 9:36 AM, "Yishay Weiss"  wrote:
>>
>> >I think we need to accept that there are some assumptions made in base
>> >classes that will not apply to every case. This is the tension between
>> >PAYG and reusability which has been discussed before. As Alex suggested
>> >you can always create a different implementation for
>> >ISelectableItemRenderer (or IItemRenderer).
>> >
>> >
>> >
>> >What I find confusing is that MXMLItemRenderer does not explicitly
>> >implement IMXMLDocument, and that most of the mxml related code is
>> >actually in UIItemRendererBase. Alex, maybe you can explain what the
>> >reasoning was for that?
>> >
>> >
>> >
>> >
>> >From: carlos.rov...@gmail.com  on behalf of
>> >Carlos Rovira 
>> >Sent: Sunday, April 15, 2018 2:29:20 PM
>> >To: dev@royale.apache.org
>> >Subject: Re: ItemRenderer is not PAYG
>> >
>> >Hi,
>> >
>> >the hierarchy chain is "UIItemRendererBase > DataItemRenderer >
>> >MXMLItemRenderer"
>> >
>> >ListItemRenderer extend from MXMLItemRenderer (if that's not the right
>> >class let me know), since users will want to create mainly MXML item
>> >renderers.
>> >
>> >So UIItemRendererBase is buried in the chain and I don't see a way to
>>get
>> >rid of it unless I create the same chain.
>> >
>> >Being said that, this is not critical for me, I can live with those
>> >properties buried in the code, but I want to put this here to signal a
>> >point when I see PAYG is not begin followed.
>> >
>> >For me people that wants to use colors in code should "aggregate it"
>>in a
>> >PAYG way, and people that wants css should do the same on its way.
>> >In other words, people using Jewel will have code in their apps that
>>will
>> >be never used, and I think that's what we're trying to avoid
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >2018-04-15 8:54 GMT+02:00 Alex Harui :
>> >
>> >> There is no obligation to use UIItemRendererBase for Jewel
>> >>ItemRenderers.
>> >> If you run into places where we assume UIItemRendererBase and not
>> >> IItemRenderer, that's either a bug or requires a different
>>controller or
>> >> view.
>> >>
>> >> Let us know what you run into.
>> >>
>> >> -Alex
>> >>
>> >> On 4/14/18, 8:33 AM, "carlos.rov...@gmail.com on behalf of Carlos
>> >>Rovira"
>> >>  wrote:
>> >>
>> >> >Hi,
>> >> >
>> >> >this base class
>> >> >
>> >> >UIItemRendererBase
>> >> >
>> >> >has properties for all colors (hover, selected, and more) and a
>> >>"useColor"
>> >> >property, and updateRenderer() method is switching "useColor"
>> >> >
>> >> >as a low level class, I think this class should not have all this
>>info,
>> >> >since most people will never use.
>> >> >
>> >> >In Basic I think is possible, but in Jewel colors, shapes and
>>effects
>> >> >comer
>> >> >from CSS.
>> >> >
>> >> >In this case I think 95% of users will never go that way of setting
>> >>colors
>> >> 

Re: Layouts and its properties to be set via CSS

2018-03-30 Thread Peter Ent
Gap manages the space between elements while margin will apply to the
space around every element. So margin:10px will add a 10 pixel space to
the left of the first element and after it, but also before and after the
second element, giving you a gap of 20 between the elements and an edge of
10. Maybe you don't want that - maybe you want 10 between as well.

What you could do is have a .firstElement style with margin-left:10 but no
margin-right. A .lastElement with a margin-right of 10 but no margin left.
Then a .middleElement with both left- and right-margin set. Apply these
CSS style classes to the proper elements and you'll get the right look.

Maybe some of the layouts should apply class selectors instead of just
setting style properties.

‹peter

On 3/30/18, 1:25 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi Alex,
>
>this last is not about the gap. In this thread I covered various things
>and
>maybe I should make one thread each, but I though it could be many threads
>as well:
>
>1.- Problem to set properties through CSS for beads (layouts or even
>views). I think this can be covered with Peter's emails using
>ValuesManager. I should try it as
>
>2.- Problem that is maybe the most important. How to make a concrete
>component have different beads depending on where its used. (i.e:
>TitleBar,
>TitleBar in Panel and TitleBar in Alert). We need to have some kind of
>"cascade styles" for "fake" beads css declarations. Since a normal use can
>have a very different configuration than a use as a part of another
>component.
>
>3.- In my last email a mention a way to deal with 2), but as part of code.
>It's not ideal since you could need to write a class only to change a
>bead.
>My question there's if I must remove the previous bead in some way to
>avoid
>leaks.
>
>regarding your comment about gap and margins (referred to 1)), in fact in
>horizontal layout with gap and padding Peter uses margins to manage the
>gap, so in the end we are using that, but we should decide if we can use
>ValuesManager to capture whatever non standard property to proxy it
>through
>a bead. I think that would be great.
>
>So both problems are covered here and are valid for all kinds of beads
>(layout, view,...)
>
>thanks
>
>
>
>
>2018-03-30 18:57 GMT+02:00 Alex Harui :
>
>> Carlos, are you looking for a general solution or is this specifically
>> about gap?
>>
>> Gap is not a CSS style.  Flex introduced it.  I believe the CSS
>>equivalent
>> is to set margins on all children of a container.  Why not just use
>> margins?
>>
>> Thoughts?
>> -Alex
>>
>> On 3/30/18, 9:51 AM, "carlos.rov...@gmail.com on behalf of Carlos
>>Rovira"
>>  wrote:
>>
>> >If I use a ViewBead to solve this, and make this:
>> >
>> >titleBar = new TitleBar();
>> >titleBar.addBead(new HorizontalLayoutSpaceBetween());
>> >
>> >although this works ok, maybe it's not the best since there's another
>> >ILayoutBead left with no use.
>> >Should I make a removeBead of the one already was assigned by CSS?
>> >If yes, how I can remove it? (some sample code will be appreciate)
>> >
>> >thanks
>> >
>> >
>> >2018-03-30 14:57 GMT+02:00 Carlos Rovira :
>> >
>> >> Hi Piotr,
>> >>
>> >> is not the real class ;), just want to write a quick example, change
>> >>that
>> >> for a real layout class (whatever)
>> >>
>> >> 2018-03-30 13:36 GMT+02:00 Piotr Zarzycki
>>:
>> >>
>> >>> Hi Carlos,
>> >>>
>> >>> But " verticallayout" - This is AS class ?
>> >>>
>> >>>
>> >>>
>> >>> 2018-03-30 13:19 GMT+02:00 Carlos Rovira :
>> >>>
>> >>> > Another problem I found with layouts usability:
>> >>> >
>> >>> > If I have a component that uses by default an horizontal layout:
>> >>> >
>> >>> > ControlBar
>> >>> > {
>> >>> >  IBeadLayout: Classreference ("horizontallayout");
>> >>> > }
>> >>> >
>> >>> > But this component is used in other component that wants to use
>> >>>another
>> >>> > layout (i.e vertical)
>> >>> >
>> >>> > I tried this:
>> >>> >
>> >>> > .alert j|ControlBar
>> >>> > {
>> >>> >  IBeadLayout: Classreference ("verticallayout");
>> >>> > }
>> >>> >
>> >>> > and this:
>> >>> >
>> >>> > j|Alert j|ControlBar
>> >>> > {
>> >>> >  IBeadLayout: Classreference ("verticallayout");
>> >>> > }
>> >>> >
>> >>> > but both options are not valid
>> >>> >
>> >>> > Some other way to do this? or this is not possible?
>> >>> >
>> >>> >
>> >>> > 2018-03-30 12:42 GMT+02:00 Carlos Rovira
>>:
>> >>> >
>> >>> > > Hi
>> >>> > >
>> >>> > > I'm finding a usability problem with layouts. Since Layouts use
>>to
>> >>>be
>> >>> > > configured via CSS (IBeadLayout), this works ok for basic
>>layouts
>> >>> without
>> >>> > > properties, but if you have for example a "gap" property like in
>> >>> > > HorizontalLayoutWithPaddingAndGap, this layout is not usable vía
>> >>>CSS
>> >>> > > since you can't set the "gap" attribute.
>> >>> > >
>> >>> > > So how can we overcome this issue?
>> >>> > >
>> >>> > > Maybe If we could write:
>> >>> > >
>> >>> > > SomeComponent
>> >>> >

Re: Layouts and its properties to be set via CSS

2018-03-30 Thread Peter Ent
"IBeadLayout" and friends are not real CSS style properties which means we
can have our own properties. The HorizontalLayoutWithPaddingAndGap should
try to use ValuesManager and get its gap and padding values from the
style(s) associated with the strand component.

SomeComponent {
IBeadLayout: 
ClassReference("org.apache.royale.html.beads.layouts.HorizontalLayoutWithGa
pAndPadding");
gap: 10px;
padding: 8px;
}

That should work assuming the layout looks for those if its properties are
not set.
‹peter

On 3/30/18, 6:42 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi
>
>I'm finding a usability problem with layouts. Since Layouts use to be
>configured via CSS (IBeadLayout), this works ok for basic layouts without
>properties, but if you have for example a "gap" property like in
>HorizontalLayoutWithPaddingAndGap, this layout is not usable vía CSS since
>you can't set the "gap" attribute.
>
>So how can we overcome this issue?
>
>Maybe If we could write:
>
>SomeComponent
>{
> IBeadLayout: Classreference
>("some.layout.with.properties.that.need.to.be.set");
> gap: 10px;
>}
>
>And gap will be read by the layout...
>
>if not any layout with properties will be limited to use via MXML
>
>Maybe I missing some other way to do this?
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%7C947a4da3ad454e41b5a308d596
>2b0765%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636580033926916536&sda
>ta=%2F6sMPKv420V%2BMUL1M7eiFVFN8YdOwdbugU%2B5PJDwde4%3D&reserved=0



Re: typeNames in View

2018-03-28 Thread Peter Ent
The differences exist mainly because of the Player and its lack of native
support for scrolling. I created these classes as a building block and I
tried to keep it as PAYG as possible.

If you do not really want to use the Player, then just use Group. When you
need scrolling, add to that specific Group's style, "overflow:auto" (or
some derivation). 

The Container and View classes are as Alex describes. There is also
DataContainer, the basis for the lists.

Just to clear things up, these classes are really a Base + MXML support.
For instance there is GroupBase and Group. Group, Container, DataContainer
have the stuff in them to make MXML work whereas their Base classes
contain the common stuff.

I'm also not happy with the names, but that's what I came up with. We
might want to do a massive refactor before official release 1.0

‹peter 

On 3/27/18, 4:16 PM, "Alex Harui"  wrote:

>-Group is like Flex Group.  The lightest weight container.
>-Container is heavier and supports custom chrome like a TitleBar,
>StatusBar, etc.  And thus an internal content pane and abstractions for
>how children get added and removed.
>-View is for top-level containers.  Currently as the tag for Basic
>Application's initialView and potentially for Mobile apps in some
>ViewNavigator.
>
>I'm not completely happy with the names of these things.
>
>HTH,
>-Alex
>
>On 3/27/18, 11:06 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
> wrote:
>
>>Ok, I was reading old FlexJS email from Peter about Group, Container..
>>but
>>don't talk about View.
>>
>>What's the main difference between Group, Conatiner and View? normaly I
>>use
>>Group, but maybe I should use View...
>>Container seems the same as Group...
>>
>>2018-03-27 18:31 GMT+02:00 Alex Harui :
>>
>>>
>>>
>>> On 3/27/18, 2:56 AM, "carlos.rov...@gmail.com on behalf of Carlos
>>>Rovira"
>>>  wrote:
>>>
>>> >Hi,
>>> >
>>> >just wondering why "View" has typenames="royale"
>>> >while Application is "Application or Group is "Group"
>>> >Why View is not "View"?
>>>
>>> Because it is meant to act as the top of the DOM and it seemed more
>>> obvious to tell folks to update the "royale" class to get universal
>>>style
>>> changes.  View might get re-used in other context and may not always be
>>> top-level.  Flex Mobile apps had ViewNavigators and stuff like that. If
>>> other folks want to change it, that's fine with me.
>>>
>>> -Alex
>>>
>>>
>>
>>
>>-- 
>>Carlos Rovira
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%
>>2
>>Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C41d1a9e8821744cc133408d
>>5
>>940d7f1b%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636577708129102766&
>>s
>>data=52oFkHbaD1oAPeCDBRpDQXdou7N5V8DHBEcQgF60kno%3D&reserved=0
>



Re: Layout optimizations

2018-03-27 Thread Peter Ent
Here's an idea:

Let's say MXML and the Royale Framework in general, generated a simple DOM
based on the component types. In other words, an MXML file translates into
the DOM structure: div, span, button, input, etc.

Royale also provides the event glue so that you can connect events sent
from components to handlers.

Further, attributes on MXML elements are either data properties (eg,
minimum="15") or styles (eg, width="40%"). The styles are present for
convenience only and are translated into style="width:50%" on the HTML
elements. Or perhaps better, Royale application writers who want to
include in-line styles use js:Style tags that build up the HTML style
attribute.

There are no layouts. Instead, you have specialized containers:
VerticalContainer, HorizontalContainer, AbsoluteContainer, and so forth.
These containers know how to augment their children to achieve the look
they want. For example, VerticalContainer loops through the children and
adds to their className, "verticalContainerChild" style. The code does not
actually assign display:block nor query size nor set position or anything
like that. The container could even append "top", "middle", and "bottom"
styles to further refine how the application could look. Royale comes with
a set of pre-defined styles to make these containers work.

To address Harbs concerns about performance, the Royale framework makes
minimal DOM structures, adding in-line styles where the user really wants
to do that. In addition, for those times where performance is key, Harbs
mentioned that position:absolute can be used to programmatically place the
children. In this case, a container like AbsoluteVerticalContainer would
do just that.

This way we get to have clean HTML DOM (shadowed, as Harbs says, with our
own internal structure and .royale-wrapper links (per element), We leave
layout to CSS (eg, VerticalContainer + verticalContainerChild) or
JavaScript via absolute positioning containers.

Now one more refinement: just have Container and move the layout
algorithms in those specialized Containers into beads. If we do this, then
I think what I've described is pretty much what Royale is today.

I feel that some of what is in the layout code is an artifact of making
the code work on the Flash Player. And if not directly via shared
ActionScript code, then in philosophy. When writing a layout, its easy to
get your head in the space of writing for the Player and then you look at
all the code and try to envision it working in the browser. In reality,
sometimes the browser code should either be nothing or just assignment of
styles. 

Royale should allow person A to make as much use of the browser/CSS as
they want while still allowing person B to have as much programmatic
control of element position and size as they want. I think beads allow for
this and if not, we should work on making that possible.

My two cents
‹peter

On 3/27/18, 5:24 AM, "Harbs"  wrote:

>Interesting to further note:
>
>The first time the content is fit, the parent object gets its size
>hard-coded. That knocks subsequent down to about a third of the time.
>
>> On Mar 27, 2018, at 1:22 AM, Harbs  wrote:
>> 
>> Case in point:
>> 
>> In my app, I¹m using OneFlexibleChildHorizontalLayout which uses
>>flexbox. Great. No need for writing values. Right?
>> 
>> Not so fast.
>> 
>> I have fit to view functionality in my app which needs to get the size
>>of the flexibleChild which is the container to figure out how much to
>>scale the content. The entire fit function takes 36 ms to run. The
>>height getter on the flexibleChild *alone* takes 14 ms. If the size of
>>the flexibleChild was hard-coded, the getter would not take measurable
>>time.
>> 
>> I have tons of hard coded size and positioning of SVG in my app
>>(literally hundreds of DOM objects) and it runs ridiculously fast
>>compared to all the Recalculate Styles which are caused by default
>>browser layout.
>> 
>> I¹d really love to get some hard numbers from comparing the approaches.
>> 
>> Harbs
>> 
>>> On Mar 26, 2018, at 11:28 PM, Harbs >>> wrote:
>>> 
>>> With hard-coded values DOM interaction could be kept to a minimum. It
>>>would be an interesting experiment to see what would happen if we
>>>*don¹t* rely on browser layout and hard code everything.
>> 
>



Re: TitleBarView

2018-03-27 Thread Peter Ent
I think Alex wrote TitleBarView as an MXML file to show that it could be
done; more as an example perhaps.
‹peter

On 3/27/18, 6:41 AM, "Harbs"  wrote:

>TitleBarview is an MXML file instead of an .as file. Is there a reason
>for that?
>
>I¹m pretty sure that mxml has added overhead, and I don¹t see why a
>framework view should be written in mxmlŠ
>
>Harbs



Re: [Jewel] Work In progress screenshots

2018-03-26 Thread Peter Ent
That looks really nice. Great job!
‹peter

On 3/25/18, 6:38 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi!
>
>I was working hard this days and I think is time to share a screen shot
>about Jewel actual state.
>
>I've plan to support 12 colors. The following is the color wheel
>
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsnag.gy%2
>Fu8Rrzv.jpg&data=02%7C01%7Cpent%40adobe.com%7C6ae916393d8c466ccc3e08d592a1
>4685%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576143734649304&sdata
>=3QNqvLRB70tIJHzZELAOclBvrr0jaHrR%2B8Qkrz3byXA%3D&reserved=0
>
>The names of normal colors are as expected: red, blue, green,
>But for intermediate colors, instead a composed name like yellow-green, I
>prefer "gems" colors like (in that case) "Emerald". Others are Amethyst,
>Topaz or Sapphire. All this continues the "Jewel" concept of the jewels or
>gems embedded in the royal crown ;)
>
>A side from this colors that will be the contrast color (primary,
>secondary, emphasized)
>
>We will have a normal-light theme:
>
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsnag.gy%2
>Fx3Pnmu.jpg&data=02%7C01%7Cpent%40adobe.com%7C6ae916393d8c466ccc3e08d592a1
>4685%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576143734649304&sdata
>=ZAnKviux5zVEZubllV2mRaZyJtfj4C%2Bf%2FjnulgV53u4%3D&reserved=0 (remember
>that's still unfinished)
>
>but you can have it flat :
>
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsnag.gy%2
>F1WQ48U.jpg&data=02%7C01%7Cpent%40adobe.com%7C6ae916393d8c466ccc3e08d592a1
>4685%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576143734649304&sdata
>=NYjd32Urv7heJwoNzV8iK45VoSQSY7JLweYz1JWEhgE%3D&reserved=0. (same here...)
>
>or instead of light, it can be dark
>
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsnag.gy%2
>FEPSlZ1.jpg&data=02%7C01%7Cpent%40adobe.com%7C6ae916393d8c466ccc3e08d592a1
>4685%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576143734649304&sdata
>=6HU4xMs%2BdaozNV3D7JzoeS87xkwNOHLeUV7rHXFQcDk%3D&reserved=0. (still
>needs more work in the dark colors)
>
>and flat-dark
>
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsnag.gy%2
>FhBjzrS.jpg&data=02%7C01%7Cpent%40adobe.com%7C6ae916393d8c466ccc3e08d592a1
>4685%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576143734649304&sdata
>=zjwaZwB3FfF2CLyni2p5UXFFlLOo01gEldYKseeVBYs%3D&reserved=0 (this is maybe
>what needs more work of all)
>
>All this combined with the 12 wheel colors ;)
>
>Structure: I'm creating all of this with SASS vars in only one theme, what
>makes it extremely convenient to work, since with only one color, I can
>program the rest using color functions in SASS
>
>For example:
>
>border: 1px solid darken($button-color, 15%)
>background: linear-gradient(lighten($button-color, 5%), darken(
>$button-color, 5%))
>box-shadow: inset 0 1px 0 lighten($button-color, 20%)
>
>for flat/normal or light/dark is the same, I only need to switch two vars:
>
>$flat: false
>$dark: false
>
>and compile the new final CSS
>
>For final use:
>
>With all this more settled, I'll try to separate primary and secondary
>rules from the rest, so you can apply
>
>* JewelLightFlatTheme + JewelPrimaryEmeralTheme + JewelSecondaryBlueTheme
>=
>to get a final look
>
>So combinations can be great here to have different flavors and people can
>choose what's better for their branding
>
>* The actual JewelTheme will be the "framework" to get the final generated
>CSSs (with this plan SASS will generate 3 separate CSS files)
>* We can provide some combinations, but it's up to the developer create
>the
>combinations we don't provide. I think it's reasonable.
>
>There's much more here, but I think it's ok for a first email about this.
>My main problems are with CSS compilation problems, but with Alex's help I
>expect to get over this soon, since each time I see less problems with CSS
>:)
>
>You can compile and test JewelExample to see this in action. There's so
>much work in lots of states for this initial set of components (normal,
>hover, active, disabled, ...). As you go from left to right, we have less
>things done. As I finish with this initial set (Button, TextButton,
>TextField, CheckBox, RadioButton, Slider), I'll go for more components.
>
>Let me know what do you think about all this :)
>
>Thanks!
>
>Carlos
>
>
>
>
>
>
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%7C6ae916393d8c466ccc3e08d592
>a14685%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576143734649304&sda
>ta=BzjmrIJd%2Fi1GSRT3n9BOgGzbxG%2BAkwWg7pSM0hHFyiQ%3D&reserved=0



Re: Layout optimizations

2018-03-23 Thread Peter Ent
The code looks familiar, but I'm not 100% sure.

The trick with layouts is that there are the following things to consider:

If everything has an explicit width/height, it should be pretty easy.

The percentWidth/height when present changes the _width, _height without
changing the explicit size. This allows a layout to work again on the
percent value and calculate a new size. If the explicit sizes are set,
then the next layout pass will take the explicit over the percent (setting
explicit sizes sets the percent sizes to NaN and vice-versa) and what was
once 50% will now be fixed in size.

The tricky part - for me anyway - is when an item has no size set. Then
its supposed be sized by its content. Labels and Buttons sized by their
text or icons while containers are sized by their children and so forth.

Let's say you have one container nested inside of another and in the inner
most container is a single button. The outer most layout cannot determine
its container-child's size because it doesn't have one yet. The inner
container needs to get the size of its children (the button) and that then
becomes its size. But it should not be setting the explicit sizes. That
allows the button to be resized which means its container becomes bigger
which means the outer container becomes bigger. Once you set those
explicit sizes, then its game over - use case #1 essentially.

So - I think that code has to do with determining size-by-content and so
isLayoutRunning was created to prevent a recursion.

For me, working with Flex and Royale - determining the size of something
has been one of the biggest challenges.

‹peter

On 3/23/18, 7:46 AM, "Harbs"  wrote:

>I¹m working on making layouts more efficient. Currently, there¹s lots of
>setting and reading of width and height which causes many browser
>reflows. While profiling performance in my app, reflows is a major
>bottleneck. In one area, it¹s taking about 150ms (on my I7 2.8 Ghz
>MacBook Pro ‹ on tablets it¹s painfully slow) to execute on area of
>layout. Almost all of that time is being spent measuring with and height
>of components. The width and height getters trigger reflow because
>properties are recursively set in layout.
>
>I was able to get about a 10% improvement by optimizing the width and
>height getters to return the explicitWdith and explicitHeight if set. It
>looks to me like almost all of this bottleneck could be eliminated by
>delaying the property setting until after the measurements are done. I¹m
>working on doing that, but I have a question:
>
>LayoutBase.performLayout has the following code:
>
>   // check sizes to see if layout changed 
> the size or not
>   // and send an event to re-layout 
> parent of host
>   if (host.width != oldWidth ||
>   host.height != oldHeight)
>   {
>   isLayoutRunning = true;
>   host.dispatchEvent(new 
> Event("sizeChanged"));
>   isLayoutRunning = false;
>   }
>
>Under what circumstances does this code get executed? This appears to be
>causing a recursive layout. Can I assume that there will be an
>explicitWidth/height when this will be executed?



Re: Label

2018-03-15 Thread Peter Ent
The problem with using HTML as a platform for interactive UI controls that
can positioned in a variety of ways is that HTML wasn't designed to do
this, which we all know. I've begun to think of DIV more like a base UI
element that just happens to also have another abilities. I think other
HTML-based frameworks do the same thing once you see the limitations of
the primitive elements.

That's why we have element and positioner.

—peter

On 3/15/18, 8:59 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Maybe in Basic have sense to be span, but in Express, Jewel can be other
>thing. A div seems more like a "container" to me, but we're using divs to
>handle textfields, so maybe it would be ok with labels.
>Did you try some custom css to solve the problem just with span?
>
>2018-03-15 13:34 GMT+01:00 Harbs :
>
>> Gotcha. FWIW, we now have the HTML element component set which more
>>thinly
>> wraps HTML elements.
>>
>> I can’t think of any reason why Label would be better as a span than a
>> div. It seems to me that simply using div instead of span would make
>>Label
>> more versatile. Am I missing something?
>>
>> > On Mar 15, 2018, at 2:30 PM, Peter Ent  wrote:
>> >
>> > Label was one of the very first components and the idea was
>>minimalism.
>> > Button was  and TextInput was  and Label
>>was
>> > .
>> >
>> > I'm wondering if we should have NativeButton, NativeLabel, etc. which
>> > would be these minimal elements and have others that are 
>>wrapping.
>> > For instance, ImageAndTextButton is a Label
>> > Here which works but the alignment is weird so maybe
>> > ImageAndTextButton should be a Text which can be
>>aligned
>> > and styled better.
>> >
>> > Anyway, that's the reason: simplicity.
>> >
>> > ‹peter
>> >
>> > On 3/15/18, 7:51 AM, "Harbs"  wrote:
>> >
>> >> Is there a reason that the element type of Basic Label is span?
>> >>
>> >> I tried adding a łTextOverflow˛ bead to a Label and it does not seem
>>to
>> >> work because spans donąt really have a working width. Switching the
>> >> element type to div seems to make it work.
>> >>
>> >> Harbs
>> >
>>
>>
>
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%7Cd14c10394efb4caf88b608d58a
>74963a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636567155696967043&sda
>ta=cm3Z%2B%2BZBHdt9uEGRmkixGZlhupZYc%2FHW4SILUiDdkBg%3D&reserved=0



Re: Label

2018-03-15 Thread Peter Ent
Label was one of the very first components and the idea was minimalism.
Button was  and TextInput was  and Label was
. 

I'm wondering if we should have NativeButton, NativeLabel, etc. which
would be these minimal elements and have others that are  wrapping.
For instance, ImageAndTextButton is a Label
Here which works but the alignment is weird so maybe
ImageAndTextButton should be a Text which can be aligned
and styled better.

Anyway, that's the reason: simplicity.

‹peter

On 3/15/18, 7:51 AM, "Harbs"  wrote:

>Is there a reason that the element type of Basic Label is span?
>
>I tried adding a ³TextOverflow² bead to a Label and it does not seem to
>work because spans don¹t really have a working width. Switching the
>element type to div seems to make it work.
>
>Harbs



Re: Flex Emulation SWCs

2018-03-01 Thread Peter Ent
My plan is to work through each major component and fill in gaps. For
example, with mx.controls.Button, we can emulate that with TextButton as
the base and add in the few missing pieces (eg, useHandCursor).

We should also create and use tests so that there's a uniform approach to
building these out. I think a lot of current Flex projects can benefit
from the work. Just need to get started. I'm still trying to figure out
how to get the tests we have to run without errors!

‹peter

On 2/28/18, 1:27 PM, "Alex Harui"  wrote:

>
>
>On 2/28/18, 9:53 AM, "Piotr Zarzycki"  wrote:
>
>>Alex,
>>
>>I saw your response to Alina about writing emulation and contributing.
>>However how does actually she meet with her deadlines ? To me it sounds
>>like a lot of work, even if you and Peter help. How does emulations speed
>>up the work ?
>>
>>Does rewriting one by one views won't be simply faster.
>
>I'm not sure which would be faster.  If it was simple text replacement,
>then just running sed would be faster, but I'm thinking it won't be simple
>text replacement.  There might be a "label" property on her MXML
>components that shouldn't be changed to "text".  And other MXML tags might
>be replaced by sets of MXML tags and if you don't wrap those up into
>components, then if you decide the replacement set was not right, you have
>to go and find all of the other instances which can be tricky.
>
>Having recently done the rename from FlexJS to Royale, we just recently
>found another problem in the text replacement.
>
>Also, if we come out with a set of emulations, it should make migration
>easier for the next people who try to migrate.
>
>And finally, it allows us to help her migrate without us having to touch
>her 500 MXML files.
>
>If there's a better way, speak up now.
>
>My 2 cents,
>-Alex
>>
>>What do others think ?
>>
>>Thanks, Piotr
>>
>>
>>2018-02-27 20:52 GMT+01:00 Alex Harui :
>>
>>>
>>>
>>> On 2/27/18, 11:18 AM, "Harbs"  wrote:
>>>
>>> >Gotcha.
>>> >
>>> >I¹m not 100% convinced that it¹s going to ultimately be easier like
>>>this,
>>> >but it might be interesting to have a migration set and see how useful
>>>it
>>> >actually is.
>>>
>>> Yeah, I can't guarantee it will be better, but having recently survived
>>>a
>>> huge search and replace to rename FlexJS to Royale, which included a
>>> mistake only found a few days ago, this seems worth a try.
>>>
>>> Later,
>>> -Alex
>>> >
>>> >> On Feb 27, 2018, at 9:13 PM, Alex Harui 
>>> >>wrote:
>>> >>
>>> >> If we put trace statements in the API stubs, the user could get some
>>> >> output that tells what is missing.  Or scan the JS for some jsdoc
>>>key we
>>> >> leave in the code.  But if it compiles, the user will know also what
>>>is
>>> >> missing because the App will not look right or operate correctly.
>>> >>
>>> >> Harbs, back when you migrated your app, there was no
>>> >> spark.components.Button and we weren't sure we would ever build one,
>>> >>since
>>> >> a complete implementation requires over 100 methods and properties.
>>>I'm
>>> >> still not clear on exactly what steps you took to migrate, so, I am
>>> >> imagining that for every s:Button or "import
>>>spark.components.Button"
>>> >>you
>>> >> had to search and replace it with js:TextButton or "import
>>> >> org.apache.royale.html.TextButton".  So I'm guessing that you
>>>created a
>>> >> spark.components.Button class that was all stubs so the app would
>>> >>compile
>>> >> without having to convert every using of Spark Button, yet it would
>>>help
>>> >> you find the remaining places to convert.
>>> >>
>>> >> I am proposing that we actually add an operational
>>> >>spark.components.Button
>>> >> in a SWC that only implements the 12 out of the 100+ APIs that Alina
>>> >> needs.  Then there are fewer places to change in her code.  The
>>>final
>>> >> output will be bigger because we have this additional emulation
>>>code,
>>> >>but
>>> >> it should get it up and running.  So, the migration experience will
>>>be
>>> >> quite different for Alina.  You had to do a lot of search and
>>>replace
>>> >>with
>>> >> bundles of beads.  We are going to encapsulate that work under the
>>>API
>>> >> surface.  Maybe we don't need to have every migration user do that
>>>much
>>> >> searching and replacing.  Our goal is to try to encapsulate and
>>> >>eliminate
>>> >> repetitive work where we can.
>>> >>
>>> >> As other users try to migrate, we'll get their API reports, see what
>>>is
>>> >> missing and hopefully only need to add a few more APIs.
>>> >>
>>> >> Thoughts?
>>> >> -Alex
>>> >>
>>> >> On 2/27/18, 10:42 AM, "Piotr Zarzycki" >> >>> wrote:
>>> >>
>>> >>> What would be the results for Alina if you will have that swc ? She
>>> >>>simply
>>> >>> will be able to launch application without the error - That's the
>>>idea
>>> >>>?
>>> >>>
>>> >>> 2018-02-27 19:38 GMT+01:00 Harbs :
>>> >>>
>>>  Maybe. Not sure.
>>> 
>>>  How does the client know what needs to be implemented and h

Re: TypeNames vs ClassName

2018-02-23 Thread Peter Ent
I have been guilty of this and have been using typeNames now. I've found
that I need to set typeNames before calling super() in the constructor. I
thought it was done afterwards, but if I set typeNames after calling
super(), the typeName I set does not show up in the HTML produced.

Also, suppose I have this: A Menu with a label inside of it. People will
want to change the background color of the menu and the color of the
label's text. If I were doing this in plain HTML/JS/CSS, I would set a
selector:  .Menu .Label { color: blue; } but that's not supported in the
Flash Player. So when I set up the typeName for the label inside of the
Menu should I set it to: Menu_Label or MenuLabel or Menu-Label? And is
using "." in a selector name a good idea? I would think the CSS processor
in the browser would be confused between ".x.y" and ".x .y" which can also
be written as ".x.y". Basically, we should have a consist naming pattern
here.

‹peter

On 2/23/18, 4:09 AM, "Gabe Harbs"  wrote:

>There¹s some edge cases which seem problematic. One example:
>ComboBoxBiew has the following:
>input = new TextInput();
>input.className = "ComboBoxTextInput";
>
>button = new TextButton();
>button.className =
>"opt_org-apache.royale-html-ComboBox_Button";
>
>Input and button are both external to the view class, but are managed by
>the view class. On the other hand, there is a chance that the user might
>wan to style them. I¹m not sure whether className or typeNames is more
>appropriate hereŠ
>
>Harbs
>
>> On Feb 23, 2018, at 11:03 AM, Gabe Harbs  wrote:
>> 
>> I¹ll help.
>> 
>>> On Feb 23, 2018, at 10:50 AM, Alex Harui 
>>>wrote:
>>> 
>>> Quick note before I shut down for the night.
>>> 
>>> UIBase has both a typeNames and className property.  TypeNames is used
>>>to
>>> emulate Flex-like type selectors in the CSS lookup.  It should be set
>>>in
>>> the constructor and never set from outside the class.  There are a few
>>> classes in Basic and lots of classes in MDL that should be upgraded to
>>>set
>>> typeNames in the constructor.  Subclasses can append to the base
>>>class's
>>> typeNames
>>> 
>>> className is the opposite.  It should never be set inside the
>>>component's
>>> class.  It is for users of that component to set styles on the
>>>component.
>>> 
>>> Can we get a volunteer to clean this up?
>>> 
>>> Thanks,
>>> -Alex
>>> 
>> 
>



Re: [Royale] DividedBox

2018-02-14 Thread Peter Ent
At Alex's recommendation, I have refactored all of the "DividedBox"
classes into "DividedContainer" to make more general. I also renamed the
example to be "DividedContainerExample". The branch is still
feature/DividedBox but that will not matter when I merge it into develop
sometime tomorrow, hopefully.

—peter

On 2/14/18, 9:10 AM, "Peter Ent"  wrote:

>I used position:absolute on everything since pixel-level control was
>required for resizing. The only real difference between the SWF code and
>the JS code is that the JS code adds "position:absolute" to every
>immediate child of the DividedBoxes. I tried this out with several
>different types of children, and it worked for having a DataGrid as a
>child which is one of the most complex components we have.
>
>There are several ways to write the JS side but since getting it work on
>the Flash Player without inventing a complete CSS effects or Flexbox
>package was a huge task, I opted to just make the AS code that worked in
>the Flash Player work in the browser. One could use Flexbox or CSS Grid to
>do a similar job along with CSS effects to do the interactive resizing. In
>my head I pictured that effort to probably require a completely divergent
>code tree. Its certainly something to look into for the future.
>
>‹peter
>
>On 2/14/18, 8:59 AM, "Piotr Zarzycki"  wrote:
>
>>Hi Peter,
>>
>>How did you build rows/columns in HTML ?
>>
>>Thanks,
>>Piotr
>>
>>2018-02-14 14:56 GMT+01:00 Peter Ent :
>>
>>> Hi,
>>>
>>> I've just pushed a new feature branch: "feature/DividedBox" that
>>>contains
>>> a new set of Basic components: HDividedBox and VDividedBox. There is
>>>also
>>> an example to go along with them: examples/royale/DividedBoxExample.
>>>
>>> I've kept this as a feature branch so you can evaluate it and I'll put
>>>it
>>> into develop tomorrow or so depending on feedback. There are about 15
>>> classes/interfaces in total that make up this component set.
>>>
>>> The DividedBox classes should mimic the DividedBox components found in
>>> Flex. HDividedBox places its children into columns while VDividedBox
>>>places
>>> its children into rows. The children are separated with dividers
>>>containing
>>> grippers. You can drag the dividers to resize the children on either
>>>side.
>>>
>>> Regards,
>>> Peter Ent
>>> Adobe Systems/Apache Royale Project
>>>
>>
>>
>>
>>-- 
>>
>>Piotr Zarzycki
>>
>>Patreon: 
>>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>r
>>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C39ee57f6b22d496
>>8
>>0b1b08d573b33d6f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63654213602
>>2
>>860624&sdata=0Echs%2F8V98uUJ2nB1%2BMVsTgYDQ5QfSNvV8eEts%2FXuno%3D&reserve
>>d
>>=0
>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>r
>>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C39ee57f6b22d496
>>8
>>0b1b08d573b33d6f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63654213602
>>2
>>860624&sdata=0Echs%2F8V98uUJ2nB1%2BMVsTgYDQ5QfSNvV8eEts%2FXuno%3D&reserve
>>d
>>=0>*
>



Re: [Royale] DividedBox

2018-02-14 Thread Peter Ent
I used position:absolute on everything since pixel-level control was
required for resizing. The only real difference between the SWF code and
the JS code is that the JS code adds "position:absolute" to every
immediate child of the DividedBoxes. I tried this out with several
different types of children, and it worked for having a DataGrid as a
child which is one of the most complex components we have.

There are several ways to write the JS side but since getting it work on
the Flash Player without inventing a complete CSS effects or Flexbox
package was a huge task, I opted to just make the AS code that worked in
the Flash Player work in the browser. One could use Flexbox or CSS Grid to
do a similar job along with CSS effects to do the interactive resizing. In
my head I pictured that effort to probably require a completely divergent
code tree. Its certainly something to look into for the future.

‹peter

On 2/14/18, 8:59 AM, "Piotr Zarzycki"  wrote:

>Hi Peter,
>
>How did you build rows/columns in HTML ?
>
>Thanks,
>Piotr
>
>2018-02-14 14:56 GMT+01:00 Peter Ent :
>
>> Hi,
>>
>> I've just pushed a new feature branch: "feature/DividedBox" that
>>contains
>> a new set of Basic components: HDividedBox and VDividedBox. There is
>>also
>> an example to go along with them: examples/royale/DividedBoxExample.
>>
>> I've kept this as a feature branch so you can evaluate it and I'll put
>>it
>> into develop tomorrow or so depending on feedback. There are about 15
>> classes/interfaces in total that make up this component set.
>>
>> The DividedBox classes should mimic the DividedBox components found in
>> Flex. HDividedBox places its children into columns while VDividedBox
>>places
>> its children into rows. The children are separated with dividers
>>containing
>> grippers. You can drag the dividers to resize the children on either
>>side.
>>
>> Regards,
>> Peter Ent
>> Adobe Systems/Apache Royale Project
>>
>
>
>
>-- 
>
>Piotr Zarzycki
>
>Patreon: 
>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C39ee57f6b22d4968
>0b1b08d573b33d6f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636542136022
>860624&sdata=0Echs%2F8V98uUJ2nB1%2BMVsTgYDQ5QfSNvV8eEts%2FXuno%3D&reserved
>=0
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C39ee57f6b22d4968
>0b1b08d573b33d6f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636542136022
>860624&sdata=0Echs%2F8V98uUJ2nB1%2BMVsTgYDQ5QfSNvV8eEts%2FXuno%3D&reserved
>=0>*



[Royale] DividedBox

2018-02-14 Thread Peter Ent
Hi,

I've just pushed a new feature branch: "feature/DividedBox" that contains a new 
set of Basic components: HDividedBox and VDividedBox. There is also an example 
to go along with them: examples/royale/DividedBoxExample.

I've kept this as a feature branch so you can evaluate it and I'll put it into 
develop tomorrow or so depending on feedback. There are about 15 
classes/interfaces in total that make up this component set.

The DividedBox classes should mimic the DividedBox components found in Flex. 
HDividedBox places its children into columns while VDividedBox places its 
children into rows. The children are separated with dividers containing 
grippers. You can drag the dividers to resize the children on either side.

Regards,
Peter Ent
Adobe Systems/Apache Royale Project


Re: What is x and y? What is width and height?

2018-02-07 Thread Peter Ent
I think I agree with Harbs about x,y,width,height just returning the set
values if the calculation would be expensive. I wonder what the
circumstances are that we actually need to have precise values in
calculations. For example, if I wanted to make a circulate layout, how
would I go about doing that?

In the places I've done layouts without regard to platform I'm just
assuming things work. For example, in the DataGridLayout, I need to
transfer the column width given on the js:DataGridColumn definition to
both the List (column) and the corresponding Button in the ButtonBar.
Ideally, the browser takes that (along with display and position styles)
and just does the right thing with minimum code on our part (that's not
actually what I'm doing, so perhaps I should rethink that one more time).

‹peter

On 2/7/18, 8:35 AM, "Gabe Harbs"  wrote:

>The offset values are very expensive.
>
>They are also not completely accurate. I¹ve found it¹s difficult to get
>accurate values where SVG and transforms are in play.
>
>I would suggest that x,y,widht and height should reflect *set* values
>even if they are not always the actual ones.
>
>For cases where it¹s necessary to get accurate measured x,y,width and
>height, I would suggest using ³measured² variations of these values, or
>better, a getMeasuredBounds() method.
>
>> On Feb 7, 2018, at 10:43 AM, Alex Harui 
>>wrote:
>> 
>> Hi,
>> 
>> In Royale on JS, we are trying to leverage the browser's layout code as
>> much as possible.  We only run our own layout code in a few places.
>> In debugging a few layout issues I discovered that UIBase is not
>>reporting
>> x and y the way we expect it from Flex/Flash.  Browser elements don't
>>have
>> x and y properties, instead they have offsetLeft and offsetTop.  Mainly
>> for backward-compatibility with Flex/Flash, Royale has had x and y in
>>the
>> API since the beginning.  I think it is a bug that x and y do not act
>>like
>> they do in Flex and plan to fix that after this release.  Thoughts?
>>I'm a
>> bit concerned of the expense of calculating x and y because you have to
>> check if the offsetParent is your immediate parent and get the
>> offsetLeft/offsetTop of the immediate parent, but I think that's what it
>> would take to fix it.
>> 
>> Similarly (well, sort of), Flex did not support CSS margins, only
>>padding.
>> The browser reports width (offsetWidth) as factoring in content, padding
>> and borders, but not margin.  I think that's right, and matches Flex.
>> However, our custom layout algorithms do not currently factor in margins
>> since they are not reported in width.  I think our custom layout should
>> request width and margins and do the math.  We should not change width
>>to
>> include margins.  Thoughts?  This will make our custom layout code a bit
>> more expensive as well as it will probably need to call
>> getComputedStyles() on all of the children in order to get margins.
>>This
>> is also something to fix in the next release.
>> 
>> Of course, I could be wrong.  Thoughts?
>> 
>> -Alex
>> 
>



Re: DropDownList with ArrayList

2018-01-26 Thread Peter Ent
In PAYG fashion we/you would need to create a new set of beads that work
with ICollectionView rather than generalizing.

‹peter

On 1/25/18, 5:36 PM, "Gabe Harbs"  wrote:

>Yeah. Maybe. In my case, I just used Array instead of ArrayList, but that
>shouldn¹t really be necessaryŠ
>
>> On Jan 26, 2018, at 12:29 AM, Piotr Zarzycki
>> wrote:
>> 
>> Hi Harbs,
>> 
>> I've looked couple of times into the DropDownList from Basic. Maybe it's
>> time to reorganize things. Add there View, Model, Renderers etc ? I did
>> that for MDL DropDownList.
>> 
>> Thanks, Piotr
>> 
>> 2018-01-25 23:18 GMT+01:00 Gabe Harbs :
>> 
>>> The dataProvider setter in DropDownList has the following code:
>>> 
>>>for (i = 0; i < n; i++) {
>>>opt = document.createElement('option') as
>>> HTMLOptionElement;
>>>if (lf)
>>>opt.text = value[i][lf];
>>>else
>>>opt.text = value[i];
>>>dd.add(opt, null);
>>>}
>>> 
>>> Basically, it makes the assumption that the dataProvider is an
>>> index-accessible object. This is not the case if the dataProvider is a
>>> collection. In that case, the code should be something like this:
>>> 
>>>opt.text = value.getItemAt(i)[lf];
>>>else
>>>opt.text = value.getItemAt(i);
>>> 
>>> I¹m not sure of the best way to generalize this.
>>> 
>>> Thoughts?
>>> Harbs
>> 
>> 
>> 
>> 
>> -- 
>> 
>> Piotr Zarzycki
>> 
>> Patreon: 
>>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C724d30423d3844
>>1d3d2208d564441339%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636525165
>>903100864&sdata=ZkXTZnuXlNS%2BK3mWSES4ZO2l8BJWRepVkMgxes4FbNM%3D&reserved
>>=0
>> 
>>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C724d30423d3844
>>1d3d2208d564441339%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636525165
>>903100864&sdata=ZkXTZnuXlNS%2BK3mWSES4ZO2l8BJWRepVkMgxes4FbNM%3D&reserved
>>=0>*
>



Re: [Royale] ICollectionView

2018-01-22 Thread Peter Ent
Can you provide an MXML sample that reproduces the problem? I am also
going to try to figure out what conditions would cause this to happen.

Thank you for your patience.
‹peter

On 1/22/18, 4:57 AM, "piotrz"  wrote:

>Peter I decided show you some screenshots. This is dg and HTML structure.
>Height of area which displays data in grid is 0.
>
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fdg_height_zero.png&data
>=02%7C01%7Cpent%40adobe.com%7Cd9de5522827f412b8ad408d5617e8705%7Cfa7b1b5a7
>b34438794aed2c178decee1%7C0%7C0%7C636522118413141382&sdata=nLxba024BAuRHV5
>SjiUm5nLJ0FKBneluPQiRvgoqkok%3D&reserved=0>
>
>In Chrome I have unselect height and grid shows up, but it doesn't look as
>it was before.
>
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fdg_.png&data=02%7C01%7C
>pent%40adobe.com%7Cd9de5522827f412b8ad408d5617e8705%7Cfa7b1b5a7b34438794ae
>d2c178decee1%7C0%7C0%7C636522118413141382&sdata=%2BN%2Bkgsch%2BxRY%2Ff1WeF
>MWxhhpcgQpLIIo2Bxk0EEc78o%3D&reserved=0>
>
>Something is definitely wrong.
>
>Thanks, Piotr
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7Cd
>9de5522827f412b8ad408d5617e8705%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636522118413141382&sdata=VFBocU3mnReakmawRVb0JXkyqhv54JRVtP0b16iTFLY%3D
>&reserved=0



Re: [Royale] ICollectionView

2018-01-21 Thread Peter Ent
Does the DataGridExample work for you? I didn’t realize (for some reason) that 
the MDL grid was based on DataGrid; I thought it was written from scratch and 
independent. 

The container height should not be zero since it is explicitly calculated in 
DataGridLayout. I’ll take a look tomorrow my time. 

Peter 


> On Jan 21, 2018, at 5:56 PM, Piotr Zarzycki  wrote:
> 
> Hi Peter,
> 
> I just tried your changes - not sure if it's finished. Currently in my case
> only Header is visible. The "DataGrid_ListArea Container" have height = 0;
> The only difference between me and MDLExample is that:
> 1) I don't have line-height setup for each item renderer. Setting
> line-height haven't change anything.
> 2) Whole Grid is inside Panel: PanelWithControlBar
> 3) I'm using "DataGridPercentageLayout"
> 
> I see that each column have some hight, but since "DataGrid_ListArea
> Container" have hieght 0 I'm not seeing it.
> 
> That is the situation which I was talking about. Flex layout just perfectly
> worked. I remember that previous version of layout had the same issue.
> 
> I do like that code landed in layout bead.
> 
> Thoughts ?
> 
> Thanks, Piotr
> 
> 
> 2018-01-20 14:45 GMT+01:00 Peter Ent :
> 
>> Hi,
>> 
>> My main reason for moving the layout code to layout beads with more
>> control is to allow the insertion of drawing overlays:
>> 
>> Base component (eg, )
>> — ButtonBar header
>> — Container (list area)
>> 
>> If you wanted to draw better grid lines, then inserting a drawing layer of
>> some type between the Container and ButtonBar is possible with a custom
>> layout, but if ButtonBar and Container are being controlled by a CSS
>> Flexbox layout, then so will the drawing layer; HTML has no way to
>> indicate that the drawing layer should be ignored as far as I know. I
>> think even if you do not set that element's flex style the Flexbox will
>> still manage it.
>> 
>> The contents of the Container list area are still being managed by
>> Flexbox. And if you really want FlexBox to do the work, you could make a
>> custom DataGridFlexLayout or something like that. I'm just trying to make
>> things PAYG and still leave open the possibility of new beads to do new
>> interesting things.
>> 
>> How does that sound?
>> 
>> —peter
>> 
>>> On 1/19/18, 9:48 PM, "Piotr Zarzycki"  wrote:
>>> 
>>> Well, I'm afraid a bit that custom layout will be liable to some external
>>> containers and this cause unpredictable visual issues.
>>> 
>>> Flex box layouts just works, really good. Our flex box layout is doing
>>> also
>>> something with the children if remember correctly?
>>> I know that there is possible to do not set anything to children and
>>> achieve what we currently have in those layouts.
>>> 
>>>> On Fri, Jan 19, 2018, 22:46 Peter Ent  wrote:
>>>> 
>>>> There's going to be one more change: I'm going to bring back
>>>> DataGridLayout and DataGridPercentageLayout, moving the layout code from
>>>> the View beads into layout beads. This has a couple of benefits:
>>>> 
>>>> First, it separates the layout of the sub-parts from the creation of
>>>> those
>>>> parts.
>>>> 
>>>> Second, while I thought it was a good idea to use VerticalFlexLayout to
>>>> handle the placement of the DataGrid pieces, this layout is just
>>>> overkill
>>>> and not PAYG friendly since DataGrid is really just a header and a box.
>>>> A
>>>> custom layout for DataGrid just has have to calculate the width of the
>>>> columns and the header buttons, then place the header and the container
>>>> for the columns.
>>>> 
>>>> Third, VerticalFlexLayout works on every child which makes it difficult
>>>> to
>>>> insert an drawing overlay that could be used to draw nice grid lines.
>>>> With
>>>> DataGrid-specific layouts, any layers introduced will be ignored and
>>>> beads
>>>> can manage them independently.
>>>> 
>>>> I'm just working on the HTML vs Flash Player border thickness
>>>> calculations
>>>> so things look right. Its math and that means it will take me awhile ;-)
>>>> 
>>>> I hope there won't be much trouble switching over to this way. I hope to
>>>> get to finish it over the weekend but Monday at the latest.
>>>

Re: [Royale] ICollectionView

2018-01-20 Thread Peter Ent
Hi,

My main reason for moving the layout code to layout beads with more
control is to allow the insertion of drawing overlays:

Base component (eg, )
— ButtonBar header
— Container (list area)

If you wanted to draw better grid lines, then inserting a drawing layer of
some type between the Container and ButtonBar is possible with a custom
layout, but if ButtonBar and Container are being controlled by a CSS
Flexbox layout, then so will the drawing layer; HTML has no way to
indicate that the drawing layer should be ignored as far as I know. I
think even if you do not set that element's flex style the Flexbox will
still manage it.

The contents of the Container list area are still being managed by
Flexbox. And if you really want FlexBox to do the work, you could make a
custom DataGridFlexLayout or something like that. I'm just trying to make
things PAYG and still leave open the possibility of new beads to do new
interesting things.

How does that sound?

—peter

On 1/19/18, 9:48 PM, "Piotr Zarzycki"  wrote:

>Well, I'm afraid a bit that custom layout will be liable to some external
>containers and this cause unpredictable visual issues.
>
>Flex box layouts just works, really good. Our flex box layout is doing
>also
>something with the children if remember correctly?
>I know that there is possible to do not set anything to children and
>achieve what we currently have in those layouts.
>
>On Fri, Jan 19, 2018, 22:46 Peter Ent  wrote:
>
>> There's going to be one more change: I'm going to bring back
>> DataGridLayout and DataGridPercentageLayout, moving the layout code from
>> the View beads into layout beads. This has a couple of benefits:
>>
>> First, it separates the layout of the sub-parts from the creation of
>>those
>> parts.
>>
>> Second, while I thought it was a good idea to use VerticalFlexLayout to
>> handle the placement of the DataGrid pieces, this layout is just
>>overkill
>> and not PAYG friendly since DataGrid is really just a header and a box.
>>A
>> custom layout for DataGrid just has have to calculate the width of the
>> columns and the header buttons, then place the header and the container
>> for the columns.
>>
>> Third, VerticalFlexLayout works on every child which makes it difficult
>>to
>> insert an drawing overlay that could be used to draw nice grid lines.
>>With
>> DataGrid-specific layouts, any layers introduced will be ignored and
>>beads
>> can manage them independently.
>>
>> I'm just working on the HTML vs Flash Player border thickness
>>calculations
>> so things look right. Its math and that means it will take me awhile ;-)
>>
>> I hope there won't be much trouble switching over to this way. I hope to
>> get to finish it over the weekend but Monday at the latest.
>>
>> Regards,
>> Peter
>>
>> On 1/19/18, 1:47 PM, "Peter Ent"  wrote:
>>
>> >Hi Piotr,
>> >
>> >I was having an issue with the appearance of Scrollbars (in
>>FlashPlayer,
>> >not HTML) in DataGrid. I finally tracked it down to the
>> >HorizontalFlexLayout that is used for the Container holding the
>>columns.
>> >When I switch it to HorizontalLayout the scrollbars appear. It looks
>>like
>> >HorizontalFlexLayout (on the SWF side) is recalculating the vertical
>> >height and that's making the ScrollingViewport not show the scrollbars.
>> >
>> >I'm going to make HorizontalLayout the default for DataGrid and then
>>look
>> >into why HorizontalFlexLayout should be caring about its height if it
>> >hasn't been given an explicit height.
>> >
>> >If you need to use HorizontalFlexLayout for that Container you can just
>> >swap it in your app's CSS.
>> >
>> >‹peter
>> >
>> >On 1/6/18, 8:52 AM, "piotrz"  wrote:
>> >
>> >>Hi Peter,
>> >>
>> >>Just wanted to let you know that I have started use more extensively
>> >>DataGrid and I have found that using FlexLayout gives a way better
>> >>results
>> >>for DataGrid than VerticalFlexLayout/HorizotnalFlexLayout beads.
>> >>
>> >>Ma last commit fixes issue with synchronizing width of column with
>>width
>> >>of
>> >>header buttons in DataGrid.
>> >>
>> >>However there is one problem with that - Scrollbar. Take a look into
>>the
>> >>DataGridExample where scrollbar appear. Last column is a bit shifted.
>> >>Without scrollbar width is perfectly synced.
>> >>
>&g

Re: [Royale] ICollectionView

2018-01-19 Thread Peter Ent
There's going to be one more change: I'm going to bring back
DataGridLayout and DataGridPercentageLayout, moving the layout code from
the View beads into layout beads. This has a couple of benefits:

First, it separates the layout of the sub-parts from the creation of those
parts.

Second, while I thought it was a good idea to use VerticalFlexLayout to
handle the placement of the DataGrid pieces, this layout is just overkill
and not PAYG friendly since DataGrid is really just a header and a box. A
custom layout for DataGrid just has have to calculate the width of the
columns and the header buttons, then place the header and the container
for the columns.

Third, VerticalFlexLayout works on every child which makes it difficult to
insert an drawing overlay that could be used to draw nice grid lines. With
DataGrid-specific layouts, any layers introduced will be ignored and beads
can manage them independently.

I'm just working on the HTML vs Flash Player border thickness calculations
so things look right. Its math and that means it will take me awhile ;-)

I hope there won't be much trouble switching over to this way. I hope to
get to finish it over the weekend but Monday at the latest.

Regards,
Peter

On 1/19/18, 1:47 PM, "Peter Ent"  wrote:

>Hi Piotr,
>
>I was having an issue with the appearance of Scrollbars (in FlashPlayer,
>not HTML) in DataGrid. I finally tracked it down to the
>HorizontalFlexLayout that is used for the Container holding the columns.
>When I switch it to HorizontalLayout the scrollbars appear. It looks like
>HorizontalFlexLayout (on the SWF side) is recalculating the vertical
>height and that's making the ScrollingViewport not show the scrollbars.
>
>I'm going to make HorizontalLayout the default for DataGrid and then look
>into why HorizontalFlexLayout should be caring about its height if it
>hasn't been given an explicit height.
>
>If you need to use HorizontalFlexLayout for that Container you can just
>swap it in your app's CSS.
>
>‹peter
>
>On 1/6/18, 8:52 AM, "piotrz"  wrote:
>
>>Hi Peter,
>>
>>Just wanted to let you know that I have started use more extensively
>>DataGrid and I have found that using FlexLayout gives a way better
>>results
>>for DataGrid than VerticalFlexLayout/HorizotnalFlexLayout beads.
>>
>>Ma last commit fixes issue with synchronizing width of column with width
>>of
>>header buttons in DataGrid.
>>
>>However there is one problem with that - Scrollbar. Take a look into the
>>DataGridExample where scrollbar appear. Last column is a bit shifted.
>>Without scrollbar width is perfectly synced.
>>
>><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-r
>>o
>>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fscroll_bar_problem.png
>>&
>>data=02%7C01%7Cpent%40adobe.com%7C8c21b8b4e77145f0ef1f08d5550cc1c8%7Cfa7b
>>1
>>b5a7b34438794aed2c178decee1%7C0%7C0%7C636508435642510130&sdata=lqFyo5AO7t
>>d
>>RcHECAn1KbiDZJOFiMi9bpfNLnFvDYgQ%3D&reserved=0>
>>
>>If you have an idea how to fix that problem it would be great if you
>>could
>>do it during your work on DataGrid.
>>
>>Maybe we shouldn't actually fix that ?
>>
>>Thanks, Piotr
>>
>>
>>
>>
>>--
>>Sent from: 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-ro
>>y
>>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7C
>>8
>>c21b8b4e77145f0ef1f08d5550cc1c8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>>0
>>%7C636508435642510130&sdata=%2Fd%2FchSnNgv9qO7qhIF%2B5e7uN0U1nCJpZMjRGBwE
>>Q
>>cqs%3D&reserved=0
>



Re: [Royale] ICollectionView

2018-01-19 Thread Peter Ent
Hi Piotr,

I was having an issue with the appearance of Scrollbars (in FlashPlayer,
not HTML) in DataGrid. I finally tracked it down to the
HorizontalFlexLayout that is used for the Container holding the columns.
When I switch it to HorizontalLayout the scrollbars appear. It looks like
HorizontalFlexLayout (on the SWF side) is recalculating the vertical
height and that's making the ScrollingViewport not show the scrollbars.

I'm going to make HorizontalLayout the default for DataGrid and then look
into why HorizontalFlexLayout should be caring about its height if it
hasn't been given an explicit height.

If you need to use HorizontalFlexLayout for that Container you can just
swap it in your app's CSS.

‹peter

On 1/6/18, 8:52 AM, "piotrz"  wrote:

>Hi Peter,
>
>Just wanted to let you know that I have started use more extensively
>DataGrid and I have found that using FlexLayout gives a way better results
>for DataGrid than VerticalFlexLayout/HorizotnalFlexLayout beads.
>
>Ma last commit fixes issue with synchronizing width of column with width
>of
>header buttons in DataGrid.
>
>However there is one problem with that - Scrollbar. Take a look into the
>DataGridExample where scrollbar appear. Last column is a bit shifted.
>Without scrollbar width is perfectly synced.
>
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fscroll_bar_problem.png&
>data=02%7C01%7Cpent%40adobe.com%7C8c21b8b4e77145f0ef1f08d5550cc1c8%7Cfa7b1
>b5a7b34438794aed2c178decee1%7C0%7C0%7C636508435642510130&sdata=lqFyo5AO7td
>RcHECAn1KbiDZJOFiMi9bpfNLnFvDYgQ%3D&reserved=0>
>
>If you have an idea how to fix that problem it would be great if you could
>do it during your work on DataGrid.
>
>Maybe we shouldn't actually fix that ?
>
>Thanks, Piotr
>
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7C8
>c21b8b4e77145f0ef1f08d5550cc1c8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636508435642510130&sdata=%2Fd%2FchSnNgv9qO7qhIF%2B5e7uN0U1nCJpZMjRGBwEQ
>cqs%3D&reserved=0



Re: [Royale] DataGrid default configuration proposal

2018-01-19 Thread Peter Ent
You can leave "DataGrid" out of the className list as long as you either
a) don't want anything from DataGrid style or b) the other styles provide
the missing pieces.

—peter

On 1/18/18, 5:58 PM, "Piotr Zarzycki"  wrote:

>Peter,
>
>You changes working in my example.
>
>One thought is that It is a bit odd to me that we need to add also style
>DataGrid once we add DynamicDataGrid. I can live with that.
>
>Thank you
>
>
>
>2018-01-18 22:45 GMT+01:00 Piotr Zarzycki :
>
>> Wonderful!
>>
>> I will refresh also my private examples to check how things work.
>>
>> Thank you so much!
>> Piotr
>>
>>
>> 2018-01-18 22:35 GMT+01:00 Peter Ent :
>>
>>> Hi,
>>>
>>> I just pushed changes to the DataGrid and TreeGrid that should make
>>>things
>>> work. I included upgrades to the DataGridExample and TreeExample.
>>>
>>> Doing:  should work fine. You should include the "DataGrid" style so
>>> that it picks up any missing default values.
>>>
>>> The "DynamicDataGrid" style is part of defaults.css and combines beads
>>> together to make it easier to use. You can, of course, add the beads
>>> separately.
>>>
>>> The examples also show how to style the cells.
>>>
>>> I haven't been able to get the SWF and HTML versions to show styles the
>>> same way. Mostly, they are missing on the SWF side, so I'll add that
>>>to my
>>> list of things to look into. But you should have greater control on the
>>> HTML side.
>>>
>>> —peter
>>>
>>> On 1/17/18, 4:17 PM, "Piotr Zarzycki" 
>>>wrote:
>>>
>>> >Well if the Above example of usage is not working, we need to figure
>>>out
>>> >how to have it working. I can of course copy everything what is inside
>>> >DynamicDataGrid style and add my things, but this is not the solution.
>>> >
>>> >Thanks!
>>> >
>>> >2018-01-17 22:10 GMT+01:00 Peter Ent :
>>> >
>>> >> I'm not sure; it is a good question. I will have to experiment.
>>> >>
>>> >> The DataGridModel works with ArrayList now. What I would do is
>>>change
>>> it
>>> >> to work with Array and then make a new model for the ArrayList or
>>> >> ICollectionView, which to me, is a better choice over ArrayList
>>>since
>>> >>its
>>> >> an interface and more adaptable.
>>> >>
>>> >>
>>> >> ‹peter
>>> >>
>>> >> On 1/17/18, 4:07 PM, "Piotr Zarzycki" 
>>> wrote:
>>> >>
>>> >> >Hi Peter,
>>> >> >
>>> >> >To me it is a good change. I was always wondering why DG is working
>>> >>with
>>> >> >ArrayList default. However let's say that I wanted to switch some
>>>of
>>> >>the
>>> >> >beads for that DataGrid or add some custom class. How am I
>>>supposed to
>>> >>add
>>> >> >second css class ?
>>> >> >
>>> >> >If I have this:  and I
>>>have
>>> >> >something in my css file .myAdditionalClass {  }. Will it work ?
>>> >> >
>>> >> >
>>> >> >
>>> >> >Thanks, Piotr
>>> >> >
>>> >> >2018-01-17 20:58 GMT+01:00 Alex Harui :
>>> >> >
>>> >> >> IMO, the DataGrid in Basic should work with Arrays and a
>>>different
>>> >>set
>>> >> >>of
>>> >> >> beads allow it to work with ArrayList and another set of beads
>>> >>provides
>>> >> >> detection of changes to the ArrayList.  As long as we have those
>>> >>beads
>>> >> >> (and maybe some tests/examples to prove it all works), the
>>>default
>>> >>set
>>> >> >>of
>>> >> >> beads is less important. That decision should be driven by users
>>>and
>>> >> >>maybe
>>> >> >> by us if there is some other goal we want to hit (like making an
>>> >>example
>>> >> >> be smaller than some number of bytes.
>>> >> >>
>>> >> >> If you are going to create a style definition of DynamicDataGrid
>>> 

Re: [Royale] DataGrid default configuration proposal

2018-01-18 Thread Peter Ent
Hi,

I just pushed changes to the DataGrid and TreeGrid that should make things
work. I included upgrades to the DataGridExample and TreeExample.

Doing:  should work fine. You should include the "DataGrid" style so
that it picks up any missing default values.

The "DynamicDataGrid" style is part of defaults.css and combines beads
together to make it easier to use. You can, of course, add the beads
separately.

The examples also show how to style the cells.

I haven't been able to get the SWF and HTML versions to show styles the
same way. Mostly, they are missing on the SWF side, so I'll add that to my
list of things to look into. But you should have greater control on the
HTML side.

—peter

On 1/17/18, 4:17 PM, "Piotr Zarzycki"  wrote:

>Well if the Above example of usage is not working, we need to figure out
>how to have it working. I can of course copy everything what is inside
>DynamicDataGrid style and add my things, but this is not the solution.
>
>Thanks!
>
>2018-01-17 22:10 GMT+01:00 Peter Ent :
>
>> I'm not sure; it is a good question. I will have to experiment.
>>
>> The DataGridModel works with ArrayList now. What I would do is change it
>> to work with Array and then make a new model for the ArrayList or
>> ICollectionView, which to me, is a better choice over ArrayList since
>>its
>> an interface and more adaptable.
>>
>>
>> ‹peter
>>
>> On 1/17/18, 4:07 PM, "Piotr Zarzycki"  wrote:
>>
>> >Hi Peter,
>> >
>> >To me it is a good change. I was always wondering why DG is working
>>with
>> >ArrayList default. However let's say that I wanted to switch some of
>>the
>> >beads for that DataGrid or add some custom class. How am I supposed to
>>add
>> >second css class ?
>> >
>> >If I have this:  and I have
>> >something in my css file .myAdditionalClass {  }. Will it work ?
>> >
>> >
>> >
>> >Thanks, Piotr
>> >
>> >2018-01-17 20:58 GMT+01:00 Alex Harui :
>> >
>> >> IMO, the DataGrid in Basic should work with Arrays and a different
>>set
>> >>of
>> >> beads allow it to work with ArrayList and another set of beads
>>provides
>> >> detection of changes to the ArrayList.  As long as we have those
>>beads
>> >> (and maybe some tests/examples to prove it all works), the default
>>set
>> >>of
>> >> beads is less important. That decision should be driven by users and
>> >>maybe
>> >> by us if there is some other goal we want to hit (like making an
>>example
>> >> be smaller than some number of bytes.
>> >>
>> >> If you are going to create a style definition of DynamicDataGrid
>>should
>> >> also create a DynamicDataGrid class that packs in the required set of
>> >> beads.
>> >>
>> >> The DataGrid in Express will likely evolve to pack a set of beads
>>that
>> >> don't care if the data provider is an Array or ArrayList.  For now it
>> >>can
>> >> just assume ArrayList.
>> >>
>> >> My 2 cents,
>> >> -Alex
>> >>
>> >> On 1/17/18, 11:43 AM, "Peter Ent"  wrote:
>> >>
>> >> >Hi,
>> >> >
>> >> >I'm proposing a change to DataGrid default configuration. Right now
>> >> >DataGrid is designed to work with ArrayList; its does not work with
>> >> >Array. I propose that the default configuration for DataGrid is to
>>use
>> >> >Array as its dataProvider and provide no dynamic abilities.
>> >> >
>> >> >We would include in the defaults.css a style definition,
>> >> >DynamicDataGrid, which would set up DataGrid to use the more dynamic
>> >> >ICollectionView set of beads. When items were added or removed from
>>the
>> >> >dataProvider, the grid would automatically reflect the change.
>> >> >
>> >> >Doing this would provide a better PAYG experience. Or do you think
>> >> >DataGrid is too advanced to bother with Array at all?
>> >> >
>> >> > would require its dataProvider be an Array.
>> >> > would require its
>> >>dataProvider
>> >> >be ArrayList (or any thing that implements ICollectionView).
>> >> >
>> >> >What do you think? Should DataGrid's default configuration work with
>> >> >Array and then use PAYG to upgrad

Re: [Royale] DataGrid default configuration proposal

2018-01-17 Thread Peter Ent
I'm not sure; it is a good question. I will have to experiment.

The DataGridModel works with ArrayList now. What I would do is change it
to work with Array and then make a new model for the ArrayList or
ICollectionView, which to me, is a better choice over ArrayList since its
an interface and more adaptable.


‹peter

On 1/17/18, 4:07 PM, "Piotr Zarzycki"  wrote:

>Hi Peter,
>
>To me it is a good change. I was always wondering why DG is working with
>ArrayList default. However let's say that I wanted to switch some of the
>beads for that DataGrid or add some custom class. How am I supposed to add
>second css class ?
>
>If I have this:  and I have
>something in my css file .myAdditionalClass {  }. Will it work ?
>
>
>
>Thanks, Piotr
>
>2018-01-17 20:58 GMT+01:00 Alex Harui :
>
>> IMO, the DataGrid in Basic should work with Arrays and a different set
>>of
>> beads allow it to work with ArrayList and another set of beads provides
>> detection of changes to the ArrayList.  As long as we have those beads
>> (and maybe some tests/examples to prove it all works), the default set
>>of
>> beads is less important. That decision should be driven by users and
>>maybe
>> by us if there is some other goal we want to hit (like making an example
>> be smaller than some number of bytes.
>>
>> If you are going to create a style definition of DynamicDataGrid should
>> also create a DynamicDataGrid class that packs in the required set of
>> beads.
>>
>> The DataGrid in Express will likely evolve to pack a set of beads that
>> don't care if the data provider is an Array or ArrayList.  For now it
>>can
>> just assume ArrayList.
>>
>> My 2 cents,
>> -Alex
>>
>> On 1/17/18, 11:43 AM, "Peter Ent"  wrote:
>>
>> >Hi,
>> >
>> >I'm proposing a change to DataGrid default configuration. Right now
>> >DataGrid is designed to work with ArrayList; its does not work with
>> >Array. I propose that the default configuration for DataGrid is to use
>> >Array as its dataProvider and provide no dynamic abilities.
>> >
>> >We would include in the defaults.css a style definition,
>> >DynamicDataGrid, which would set up DataGrid to use the more dynamic
>> >ICollectionView set of beads. When items were added or removed from the
>> >dataProvider, the grid would automatically reflect the change.
>> >
>> >Doing this would provide a better PAYG experience. Or do you think
>> >DataGrid is too advanced to bother with Array at all?
>> >
>> > would require its dataProvider be an Array.
>> > would require its
>>dataProvider
>> >be ArrayList (or any thing that implements ICollectionView).
>> >
>> >What do you think? Should DataGrid's default configuration work with
>> >Array and then use PAYG to upgrade it to more dynamic components if
>> >that's what the developer wants?
>> >
>> >One more thing: the List's default configuration uses Array and you
>>have
>> >to add dynamic beads if you want it to respond to changes. I would also
>> >add a "DynamicList" style to make it easier to do that. This way there
>>is
>> >consistency between List and DataGrid.
>> >
>> > would require its dataProvider to be an Array.
>> > would require its dataProvider to be
>> >ArrayList (or any thing that implements ICollectionView).
>> >
>> >Thanks,
>> >Peter
>> >
>> >
>>
>>
>
>
>-- 
>
>Piotr Zarzycki
>
>Patreon: 
>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C0e49839e7e584159
>267908d55dee5e4d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636518200725
>558336&sdata=VsmG4W6WXx5v2%2Blfa3s9ieXuVsjCv%2BRWa84LNf6W11M%3D&reserved=0
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C0e49839e7e584159
>267908d55dee5e4d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636518200725
>558336&sdata=VsmG4W6WXx5v2%2Blfa3s9ieXuVsjCv%2BRWa84LNf6W11M%3D&reserved=0
>>*



[Royale] DataGrid default configuration proposal

2018-01-17 Thread Peter Ent
Hi,

I'm proposing a change to DataGrid default configuration. Right now DataGrid is 
designed to work with ArrayList; its does not work with Array. I propose that 
the default configuration for DataGrid is to use Array as its dataProvider and 
provide no dynamic abilities.

We would include in the defaults.css a style definition,  DynamicDataGrid, 
which would set up DataGrid to use the more dynamic ICollectionView set of 
beads. When items were added or removed from the dataProvider, the grid would 
automatically reflect the change.

Doing this would provide a better PAYG experience. Or do you think DataGrid is 
too advanced to bother with Array at all?

 would require its dataProvider be an Array.
 would require its dataProvider be 
ArrayList (or any thing that implements ICollectionView).

What do you think? Should DataGrid's default configuration work with Array and 
then use PAYG to upgrade it to more dynamic components if that's what the 
developer wants?

One more thing: the List's default configuration uses Array and you have to add 
dynamic beads if you want it to respond to changes. I would also add a 
"DynamicList" style to make it easier to do that. This way there is consistency 
between List and DataGrid.

 would require its dataProvider to be an Array.
 would require its dataProvider to be 
ArrayList (or any thing that implements ICollectionView).

Thanks,
Peter




Re: [Royale] ICollectionView

2018-01-16 Thread Peter Ent
Now that I've checked in TreeGrid and my changes to DataGrid (not much) I
can look into this with you.

I created an interface, IDataGridColumn so that TreeGrid and DataGrid can
share a lot of the same code, although the two are separate at the moment.
I want TreeGrid to be able to use most of the same beads DataGrid does or
will have available to it in the future. The styling should be the same,
too.

‹peter

On 1/12/18, 6:35 PM, "piotrz"  wrote:

>Peter,
>
>I see one more issue. In DataGridColumnList we have following line:
>"typeNames = "DataGridColumnList";". After compilation each div which
>represents DataGridColumnList have class="List".
>
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Flist_each_datagridcolum
>nlist.png&data=02%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536
>ef%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=j
>avj1cU%2BeNSJvY%2FwHzRtOQDDCGJKSNEUP2QCWWWZpug%3D&reserved=0>
>
>This gives us some borders because default List style has css which is
>doing
>for us border etc. [1]
>
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fborder_grid.png&data=02
>%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536ef%7Cfa7b1b5a7b34
>438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=D%2BVI5eYn%2FTXqG1
>DDvfS5GSfGctc0JptwQZ%2BHNG1hT3s%3D&reserved=0>
>
>However if I add to the column some style as we are doing it in
>DataGridExample for as second grid, we are ending up with something weird:
>
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fno_border_grid.png&data
>=02%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536ef%7Cfa7b1b5a7
>b34438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=nxtvREgcMz6kgZ0
>wwZV5bmUbkhvAuckEnUETYmFpgrs%3D&reserved=0>
>
>There is no border, cause DataGridColumnList style doesn't have it [2].
>
>I think we should:
>1) Set className = "DataGridColumnList" - here [3]
>2) Add those border to class "DataGridColumnList" in css
>
>What do you think ?
>
>[1] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F
>n27aYN&data=02%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536ef%
>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=rOBo
>byCAc2i92Vmlu0eniYIkCaEtWRA%2BTox08IMOFhQ%3D&reserved=0
>[2] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F
>N4S9PK&data=02%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536ef%
>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=dQ0p
>WvYbK4Yn0RNJOKhZkKLbJzF4T54%2BSikI7bes1%2Bw%3D&reserved=0
>[3] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F
>8mF2Lr&data=02%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536ef%
>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=mPbe
>gCAynPs5olJlaFDMFew5Bfb5mkP6lYIplrrqMd0%3D&reserved=0
>
>Thanks,
>Piotr
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7Ca
>95e03b494894e2bf8ba08d55a1536ef%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636513969542441416&sdata=aLSGgQj1G%2F24n9AS97pDZgY59%2FycIbacHt0xUtKnCz
>c%3D&reserved=0



[Royale] TreeGrid

2018-01-16 Thread Peter Ent
Hi,

I've committed/pushed code that makes TreeGrid work. You can look at 
TreeExample to see how to use it. Basically, TreeGrid is just like DataGrid 
except it works with HierarchicalData. You define which column you want to hold 
the tree using a  description. For the other columns use 
. You can make any column be the Tree. You can even have 
multiple columns be trees, although I'm not sure if that makes any sense.

There is still some more work and styling to be done.

Regards,
Peter Ent
Adobe Systems/Apache Royale project


Re: [Royale] ICollectionView

2018-01-16 Thread Peter Ent
Sorry for the delay; yesterday was a company holiday here in the States. I
was catching up on other things. I figured this would come up; we need to
have a plan for style names that is consistent. What we have now isn't
working right all the time. I was trying to give the columns additional
class names as "first", "middle", and "last" so that borders could be
added more precisely. That seems not be working either. I think its my
application and not anything to do with the underlying Royale framework.
I'll look into this today.

Thanks for all your help!
‹peter

On 1/12/18, 6:35 PM, "piotrz"  wrote:

>Peter,
>
>I see one more issue. In DataGridColumnList we have following line:
>"typeNames = "DataGridColumnList";". After compilation each div which
>represents DataGridColumnList have class="List".
>
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Flist_each_datagridcolum
>nlist.png&data=02%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536
>ef%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=j
>avj1cU%2BeNSJvY%2FwHzRtOQDDCGJKSNEUP2QCWWWZpug%3D&reserved=0>
>
>This gives us some borders because default List style has css which is
>doing
>for us border etc. [1]
>
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fborder_grid.png&data=02
>%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536ef%7Cfa7b1b5a7b34
>438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=D%2BVI5eYn%2FTXqG1
>DDvfS5GSfGctc0JptwQZ%2BHNG1hT3s%3D&reserved=0>
>
>However if I add to the column some style as we are doing it in
>DataGridExample for as second grid, we are ending up with something weird:
>
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fno_border_grid.png&data
>=02%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536ef%7Cfa7b1b5a7
>b34438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=nxtvREgcMz6kgZ0
>wwZV5bmUbkhvAuckEnUETYmFpgrs%3D&reserved=0>
>
>There is no border, cause DataGridColumnList style doesn't have it [2].
>
>I think we should:
>1) Set className = "DataGridColumnList" - here [3]
>2) Add those border to class "DataGridColumnList" in css
>
>What do you think ?
>
>[1] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F
>n27aYN&data=02%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536ef%
>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=rOBo
>byCAc2i92Vmlu0eniYIkCaEtWRA%2BTox08IMOFhQ%3D&reserved=0
>[2] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F
>N4S9PK&data=02%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536ef%
>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=dQ0p
>WvYbK4Yn0RNJOKhZkKLbJzF4T54%2BSikI7bes1%2Bw%3D&reserved=0
>[3] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F
>8mF2Lr&data=02%7C01%7Cpent%40adobe.com%7Ca95e03b494894e2bf8ba08d55a1536ef%
>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636513969542441416&sdata=mPbe
>gCAynPs5olJlaFDMFew5Bfb5mkP6lYIplrrqMd0%3D&reserved=0
>
>Thanks,
>Piotr
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7Ca
>95e03b494894e2bf8ba08d55a1536ef%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636513969542441416&sdata=aLSGgQj1G%2F24n9AS97pDZgY59%2FycIbacHt0xUtKnCz
>c%3D&reserved=0



Re: [Royale] ICollectionView

2018-01-11 Thread Peter Ent
Hi,

Please go ahead and do that. We should have a DataGrid view bead that lets
you mix percentage and non-percentage column widths, but that can weight.

‹peter

On 1/11/18, 12:52 PM, "Piotr Zarzycki"  wrote:

>Peter,
>
>I did analysis of DataGridPercentageView and the only difference between
>DataGridView is one line of code. I would go and extend DataGridView. What
>do you think ? This bead is really useful to me and it's working, but it
>need to be cleaned up.
>
>If I extend it I will simply fix issue above.
>
>Thanks, Piotr
>
>
>2018-01-11 18:04 GMT+01:00 Piotr Zarzycki :
>
>> Peter,
>>
>> I have found what's the problem is!! I'm using in my DataGrid bead
>>DataGridPercentageView.
>> This bead messing up with styles, basically overwrite them. Not sure
>> actually what happened yet inside. If I remove it css class which
>>provides
>> your bead to the DataGrid is starting to be assign correctly.
>>
>> Piotr
>>
>>
>> 2018-01-11 15:08 GMT+01:00 Piotr Zarzycki :
>>
>>> Hi Peter,
>>>
>>> Yest DataGridExample is working for me. The second grid is responding
>>>for
>>> add/remove item.
>>>
>>> I'm going to add to the DataGridExample today/tomorrow Panel as I have
>>> and see whether style will be applied.
>>> My styles are in separate files style.css. DataGridExample has them
>>> inside MXML.
>>>
>>> Thanks, Piotr
>>>
>>>
>>> 2018-01-11 15:05 GMT+01:00 Peter Ent :
>>>
>>>> Does the DataGridExample even work for you? You should see two
>>>>DataGrids,
>>>> the second being dynamic with the add and remove buttons inserting and
>>>> removing a row. Is that working?
>>>>
>>>> The images in your links look OK and match what I have. I think there
>>>>is
>>>> still more to do with CSS and maybe that's what you are hitting. I'm
>>>> concerned though that the new CollectionView classes are not being put
>>>> into play in your code.
>>>>
>>>> Regards,
>>>> Peter
>>>>
>>>> On 1/10/18, 6:03 PM, "piotrz"  wrote:
>>>>
>>>> >Hi Peter,
>>>> >
>>>> >I just started to use your classes on DataGrid and in my examples
>>>>they
>>>> are
>>>> >not working. Something is wrong with assigning CSS style to
>>>> >DataGridColumn.
>>>> >
>>>> >I have following structure [1] and CSS. This css is in separate
>>>>file. In
>>>> >the
>>>> >main applications file I have simply: >>> >source="resources/styles.css"/>
>>>> >
>>>> >After compilation I see that class="userList" is being assigned to
>>>>main
>>>> >Div
>>>> >of DataGrid. For the column divs I see only: class="first
>>>> >DataGridColumnList". In DataGridExample there is for the the column:
>>>> >class="DynamicGridColumn DataGridColumnList".
>>>> >
>>>> >My Grid After compilation:
>>>> ><https://na01.safelinks.protection.outlook.com/?url=http%3A
>>>> %2F%2Fapache-ro
>>>> >yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fno_class
>>>> _dg.png&data=02
>>>> >%7C01%7Cpent%40adobe.com%7C7e49d359a36d4680d7e008d5587e6389
>>>> %7Cfa7b1b5a7b34
>>>> >438794aed2c178decee1%7C0%7C0%7C63651212923786&sdata=3du
>>>> pNZxf%2BhzXfjZM
>>>> >xRZLae71UTR78lWs2bZ73Uh%2FYW0%3D&reserved=0>
>>>> >
>>>> >Grid from DataGridExample:
>>>> ><https://na01.safelinks.protection.outlook.com/?url=http%3A
>>>> %2F%2Fapache-ro
>>>> >yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fdg_datag
>>>> rid_Example.png
>>>> >&data=02%7C01%7Cpent%40adobe.com%7C7e49d359a36d4680d7e008d5
>>>> 587e6389%7Cfa7b
>>>> >1b5a7b34438794aed2c178decee1%7C0%7C0%7C63651212923786&s
>>>> data=27miZTux0h
>>>> >rSTDHd%2FMPjZzOWhTwaF5L33rVyyTb0S0s%3D&reserved=0>
>>>> >
>>>> >I haven't try more things, but maybe Panel messing up with something
>>>>? I
>>>> >will be trying some ideas and scenarios tomorrow.
>>>> >
>>>> >[1]
>>>> >https://na01.safelinks.protection.outlook

Re: [Royale] ICollectionView

2018-01-11 Thread Peter Ent
Does the DataGridExample even work for you? You should see two DataGrids,
the second being dynamic with the add and remove buttons inserting and
removing a row. Is that working?

The images in your links look OK and match what I have. I think there is
still more to do with CSS and maybe that's what you are hitting. I'm
concerned though that the new CollectionView classes are not being put
into play in your code.

Regards,
Peter

On 1/10/18, 6:03 PM, "piotrz"  wrote:

>Hi Peter,
>
>I just started to use your classes on DataGrid and in my examples they are
>not working. Something is wrong with assigning CSS style to
>DataGridColumn.
>
>I have following structure [1] and CSS. This css is in separate file. In
>the
>main applications file I have simply: source="resources/styles.css"/>
>
>After compilation I see that class="userList" is being assigned to main
>Div
>of DataGrid. For the column divs I see only: class="first
>DataGridColumnList". In DataGridExample there is for the the column:
>class="DynamicGridColumn DataGridColumnList".
>
>My Grid After compilation:
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fno_class_dg.png&data=02
>%7C01%7Cpent%40adobe.com%7C7e49d359a36d4680d7e008d5587e6389%7Cfa7b1b5a7b34
>438794aed2c178decee1%7C0%7C0%7C63651212923786&sdata=3dupNZxf%2BhzXfjZM
>xRZLae71UTR78lWs2bZ73Uh%2FYW0%3D&reserved=0>
>
>Grid from DataGridExample:
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fdg_datagrid_Example.png
>&data=02%7C01%7Cpent%40adobe.com%7C7e49d359a36d4680d7e008d5587e6389%7Cfa7b
>1b5a7b34438794aed2c178decee1%7C0%7C0%7C63651212923786&sdata=27miZTux0h
>rSTDHd%2FMPjZzOWhTwaF5L33rVyyTb0S0s%3D&reserved=0>
>
>I haven't try more things, but maybe Panel messing up with something ? I
>will be trying some ideas and scenarios tomorrow.
>
>[1] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apa
>che.org%2FOMfW&data=02%7C01%7Cpent%40adobe.com%7C7e49d359a36d4680d7e008d55
>87e6389%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63651212923786&sd
>ata=zqEGymsWdGYkDJ%2BxbHSVPqbhsgMfTAtsqNtltjMajUE%3D&reserved=0
>[2] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apa
>che.org%2FIte8&data=02%7C01%7Cpent%40adobe.com%7C7e49d359a36d4680d7e008d55
>87e6389%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63651212923786&sd
>ata=NHXr6cFGvG8Wf8hE43vvTVrc0M45f7%2FGgWz9c5F0kNQ%3D&reserved=0
>
>Thanks, Piotr
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7C7
>e49d359a36d4680d7e008d5587e6389%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C63651212923786&sdata=lg3ZlzcBIWyrpg%2FXGIkzOhv0xUpfVsqbKM5dV2pMmL0%
>3D&reserved=0



Re: Slider Component

2018-01-10 Thread Peter Ent
I compared Justin's suggested change with what was already in the repo and
changed the code to remove an unnecessary offset. To me, it now works
correctly.

‹peter

On 1/9/18, 7:14 PM, "Justin Mclean"  wrote:

>Hi,
>
>> I've tried the slider with Safari, Chrome, and Firefox. I guess I am
>>not understanding the problem.
>
>I describe the issue and how to reproduce here [1] and have provided a
>fix for it here [2] it would be nice if someone reviewed it as this has
>been open for a month.
>
>The fix just committed BTW doesn¹t seem to solve the problem above.
>
>Thanks,
>Justin
>
>1. 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
>m%2Fapache%2Froyale-asjs%2Fissues%2F102&data=02%7C01%7Cpent%40adobe.com%7C
>7f6b0faed43b409baa2208d557bf28a0%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>0%7C636511400892762769&sdata=fz8uWl78eqreC%2F06%2BMmZy661cqmRGmwCqHrb86661
>4Q%3D&reserved=0
>2. 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
>m%2Fapache%2Froyale-asjs%2Fpull%2F104&data=02%7C01%7Cpent%40adobe.com%7C7f
>6b0faed43b409baa2208d557bf28a0%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
>7C636511400892762769&sdata=1DyM59kd6Rh%2BySRMj00zupF5eFgp4WUV9MxLbozjjH8%3
>D&reserved=0



Re: Slider Component

2018-01-09 Thread Peter Ent
Hi

I've pushed a change to the slider mouse controllers that should make it
better. Now clicking on the thumb will not move it. If you drag the thumb
it should reposition centered under the mouse cursor. But doing it quickly
(ie, normally) it tracks a little off. I think that's because the events
just aren't being processed fast enough. This may be as best as we can get
it.

—peter

On 1/9/18, 2:47 PM, "Peter Ent"  wrote:

>Thanks for the video! That was great. I do see what you are describing.
>I'll look into it.
>
>—peter
>
>On 1/9/18, 1:49 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
> wrote:
>
>>Hi Peter,
>>
>>I think the best way to show you the problems is with a video. I uploaded
>>a
>>hidden video here:
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fyoutu.be
>>%
>>2Fm1SnCyHeUzc&data=02%7C01%7Cpent%40adobe.com%7Cc0b9c449b8b84ed3d86f08d55
>>7
>>91c1d2%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636511205892654628&sd
>>a
>>ta=8VwCCicx6YYD%2Bi2E3CHYSl38FnWBNhD1pUvpyj2NBtM%3D&reserved=0
>>Please, let me know when you see it, I could remove it in some days or if
>>you want left it more time
>>
>>I'm on Mac/Safari, I think here you can see some problems here:
>>* When you click on thumb and then click again thumb moves (two times to
>>the right and the goes again to origin), this is the one Justin reported
>>* Another one is when you click on thumb and then drag, the slider goes
>>directly to match mouse pointer position
>>
>>Thanks
>>
>>2018-01-09 17:32 GMT+01:00 Peter Ent :
>>
>>> I've tried the slider with Safari, Chrome, and Firefox. I guess I am
>>>not
>>> understanding the problem. When I move the mouse into the slider thumb
>>> control, press the mouse button down and drag, the thumb follows the
>>>mouse
>>> immediately. It may snap to step positions along the track if the range
>>> isn't very big (eg, 0..5). Is the problem that it snaps and doesn't
>>>glide
>>> smoothly?
>>>
>>> I've looked at sliders in other UIs and they do glide smoothly and most
>>> often just stop where you leave them. Which can lead to readings like
>>>3.25
>>> on a scale of 0..5. Mostly those sliders only range from 0..1 and then
>>>the
>>> app developer has to interpolate.
>>>
>>> Let me know how to proceed.
>>>
>>> ‹peter
>>>
>>> On 1/7/18, 12:51 PM, "carlos.rov...@gmail.com on behalf of Carlos
>>>Rovira"
>>>  wrote:
>>>
>>> >Hi Peter
>>> >
>>> >I could at last try the new slider and works far way better. Thanks
>>>for
>>> >the
>>> >great work!.
>>> >
>>> >I notice the problems raised by Justin. I think one of the problem is
>>>that
>>> >thumb is not considering the mouse exact point of interaction and that
>>> >cause the thumb "moves" or adapts to the mouse. I think this is right
>>>when
>>> >mouse is outside the thumb, but when is "inside" I think thumb should
>>> >start
>>> >moving when user start dragging.
>>> >
>>> >I think this is so close to a functional slider so thanks for working
>>>on
>>> >this!
>>> >
>>> >Carlos
>>> >
>>> >
>>> >
>>> >2017-12-15 4:12 GMT+01:00 Justin Mclean :
>>> >
>>> >> HI,
>>> >>
>>> >> Look like the new slider code has introduced a few new issues and
>>>one in
>>> >> particular in easily discoverable by users [1]. Can someone take a
>>>look
>>> >>at
>>> >> this PR please. [2]
>>> >>
>>> >> Thanks,
>>> >> Justin
>>> >>
>>> >> 1.
>>> >>https://na01.safelinks.protection.outlook.com/?url=
>>> https%3A%2F%2Fgithub.c
>>> 
>>>>>om%2Fapache%2Froyale-asjs%2Fissues%2F102&data=02%7C01%7Cpent%40adobe.c
>>>>>o
>>>>>m
>>> %
>>> >>7Cc37586e268914b061c2c08d555f76079%7Cfa7b1b5a7b34438794aed2c178de
>>> cee1%7C0
>>> >>%7C0%7C636509443332572042&sdata=ILU1l099EOgRcquay0yTvg%
>>> 2Fmtms9jBSfoj12jlK
>>> >>JreA%3D&reserved=0
>>> >> 2.
>>> >>https://na01.safelinks.protection.outlook.com/?url=
>>> https%3A%2F%2Fgithub.c
>>> 
>>>>>om%2Fapache%2Froyale-asjs%2Fpull%2F104&data=02%7C01%7Cpent%40adobe.com
>>> %7C
>>> >>c37586e268914b061c2c08d555f76079%7Cfa7b1b5a7b34438794aed2c178de
>>> cee1%7C0%7
>>> >>C0%7C636509443332572042&sdata=MU0G1ExYtSMUw3yta2pWKcr7HCXSRO
>>> 467d2CUseQyAU
>>> >>%3D&reserved=0
>>> >
>>> >
>>> >
>>> >
>>> >--
>>> >Carlos Rovira
>>> >https://na01.safelinks.protection.outlook.com/?url=
>>> http%3A%2F%2Fabout.me%2
>>> >Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%
>>> 7Cc37586e268914b061c2c08d555
>>> >f76079%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
>>> 7C636509443332572042&sda
>>> >ta=Nin8sgwiGcjK0whqN7cscKZxN1baBwqJ5ylcveDW76E%3D&reserved=0
>>>
>>>
>>
>>
>>-- 
>>Carlos Rovira
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%
>>2
>>Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%7Cc0b9c449b8b84ed3d86f08d55
>>7
>>91c1d2%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636511205892654628&sd
>>a
>>ta=S%2BZhm6gnH8KEEPrrOhkMyWcxfw1ro7dMI6t6Ox242E0%3D&reserved=0
>



Re: Slider Component

2018-01-09 Thread Peter Ent
Thanks for the video! That was great. I do see what you are describing.
I'll look into it.

—peter

On 1/9/18, 1:49 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi Peter,
>
>I think the best way to show you the problems is with a video. I uploaded
>a
>hidden video here:
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fyoutu.be%
>2Fm1SnCyHeUzc&data=02%7C01%7Cpent%40adobe.com%7Cc0b9c449b8b84ed3d86f08d557
>91c1d2%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636511205892654628&sda
>ta=8VwCCicx6YYD%2Bi2E3CHYSl38FnWBNhD1pUvpyj2NBtM%3D&reserved=0
>Please, let me know when you see it, I could remove it in some days or if
>you want left it more time
>
>I'm on Mac/Safari, I think here you can see some problems here:
>* When you click on thumb and then click again thumb moves (two times to
>the right and the goes again to origin), this is the one Justin reported
>* Another one is when you click on thumb and then drag, the slider goes
>directly to match mouse pointer position
>
>Thanks
>
>2018-01-09 17:32 GMT+01:00 Peter Ent :
>
>> I've tried the slider with Safari, Chrome, and Firefox. I guess I am not
>> understanding the problem. When I move the mouse into the slider thumb
>> control, press the mouse button down and drag, the thumb follows the
>>mouse
>> immediately. It may snap to step positions along the track if the range
>> isn't very big (eg, 0..5). Is the problem that it snaps and doesn't
>>glide
>> smoothly?
>>
>> I've looked at sliders in other UIs and they do glide smoothly and most
>> often just stop where you leave them. Which can lead to readings like
>>3.25
>> on a scale of 0..5. Mostly those sliders only range from 0..1 and then
>>the
>> app developer has to interpolate.
>>
>> Let me know how to proceed.
>>
>> ‹peter
>>
>> On 1/7/18, 12:51 PM, "carlos.rov...@gmail.com on behalf of Carlos
>>Rovira"
>>  wrote:
>>
>> >Hi Peter
>> >
>> >I could at last try the new slider and works far way better. Thanks for
>> >the
>> >great work!.
>> >
>> >I notice the problems raised by Justin. I think one of the problem is
>>that
>> >thumb is not considering the mouse exact point of interaction and that
>> >cause the thumb "moves" or adapts to the mouse. I think this is right
>>when
>> >mouse is outside the thumb, but when is "inside" I think thumb should
>> >start
>> >moving when user start dragging.
>> >
>> >I think this is so close to a functional slider so thanks for working
>>on
>> >this!
>> >
>> >Carlos
>> >
>> >
>> >
>> >2017-12-15 4:12 GMT+01:00 Justin Mclean :
>> >
>> >> HI,
>> >>
>> >> Look like the new slider code has introduced a few new issues and
>>one in
>> >> particular in easily discoverable by users [1]. Can someone take a
>>look
>> >>at
>> >> this PR please. [2]
>> >>
>> >> Thanks,
>> >> Justin
>> >>
>> >> 1.
>> >>https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fgithub.c
>> 
>>>>om%2Fapache%2Froyale-asjs%2Fissues%2F102&data=02%7C01%7Cpent%40adobe.co
>>>>m
>> %
>> >>7Cc37586e268914b061c2c08d555f76079%7Cfa7b1b5a7b34438794aed2c178de
>> cee1%7C0
>> >>%7C0%7C636509443332572042&sdata=ILU1l099EOgRcquay0yTvg%
>> 2Fmtms9jBSfoj12jlK
>> >>JreA%3D&reserved=0
>> >> 2.
>> >>https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fgithub.c
>> >>om%2Fapache%2Froyale-asjs%2Fpull%2F104&data=02%7C01%7Cpent%40adobe.com
>> %7C
>> >>c37586e268914b061c2c08d555f76079%7Cfa7b1b5a7b34438794aed2c178de
>> cee1%7C0%7
>> >>C0%7C636509443332572042&sdata=MU0G1ExYtSMUw3yta2pWKcr7HCXSRO
>> 467d2CUseQyAU
>> >>%3D&reserved=0
>> >
>> >
>> >
>> >
>> >--
>> >Carlos Rovira
>> >https://na01.safelinks.protection.outlook.com/?url=
>> http%3A%2F%2Fabout.me%2
>> >Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%
>> 7Cc37586e268914b061c2c08d555
>> >f76079%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
>> 7C636509443332572042&sda
>> >ta=Nin8sgwiGcjK0whqN7cscKZxN1baBwqJ5ylcveDW76E%3D&reserved=0
>>
>>
>
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%7Cc0b9c449b8b84ed3d86f08d557
>91c1d2%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636511205892654628&sda
>ta=S%2BZhm6gnH8KEEPrrOhkMyWcxfw1ro7dMI6t6Ox242E0%3D&reserved=0



Re: [VOTE] Release Apache Royale 0.9.0 RC1

2018-01-09 Thread Peter Ent
+1 Binding
Used Approval script (used playerglobal 11.1 swc)
I didn't see any problems that would withhold this from release.
‹peter

On 1/9/18, 11:25 AM, "yishayw"  wrote:

>+1
>Package
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdist.apac
>he.org%2Frepos%2Fdist%2Fdev%2Froyale%2F0.9.0%2Frc1%2Fapache-royale-0.9.0-s
>rc.zip&data=02%7C01%7Cpent%40adobe.com%7C3d9fb50850cb467abd7008d5577d8c3d%
>7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63659096712843&sdata=atfZ
>l5fC8wpCDP%2BlYnR4mMpicYp1U5hWa1rwIpQD%2FHs%3D&reserved=0
>Java 1.8
>OS: Windows 10 amd64 10.0
>Source kit signatures match: y
>Source kit builds: y
>README is ok: y
>RELEASE_NOTES is ok: y
>NOTICE is ok: y
>LICENSE is ok: y
>No unapproved licenses or archives: y
>No unapproved binaries: y
>
>Package
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdist.apac
>he.org%2Frepos%2Fdist%2Fdev%2Froyale%2F0.9.0%2Frc1%2Fbinaries%2Fapache-roy
>ale-0.9.0-bin.zip&data=02%7C01%7Cpent%40adobe.com%7C3d9fb50850cb467abd7008
>d5577d8c3d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63659096712843
>&sdata=BbB6Fw44FtoQFfpCz21ltS4riLtIFVdIpbikFj8NSbA%3D&reserved=0
>Binary kit signatures match: y
>NOTICE is ok: y
>LICENSE is ok: y
>No unapproved licenses or archives in binary package: y
>No unapproved binaries in binary package: y
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7C3
>d9fb50850cb467abd7008d5577d8c3d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C63659096712843&sdata=BNbkXU1BgsjBa%2FbrcDvlaju85d4YMQkxhXOfAKQPto8%
>3D&reserved=0



Re: [DISCUSS] Discuss Release Apache Royale 0.9.0 RC1

2018-01-09 Thread Peter Ent
Yes, I can get 11.1, but 27.0 is in the apache-royale-0.9.0 IDE-compatable
directory that got built with the installer script. It must have
downloaded the latest playerglobal.swc at that time. Seems natural to use
that rather than 11.1.

‹peter


On 1/9/18, 11:30 AM, "yishayw"  wrote:

>Peter, if you look in royale-asjs README isn't the following set of
>instructions consistent with your results?
>
>
>> ## Additional Prerequisites For SWF Output
>> 
>> ### *playerglobal.swc*
>> 
>> The Adobe Flash Player *playerglobal.swc* (version 11.1) can be
>>downloaded
>> from:
>> <
>> 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdownload.
>>macromedia.com%2Fget%2Fflashplayer%2Fupdaters%2F11%2Fplayerglobal11_1.swc
>>&data=02%7C01%7Cpent%40adobe.com%7C8c779caf932a47cf777308d5577e5686%7Cfa7
>>b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636511122512019296&sdata=odPGYyWh
>>21CRDzFmTOD4jGoxH%2F4vMMvEsN1nM%2FUgrPc%3D&reserved=0
>> >
>> First, create the following directory structure:
>> 
>> *[root directory]/player/11.1/*
>> 
>> Next, rename the downloaded SWC to '*playerglobal.swc*' and place it in
>> the above directory.
>
>
> 
>
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7C8
>c779caf932a47cf777308d5577e5686%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636511122512019296&sdata=R9GcRNvku0eA8SocejL%2FOyuUrrfU8pvMRe2KSzcWoC4%
>3D&reserved=0



Re: Slider Component

2018-01-09 Thread Peter Ent
I've tried the slider with Safari, Chrome, and Firefox. I guess I am not
understanding the problem. When I move the mouse into the slider thumb
control, press the mouse button down and drag, the thumb follows the mouse
immediately. It may snap to step positions along the track if the range
isn't very big (eg, 0..5). Is the problem that it snaps and doesn't glide
smoothly?

I've looked at sliders in other UIs and they do glide smoothly and most
often just stop where you leave them. Which can lead to readings like 3.25
on a scale of 0..5. Mostly those sliders only range from 0..1 and then the
app developer has to interpolate.

Let me know how to proceed.

‹peter

On 1/7/18, 12:51 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi Peter
>
>I could at last try the new slider and works far way better. Thanks for
>the
>great work!.
>
>I notice the problems raised by Justin. I think one of the problem is that
>thumb is not considering the mouse exact point of interaction and that
>cause the thumb "moves" or adapts to the mouse. I think this is right when
>mouse is outside the thumb, but when is "inside" I think thumb should
>start
>moving when user start dragging.
>
>I think this is so close to a functional slider so thanks for working on
>this!
>
>Carlos
>
>
>
>2017-12-15 4:12 GMT+01:00 Justin Mclean :
>
>> HI,
>>
>> Look like the new slider code has introduced a few new issues and one in
>> particular in easily discoverable by users [1]. Can someone take a look
>>at
>> this PR please. [2]
>>
>> Thanks,
>> Justin
>>
>> 1. 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>>om%2Fapache%2Froyale-asjs%2Fissues%2F102&data=02%7C01%7Cpent%40adobe.com%
>>7Cc37586e268914b061c2c08d555f76079%7Cfa7b1b5a7b34438794aed2c178decee1%7C0
>>%7C0%7C636509443332572042&sdata=ILU1l099EOgRcquay0yTvg%2Fmtms9jBSfoj12jlK
>>JreA%3D&reserved=0
>> 2. 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>>om%2Fapache%2Froyale-asjs%2Fpull%2F104&data=02%7C01%7Cpent%40adobe.com%7C
>>c37586e268914b061c2c08d555f76079%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7
>>C0%7C636509443332572042&sdata=MU0G1ExYtSMUw3yta2pWKcr7HCXSRO467d2CUseQyAU
>>%3D&reserved=0
>
>
>
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%7Cc37586e268914b061c2c08d555
>f76079%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636509443332572042&sda
>ta=Nin8sgwiGcjK0whqN7cscKZxN1baBwqJ5ylcveDW76E%3D&reserved=0



Re: [VOTE] Release Apache Royale 0.9.0 RC1

2018-01-09 Thread Peter Ent
-1 Binding

I ran the ApproveRoyale.xml script. The build failed for me here:

tests:
[mkdir] Created dir:
/Users/pent/temp/apache-royale-0.9.0-src/royale-compiler/compiler/target/ju
nit-reports
[mkdir] Created dir:
/Users/pent/temp/apache-royale-0.9.0-src/royale-compiler/compiler/target/ju
nit-temp
[junit] Running as.ASExpressionTests
[junit] looking for
/Users/pent/temp/apache-royale-0.9.0-src/royale-compiler/env.properties
[junit] environment property - FLEX_HOME = /Users/pent/dev/flex-sdk
[junit] environment property - PLAYERGLOBAL_HOME =
/Users/pent/Apache/apache-royale-0.9.0-bin/frameworks/libs/player
[junit] environment property - PLAYERGLOBAL_VERSION = 11.1
[junit] environment property - TLF_HOME = null
[junit] environment property - AIR_HOME = /Users/pent/Adobe/AdobeAIRSDK
[junit] environment property - FLASHPLAYER_DEBUGGER =
/Users/pent/Adobe/Flash Player Debugger.app/Contents/MacOS/Flash Player
Debugger
[junit] environment property - ASJS_HOME =
/Users/pent/temp/apache-royale-0.9.0-src/royale-asjs
[junit] environment property - GOOG_HOME =
/Users/pent/dev/closure-library
[junit] Generating test:
[junit] Compiling test:
[junit] 
-external-library-path=/Users/pent/temp/apache-royale-0.9.0-src/royale-comp
iler/compiler-externc/target/js.swc
/Users/pent/temp/apache-royale-0.9.0-src/royale-compiler/compiler/target/ju
nit-temp/ASExpressionTests8063697502781242593.as
[junit] 
[junit] 594 bytes written to
/Users/pent/temp/apache-royale-0.9.0-src/royale-compiler/compiler/target/ju
nit-temp/ASExpressionTests8063697502781242593.swf in 0.914 seconds
[junit] After compile:
[junit] Unexpected compilation problems:
[junit] 
[junit] Executing test:
[junit] [/Users/pent/Adobe/Flash Player
Debugger.app/Contents/MacOS/Flash Player Debugger,
/Users/pent/temp/apache-royale-0.9.0-src/royale-compiler/compiler/target/ju
nit-temp/ASExpressionTests8063697502781242593.swf]
[junit]  - Creating new FlashPlayer security trust file at:
/Users/pent/Library/Preferences/Macromedia/Flash
Player/#Security/FlashPlayerTrust/apache-royale-maven-plugin.cfg
[junit]  - Added directory
'/Users/pent/temp/apache-royale-0.9.0-src/royale-compiler/compiler/target/j
unit-temp' to FlashPlayer security trust file at:
/Users/pent/Library/Preferences/Macromedia/Flash
Player/#Security/FlashPlayerTrust/apache-royale-maven-plugin.cfg
[junit] java.lang.Exception: Process timed out

Side Note: I do not have playerglobal 11.1 installed; I have 27.0. To get
this script to work I added -Dplayerglobal.version=27.0 but notice that in
the JUNIT log PLAYERGLOBAL_VERSION is set to 11.1; I don't even have that
as an environment var when I run the script.


‹peter

On 1/8/18, 3:10 AM, "Alex Harui"  wrote:

>Hi,
>
>This is vote for the 0.9.0 release of Apache Royale.
>
>The release candidate can be found here;
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdist.apac
>he.org%2Frepos%2Fdist%2Fdev%2Froyale%2F0.9.0%2Frc1%2F&data=02%7C01%7Cpent%
>40adobe.com%7C43a698c842f94666e02208d5567c8e90%7Cfa7b1b5a7b34438794aed2c17
>8decee1%7C0%7C0%7C636510015345834782&sdata=q9tmPbVZpHzH5OiJOtfuYet2tZE5hzs
>MCO02iIw4Aro%3D&reserved=0
>
>Before voting please review the section,'What are the ASF requirements on
>approving a release?', at:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apache
>.org%2Fdev%2Frelease.html%23approving-a-release&data=02%7C01%7Cpent%40adob
>e.com%7C43a698c842f94666e02208d5567c8e90%7Cfa7b1b5a7b34438794aed2c178decee
>1%7C0%7C0%7C636510015345834782&sdata=rNloypEVtIyWM%2Bu9KTygfsLUWqurqhZcbsJ
>HSvGpKbE%3D&reserved=0
>
>At a minimum you would be expected to check that:
>- MD5 and signed packages are correct
>- README, RELEASE_NOTES, NOTICE and LICENSE files are all fine
>- That the build script completes successfully
>- That you can compile and cross-compile a simple example using the SDK.
>
>The source package is a combination of the 3 main Royale repos
>
>To use the binary package, unzip it into a folder.  The -js package is
>ready-to-use in an IDE or command-line.  If you need SWF output, use the
>-royale package and use Apache Ant to run the InstallAdobeSDKs script via:
>  ant -f InstallAdobeSDKs.xml
>
>You may also get the binary packages via NPM.  The -js package can be
>installed via:
>
>npm install 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdist.apac
>he.org%2Frepos%2Fdist%2Fdev%2Froyale%2F%24&data=02%7C01%7Cpent%40adobe.com
>%7C43a698c842f94666e02208d5567c8e90%7Cfa7b1b5a7b34438794aed2c178decee1%7C0
>%7C0%7C636510015345834782&sdata=CJ3N%2FfhAxmE3UHO4j2Fmn7Ab9VXlIDuK7MPCHRWC
>%2BB4%3D&reserved=0{release.version}/rc${rc}/bi
>naries/apache-royale-jsonly-${release.version}-bin.tar.gz -g
>
>The full package with SWF support can be installed via:
>
>npm install 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdist.apac
>he.org%2Frepos%2Fdist%2Fdev%2Froyale%2F%24&data=02%7C01%7Cp

Re: [Royale] ICollectionView

2018-01-08 Thread Peter Ent
I just pushed some changes that give you a more dynamic DataGrid.

The DataGrid should continue to work normally. But if you want to have it
respond to items being inserted and removed, then you can use the new
collection view beads.

I updated DataGridExample to illustrate how to do it PAYG. You change the
DataGrid's model to the new DataGridCollectionViewModel and then give each
column the DataItemRendererFactoryForCollectionView via CSS. This way the
majority of DataGrid uses that just display information will not have the
extra code required to respond to changes in the dataProvider. But if you
do use these new beads you can just insert or remove an item and the
columns in the DataGrid will reflect the changes. The DataGrid should also
remain selected unless you are removing the selected row.

—peter

On 1/7/18, 7:17 PM, "Peter Ent"  wrote:

>The DataGrid’s model’s dataProvider would be an ICollectionView which
>gets shared with each column list’s model’s dataProvider.  Changing the
>data should trigger events to have each list’s
>DataItemRendereFactoryForCollectionView update the itemRenderers.
>
>It should just work but I will be verifying that.
>
>Peter 
>
>
>> On Jan 7, 2018, at 11:38 AM, Piotr Zarzycki 
>>wrote:
>> 
>> Peter,
>> 
>> When you were saying that :"I had a reasonably working version of
>>DataGrid
>> for this..." - Do you mean usage of all that new stuff which helps
>>sorting
>> etc ? I'm working on the next example where DataGrid is being used. I
>>would
>> like to have also ability to update like we are doing that in list by
>> "DynamicUpdateItemRendererForArrayListData", but Grid is not a IList,
>>which
>> we are expecting in those Beads. What do you think what we should do in
>> order to achieve that ?
>> 
>> Thanks, Piotr
>> 
>> 
>> 2018-01-07 14:35 GMT+01:00 Piotr Zarzycki :
>> 
>>> Many Thanks!
>>> 
>>> I just noticed that Grid doesn't have selectedItem property. Not sure
>>>if
>>> it was for purpose.
>>> 
>>> Piotr
>>> 
>>> 2018-01-07 14:21 GMT+01:00 Peter Ent :
>>> 
>>>> I did notice that something was happening with the scrollbars. I will
>>>>look
>>>> into it.
>>>> ‹peter
>>>> 
>>>>> On 1/6/18, 8:52 AM, "piotrz"  wrote:
>>>>> 
>>>>> Hi Peter,
>>>>> 
>>>>> Just wanted to let you know that I have started use more extensively
>>>>> DataGrid and I have found that using FlexLayout gives a way better
>>>> results
>>>>> for DataGrid than VerticalFlexLayout/HorizotnalFlexLayout beads.
>>>>> 
>>>>> Ma last commit fixes issue with synchronizing width of column with
>>>>>width
>>>>> of
>>>>> header buttons in DataGrid.
>>>>> 
>>>>> However there is one problem with that - Scrollbar. Take a look into
>>>>>the
>>>>> DataGridExample where scrollbar appear. Last column is a bit shifted.
>>>>> Without scrollbar width is perfectly synced.
>>>>> 
>>>>> <https://na01.safelinks.protection.outlook.com/?url=http%
>>>> 3A%2F%2Fapache-ro
>>>>> yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fscroll_
>>>> bar_problem.png&
>>>>> data=02%7C01%7Cpent%40adobe.com%7C8c21b8b4e77145f0ef1f08d55
>>>> 50cc1c8%7Cfa7b1
>>>>> b5a7b34438794aed2c178decee1%7C0%7C0%7C636508435642510130&sd
>>>> ata=lqFyo5AO7td
>>>>> RcHECAn1KbiDZJOFiMi9bpfNLnFvDYgQ%3D&reserved=0>
>>>>> 
>>>>> If you have an idea how to fix that problem it would be great if you
>>>> could
>>>>> do it during your work on DataGrid.
>>>>> 
>>>>> Maybe we shouldn't actually fix that ?
>>>>> 
>>>>> Thanks, Piotr
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Sent from:
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%
>>>> 2F%2Fapache-roy
>>>>> 
>>>>>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com
>>>> %7C8
>>>>> c21b8b4e77145f0ef1f08d5550cc1c8%7Cfa7b1b5a7b34438794aed2c17
>>>> 8decee1%7C0%7C0
>>>>> %7C636508435642510130&sdata=%2Fd%2FchSnNgv9qO7qhIF%2B5e7uN0
>>>> U1nCJpZMjRGBwEQ
>>>>> cqs%3D&

Re: [Understanding PAYG] Button: Why is there no "text" or "icon" bead in order to compose a TextButton or IconButton?

2018-01-08 Thread Peter Ent
Keep in mind that a Royale Button's base UI element is platform dependent.
On the HTML side, the element is a  and there is no view bead to
construct it. TextButtonView is a Flash platform class that makes the
actual UI button with its up/down/over states represented as separate
basic elements.

Button is a tricky one because it is so basic to the platform. In other
components, the base UI element is a  (HTML) or a
DisplayObjectContainer (Flash) and then what you actually see and interact
with are its children which are created by view beads. Not really the case
for Button.

‹peter

On 1/7/18, 9:16 PM, "Alex Harui"  wrote:

>You would add TextButtonView or ImageButtonView.  Most Basic top-level
>components are an aggregation of a model and view and often a controller.
>Express aggregates "non-essential" and/or less type-safe beads as well to
>reduce the amount of bead-adding you have to do.
>
>Because the components have a model, the model needs to be PAYG and not
>have slots for data like labels and icons it doesn't need.  The most basic
>button on some platforms does not have text or an icon because the visuals
>can be specified in CSS via background-image.
>
>HTH,
>-Alex
>
>On 1/7/18, 1:33 PM, "Olaf Krueger"  wrote:
>
>>Hi,
>>just for my understanding:
>>
>>It seems to me that we can't compose a TextButton or an IconButton or a
>>TextIconButton by adding some beads to Button, something like this [1].
>>Instead, we have "TextButton" which feels for me a bit like an Express
>>component.
>>I just would like to know if I have a wrong understanding of PAYG [1] or
>>if
>>those suggested beads just not implemented because nobody did it so far.
>>
>>Thank you!
>>Olaf
>>
>>
>>[1]
>>
>>   
>>  
>>  
>>   
>>
>>
>>
>>
>>--
>>Sent from: 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-ro
>>y
>>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%
>>7
>>C6b87c66fff6b472d0c4b08d55616630d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>>7
>>C0%7C636509576506543643&sdata=DXTepjQ2JQlIO7IwMOtdfL2e30usYh3nMvgKSZ3mluE
>>%
>>3D&reserved=0
>



Re: [Royale] ICollectionView

2018-01-07 Thread Peter Ent
The DataGrid’s model’s dataProvider would be an ICollectionView which gets 
shared with each column list’s model’s dataProvider.  Changing the data should 
trigger events to have each list’s DataItemRendereFactoryForCollectionView 
update the itemRenderers. 

It should just work but I will be verifying that. 

Peter 


> On Jan 7, 2018, at 11:38 AM, Piotr Zarzycki  wrote:
> 
> Peter,
> 
> When you were saying that :"I had a reasonably working version of DataGrid
> for this..." - Do you mean usage of all that new stuff which helps sorting
> etc ? I'm working on the next example where DataGrid is being used. I would
> like to have also ability to update like we are doing that in list by
> "DynamicUpdateItemRendererForArrayListData", but Grid is not a IList, which
> we are expecting in those Beads. What do you think what we should do in
> order to achieve that ?
> 
> Thanks, Piotr
> 
> 
> 2018-01-07 14:35 GMT+01:00 Piotr Zarzycki :
> 
>> Many Thanks!
>> 
>> I just noticed that Grid doesn't have selectedItem property. Not sure if
>> it was for purpose.
>> 
>> Piotr
>> 
>> 2018-01-07 14:21 GMT+01:00 Peter Ent :
>> 
>>> I did notice that something was happening with the scrollbars. I will look
>>> into it.
>>> ‹peter
>>> 
>>>> On 1/6/18, 8:52 AM, "piotrz"  wrote:
>>>> 
>>>> Hi Peter,
>>>> 
>>>> Just wanted to let you know that I have started use more extensively
>>>> DataGrid and I have found that using FlexLayout gives a way better
>>> results
>>>> for DataGrid than VerticalFlexLayout/HorizotnalFlexLayout beads.
>>>> 
>>>> Ma last commit fixes issue with synchronizing width of column with width
>>>> of
>>>> header buttons in DataGrid.
>>>> 
>>>> However there is one problem with that - Scrollbar. Take a look into the
>>>> DataGridExample where scrollbar appear. Last column is a bit shifted.
>>>> Without scrollbar width is perfectly synced.
>>>> 
>>>> <https://na01.safelinks.protection.outlook.com/?url=http%
>>> 3A%2F%2Fapache-ro
>>>> yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fscroll_
>>> bar_problem.png&
>>>> data=02%7C01%7Cpent%40adobe.com%7C8c21b8b4e77145f0ef1f08d55
>>> 50cc1c8%7Cfa7b1
>>>> b5a7b34438794aed2c178decee1%7C0%7C0%7C636508435642510130&sd
>>> ata=lqFyo5AO7td
>>>> RcHECAn1KbiDZJOFiMi9bpfNLnFvDYgQ%3D&reserved=0>
>>>> 
>>>> If you have an idea how to fix that problem it would be great if you
>>> could
>>>> do it during your work on DataGrid.
>>>> 
>>>> Maybe we shouldn't actually fix that ?
>>>> 
>>>> Thanks, Piotr
>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Sent from:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%
>>> 2F%2Fapache-roy
>>>> ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com
>>> %7C8
>>>> c21b8b4e77145f0ef1f08d5550cc1c8%7Cfa7b1b5a7b34438794aed2c17
>>> 8decee1%7C0%7C0
>>>> %7C636508435642510130&sdata=%2Fd%2FchSnNgv9qO7qhIF%2B5e7uN0
>>> U1nCJpZMjRGBwEQ
>>>> cqs%3D&reserved=0
>>> 
>>> 
>> 
>> 
>> --
>> 
>> Piotr Zarzycki
>> 
>> Patreon: 
>> *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7Cec2acb7cf9ea4bf1d63308d555ed0cf6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636509398965142180&sdata=VB6%2FJI38K02X3lWGGDwoH%2FiB4LpPerWLwZFGyukRT0w%3D&reserved=0
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7Cec2acb7cf9ea4bf1d63308d555ed0cf6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636509398965142180&sdata=VB6%2FJI38K02X3lWGGDwoH%2FiB4LpPerWLwZFGyukRT0w%3D&reserved=0>*
>> 
> 
> 
> 
> -- 
> 
> Piotr Zarzycki
> 
> Patreon: 
> *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7Cec2acb7cf9ea4bf1d63308d555ed0cf6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636509398965142180&sdata=VB6%2FJI38K02X3lWGGDwoH%2FiB4LpPerWLwZFGyukRT0w%3D&reserved=0
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7Cec2acb7cf9ea4bf1d63308d555ed0cf6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636509398965142180&sdata=VB6%2FJI38K02X3lWGGDwoH%2FiB4LpPerWLwZFGyukRT0w%3D&reserved=0>*


Re: [Royale] ICollectionView

2018-01-07 Thread Peter Ent
I did notice that something was happening with the scrollbars. I will look
into it.
‹peter

On 1/6/18, 8:52 AM, "piotrz"  wrote:

>Hi Peter,
>
>Just wanted to let you know that I have started use more extensively
>DataGrid and I have found that using FlexLayout gives a way better results
>for DataGrid than VerticalFlexLayout/HorizotnalFlexLayout beads.
>
>Ma last commit fixes issue with synchronizing width of column with width
>of
>header buttons in DataGrid.
>
>However there is one problem with that - Scrollbar. Take a look into the
>DataGridExample where scrollbar appear. Last column is a bit shifted.
>Without scrollbar width is perfectly synced.
>
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fscroll_bar_problem.png&
>data=02%7C01%7Cpent%40adobe.com%7C8c21b8b4e77145f0ef1f08d5550cc1c8%7Cfa7b1
>b5a7b34438794aed2c178decee1%7C0%7C0%7C636508435642510130&sdata=lqFyo5AO7td
>RcHECAn1KbiDZJOFiMi9bpfNLnFvDYgQ%3D&reserved=0>
>
>If you have an idea how to fix that problem it would be great if you could
>do it during your work on DataGrid.
>
>Maybe we shouldn't actually fix that ?
>
>Thanks, Piotr
>
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7C8
>c21b8b4e77145f0ef1f08d5550cc1c8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636508435642510130&sdata=%2Fd%2FchSnNgv9qO7qhIF%2B5e7uN0U1nCJpZMjRGBwEQ
>cqs%3D&reserved=0



[Royale] ICollectionView

2018-01-05 Thread Peter Ent
Hi,

I've pushed a change to the develop branch that should make it easier to deal 
with dynamic data sets. The heart of this is ICollectionView, in the 
Collections project. This interface describes a class that allows items to be 
added, removed, and updated dynamically but can also front a more complex data 
set. For example, you could make a class, SortedData, which implements 
ICollectionView. Internally, the class might have an ArrayList that holds the 
original data. When you sort it, that creates an internal sorted list, leaving 
the original untouched. The SortedData's implementation of ICollectionView 
works only with the internal sorted list.

I extended ArrayList to implement ICollectionView.

In the Basic project you will find a new model, 
SingleSelectionCollectionViewModel. This model is similar to 
ArrayListSelectionModel, but expects its dataProvider to implement 
ICollectionView.

Also in the Basic project you will find a new bead, 
DataItemRendererFactoryForCollectionView. This bead assumes the model's 
dataProvider implements ICollectionView. It also responds to the insert, 
remove, and update events on the collection, generating new itemRenderer 
instances as needed or removing them.

Back in the Collection project you will find a new collection, TreeData. This 
class also implements ICollectionView. TreeData is composed of HierarchicalData 
(items with nested children). When accessed via the ICollectionView interface, 
TreeData responds with a "flattened" view of the structured data. For example, 
if you have nodes A and B and node A has children A1, A2 and node B has 
children B1, B2, and B3, if you "open" node B, the flattened version of this 
will appear to be an array of [Node A, Node B, Node B1, NodeB3, NodeB3].

Returning to the Basic project, DataItemRendererFactoryForHierarchicalData now 
assumes the dataProvider in the model is an ICollectionView (implemented by 
TreeData in Collections) object. In other words, Tree now uses ICollectionView 
and the associated beads.The TreeExample shows this in action. You can also 
easily use this with List by setting the List's model to 
SingleSelectionCollectionViewModel and its data mapper to 
DataItemRendererFactoryForCollectionView.

I had a reasonably working version of DataGrid for this, but I backed out the 
change temporarily. I will get that working again next week.

Regards,
Peter Ent
Adobe Systems/Apache Royale Project


Re: [Royale] Collection work

2018-01-03 Thread Peter Ent
I pushed a change to ASJS develop branch that should fix the
selection/rollover issue for the Dynamic beads for ArrayList. After
thinking about Alex's statement regarding selection and adding/removing, I
ran some more tests and discovered that I had inadvertently reset the
selection in those beads. After removing that code, and adding code to
re-index the itemRenderers after they have shifted, both selection and
rollOver seem to be fixed.

—peter

On 1/3/18, 3:08 PM, "Piotr Zarzycki"  wrote:

>It looks good to me.
>
>
>2018-01-03 20:39 GMT+01:00 Peter Ent :
>
>> Well, that bead only dispatches "dataProvidedChanged" regardless of the
>> reason. And it does so after the data as changed. We want to know before
>> the data changes so we can save the selection and then after the data
>> changes so it can be restored, if possible. We need something to send
>>out
>> an event prior to the changes.
>>
>> ArrayList only sends post-change events. If we listen for when the
>> selectedIndex changes, then we can keep a reference to the item
>>selected.
>> When ArrayList is updated and sends, say a "itemAdded" event, the model
>> must not change the selectedIndex (thus dispatching a event and wiping
>>out
>> our save).
>>
>> I think the right way to do this is:
>>
>> ArrayList - sends itemAdded, itemRemoved, itemUpdated events. This is
>>what
>> it does now.
>>
>> DynamicArrayList - extends ArrayList, and sends itemAdding,
>>itemRemoving,
>> and itemUpdating events prior to making the changes and then calls the
>> super function to dispatch the normal post-change event.
>>
>> DynamicArrayListSelectionModel listens for the "-ing" events and saves
>>the
>> current selection. When it receives the "-ed" event, it restores the
>> selection.
>>
>> I think this will work and should not be disruptive.
>>
>> On 1/3/18, 12:26 PM, "Piotr Zarzycki"  wrote:
>>
>> >Hi Peter,
>> >
>> >What about DataProviderItemsChangeNotifier - It exactly doing what you
>> are
>> >saying and what that restoration bead needs. What do you think ?
>> >
>> >Thanks, Piotr
>> >
>> >
>> >2018-01-03 18:05 GMT+01:00 Peter Ent :
>> >
>> >> I've spent this morning wrestling with this.
>> >>
>> >> Right now when a model (eg, ArraySelectionModel,
>> >>ArrayListSelectionModel)
>> >> has its dataProvider replaced, it will set the selectedIndex to -1
>>(and
>> >> selectedItem to null) if the dataProvider is being set to null;
>> >>otherwise
>> >> it leaves the values unchanged unless the current value exceeds the
>>size
>> >> of the new dataProvider.
>> >>
>> >> A typical way to change things is to update the dataProvider and then
>> >>set
>> >> the list.dataProvider to null (selectedIndex becomes -1, dispatches
>> >> "selectedIndexChanged") followed setting list.dataProvider back to
>>the
>> >> original dataProvider. This is done because we did not have a dynamic
>> >> system. Reseting the selection in this cause falls on the application
>> >> writer.
>> >>
>> >> For dynamic data, I think we also need a dynamic model (eg,
>> >> DynamicCollectionViewSelectionModel) which is tuned into the needs
>>of a
>> >> dynamic system.
>> >>
>> >> Before changing a dataProvider, the
>>DyanmicCollectionViewSelectionModel
>> >> will dispatch a "dataProviderChanging" event. This would give a
>> >>selection
>> >> restoration bead the opportunity to store the current selection. Then
>> >>upon
>> >> receiving the "dataProviderChanged" event, restore the selection.
>> >>
>> >> Unfortunately, the selection restoration bead still does not know
>>when
>> >>an
>> >> item will be added or removed. While the model can listen for a
>>complete
>> >> replacement of the dataProvider and warning with a
>> >>"dataProviderChanging"
>> >> event, then is no "itemAdding" or "itemRemoving" event prior to an
>>item
>> >> being added or removed. To do this, we will need to having a new
>> >> collection view that extends ArrayList and dispatches those extra
>> >>events.
>> >> Then the selection restoration bead can operate correctly.
>>

Re: [Royale] Collection work

2018-01-03 Thread Peter Ent
ok

On 1/3/18, 3:33 PM, "Alex Harui"  wrote:

>Peter, 
>
>I'm not convinced you need itemAdding events.  And item can be added and
>removed without impacting selection.  Selection management should be
>independent of changes to the data provider, and it is up to selection
>management to interpret itemAdded/itemRemoved to some selection change.
>It is that selection management code that needs to dispatch a "changing"
>before "change" or "selectionChanging" before "selectionChange".
>
>My 2 cents,
>-Alex
>
>On 1/3/18, 11:39 AM, "Peter Ent"  wrote:
>
>>Well, that bead only dispatches "dataProvidedChanged" regardless of the
>>reason. And it does so after the data as changed. We want to know before
>>the data changes so we can save the selection and then after the data
>>changes so it can be restored, if possible. We need something to send out
>>an event prior to the changes.
>>
>>ArrayList only sends post-change events. If we listen for when the
>>selectedIndex changes, then we can keep a reference to the item selected.
>>When ArrayList is updated and sends, say a "itemAdded" event, the model
>>must not change the selectedIndex (thus dispatching a event and wiping
>>out
>>our save). 
>>
>>I think the right way to do this is:
>>
>>ArrayList - sends itemAdded, itemRemoved, itemUpdated events. This is
>>what
>>it does now.
>>
>>DynamicArrayList - extends ArrayList, and sends itemAdding, itemRemoving,
>>and itemUpdating events prior to making the changes and then calls the
>>super function to dispatch the normal post-change event.
>>
>>DynamicArrayListSelectionModel listens for the "-ing" events and saves
>>the
>>current selection. When it receives the "-ed" event, it restores the
>>selection.
>>
>>I think this will work and should not be disruptive.
>>
>>On 1/3/18, 12:26 PM, "Piotr Zarzycki"  wrote:
>>
>>>Hi Peter,
>>>
>>>What about DataProviderItemsChangeNotifier - It exactly doing what you
>>>are
>>>saying and what that restoration bead needs. What do you think ?
>>>
>>>Thanks, Piotr
>>>
>>>
>>>2018-01-03 18:05 GMT+01:00 Peter Ent :
>>>
>>>> I've spent this morning wrestling with this.
>>>>
>>>> Right now when a model (eg, ArraySelectionModel,
>>>>ArrayListSelectionModel)
>>>> has its dataProvider replaced, it will set the selectedIndex to -1
>>>>(and
>>>> selectedItem to null) if the dataProvider is being set to null;
>>>>otherwise
>>>> it leaves the values unchanged unless the current value exceeds the
>>>>size
>>>> of the new dataProvider.
>>>>
>>>> A typical way to change things is to update the dataProvider and then
>>>>set
>>>> the list.dataProvider to null (selectedIndex becomes -1, dispatches
>>>> "selectedIndexChanged") followed setting list.dataProvider back to the
>>>> original dataProvider. This is done because we did not have a dynamic
>>>> system. Reseting the selection in this cause falls on the application
>>>> writer.
>>>>
>>>> For dynamic data, I think we also need a dynamic model (eg,
>>>> DynamicCollectionViewSelectionModel) which is tuned into the needs of
>>>>a
>>>> dynamic system.
>>>>
>>>> Before changing a dataProvider, the
>>>>DyanmicCollectionViewSelectionModel
>>>> will dispatch a "dataProviderChanging" event. This would give a
>>>>selection
>>>> restoration bead the opportunity to store the current selection. Then
>>>>upon
>>>> receiving the "dataProviderChanged" event, restore the selection.
>>>>
>>>> Unfortunately, the selection restoration bead still does not know when
>>>>an
>>>> item will be added or removed. While the model can listen for a
>>>>complete
>>>> replacement of the dataProvider and warning with a
>>>>"dataProviderChanging"
>>>> event, then is no "itemAdding" or "itemRemoving" event prior to an
>>>>item
>>>> being added or removed. To do this, we will need to having a new
>>>> collection view that extends ArrayList and dispatches those extra
>>>>events.
>>>> Then the selection restoration bead can operate correctly.
>>>&

Re: [Royale] Collection work

2018-01-03 Thread Peter Ent
Well, that bead only dispatches "dataProvidedChanged" regardless of the
reason. And it does so after the data as changed. We want to know before
the data changes so we can save the selection and then after the data
changes so it can be restored, if possible. We need something to send out
an event prior to the changes.

ArrayList only sends post-change events. If we listen for when the
selectedIndex changes, then we can keep a reference to the item selected.
When ArrayList is updated and sends, say a "itemAdded" event, the model
must not change the selectedIndex (thus dispatching a event and wiping out
our save). 

I think the right way to do this is:

ArrayList - sends itemAdded, itemRemoved, itemUpdated events. This is what
it does now.

DynamicArrayList - extends ArrayList, and sends itemAdding, itemRemoving,
and itemUpdating events prior to making the changes and then calls the
super function to dispatch the normal post-change event.

DynamicArrayListSelectionModel listens for the "-ing" events and saves the
current selection. When it receives the "-ed" event, it restores the
selection.

I think this will work and should not be disruptive.

On 1/3/18, 12:26 PM, "Piotr Zarzycki"  wrote:

>Hi Peter,
>
>What about DataProviderItemsChangeNotifier - It exactly doing what you are
>saying and what that restoration bead needs. What do you think ?
>
>Thanks, Piotr
>
>
>2018-01-03 18:05 GMT+01:00 Peter Ent :
>
>> I've spent this morning wrestling with this.
>>
>> Right now when a model (eg, ArraySelectionModel,
>>ArrayListSelectionModel)
>> has its dataProvider replaced, it will set the selectedIndex to -1 (and
>> selectedItem to null) if the dataProvider is being set to null;
>>otherwise
>> it leaves the values unchanged unless the current value exceeds the size
>> of the new dataProvider.
>>
>> A typical way to change things is to update the dataProvider and then
>>set
>> the list.dataProvider to null (selectedIndex becomes -1, dispatches
>> "selectedIndexChanged") followed setting list.dataProvider back to the
>> original dataProvider. This is done because we did not have a dynamic
>> system. Reseting the selection in this cause falls on the application
>> writer.
>>
>> For dynamic data, I think we also need a dynamic model (eg,
>> DynamicCollectionViewSelectionModel) which is tuned into the needs of a
>> dynamic system.
>>
>> Before changing a dataProvider, the DyanmicCollectionViewSelectionModel
>> will dispatch a "dataProviderChanging" event. This would give a
>>selection
>> restoration bead the opportunity to store the current selection. Then
>>upon
>> receiving the "dataProviderChanged" event, restore the selection.
>>
>> Unfortunately, the selection restoration bead still does not know when
>>an
>> item will be added or removed. While the model can listen for a complete
>> replacement of the dataProvider and warning with a
>>"dataProviderChanging"
>> event, then is no "itemAdding" or "itemRemoving" event prior to an item
>> being added or removed. To do this, we will need to having a new
>> collection view that extends ArrayList and dispatches those extra
>>events.
>> Then the selection restoration bead can operate correctly.
>>
>> This is my current thinking.
>>
>> —peter
>>
>>
>> On 1/2/18, 4:43 PM, "Alex Harui"  wrote:
>>
>> >And this one reason we have beads as a pattern.  There is no one right
>>way
>> >to preserve selection and selection should not always be preserved for
>> >certain kinds of data provider changes.  So, create a bead that
>>performs
>> >the selection preservation you need and give it a name that makes it
>>clear
>> >what it does.  Then others can create similar beads for other
>>strategies.
>> >
>> >My 2 cents,
>> >-Alex
>> >
>> >On 1/2/18, 1:26 PM, "Piotr Zarzycki"  wrote:
>> >
>> >>Peter,
>> >>
>> >>You didn't misread, but my thoughts probably didn't far away into
>>problem
>> >>resolution. That's why I was surprise why I haven't thought about
>> >>preserving selection. :)
>> >>
>> >>Thanks, Piotr
>> >>
>> >>
>> >>2018-01-02 22:10 GMT+01:00 Peter Ent :
>> >>
>> >>> I thought because you mentioned that rollover and selection were
>>messed
>> >>> up, that was the thing needing attention. I must have misread your
>> &g

Re: [Royale] Collection work

2018-01-03 Thread Peter Ent
I've spent this morning wrestling with this.

Right now when a model (eg, ArraySelectionModel, ArrayListSelectionModel)
has its dataProvider replaced, it will set the selectedIndex to -1 (and
selectedItem to null) if the dataProvider is being set to null; otherwise
it leaves the values unchanged unless the current value exceeds the size
of the new dataProvider.

A typical way to change things is to update the dataProvider and then set
the list.dataProvider to null (selectedIndex becomes -1, dispatches
"selectedIndexChanged") followed setting list.dataProvider back to the
original dataProvider. This is done because we did not have a dynamic
system. Reseting the selection in this cause falls on the application
writer.

For dynamic data, I think we also need a dynamic model (eg,
DynamicCollectionViewSelectionModel) which is tuned into the needs of a
dynamic system.

Before changing a dataProvider, the DyanmicCollectionViewSelectionModel
will dispatch a "dataProviderChanging" event. This would give a selection
restoration bead the opportunity to store the current selection. Then upon
receiving the "dataProviderChanged" event, restore the selection.

Unfortunately, the selection restoration bead still does not know when an
item will be added or removed. While the model can listen for a complete
replacement of the dataProvider and warning with a "dataProviderChanging"
event, then is no "itemAdding" or "itemRemoving" event prior to an item
being added or removed. To do this, we will need to having a new
collection view that extends ArrayList and dispatches those extra events.
Then the selection restoration bead can operate correctly.

This is my current thinking.

—peter


On 1/2/18, 4:43 PM, "Alex Harui"  wrote:

>And this one reason we have beads as a pattern.  There is no one right way
>to preserve selection and selection should not always be preserved for
>certain kinds of data provider changes.  So, create a bead that performs
>the selection preservation you need and give it a name that makes it clear
>what it does.  Then others can create similar beads for other strategies.
>
>My 2 cents,
>-Alex
>
>On 1/2/18, 1:26 PM, "Piotr Zarzycki"  wrote:
>
>>Peter,
>>
>>You didn't misread, but my thoughts probably didn't far away into problem
>>resolution. That's why I was surprise why I haven't thought about
>>preserving selection. :)
>>
>>Thanks, Piotr
>>
>>
>>2018-01-02 22:10 GMT+01:00 Peter Ent :
>>
>>> I thought because you mentioned that rollover and selection were messed
>>> up, that was the thing needing attention. I must have misread your
>>>email;
>>> I'll go back.
>>>
>>> In the meantime, I have a Button that inserts an item into the
>>> dataProvider. Before doing this I am:
>>>
>>> var oldSelection:Object = list.selectedItem; // or selectedIndex??
>>>
>>>
>>> then update the dataProvider by inserting an item into it. For a List
>>>with
>>> the standard bead set, I have to:
>>>
>>> list.dataProvider = null;
>>> list.dataProvider = applicationModel.dataProvider;
>>>
>>> After that, I just restore the selection: list.dataProvider =
>>>oldSelection
>>>
>>> Need to figure out if the dataProvider will change, save the selection,
>>> allow the change, then restore it.
>>>
>>> —peter
>>>
>>> On 1/2/18, 3:58 PM, "Piotr Zarzycki"  wrote:
>>>
>>> >How are you doing that preservation, by simply saving item somewhere
>>> >before
>>> >remove/add operation ?
>>> >
>>> >I'm not following the part where we you wanted some opinion. Actually
>>>in
>>> >case of refreshing I didn't even thing about saving selection, but
>>>it's
>>> >true that it should happen! It's surprises me that in my app I forgot
>>> >about
>>> >that. :)
>>> >
>>> >Thanks, Piotr
>>> >
>>> >
>>> >2018-01-02 21:44 GMT+01:00 Peter Ent :
>>> >
>>> >> The first task is to determine if a list's selectedIndex or
>>>selectedItem
>>> >> should be preserved.
>>> >>
>>> >> For selectedIndex, adding or removing an item will get the same row
>>> >> selected until that row no longer exists.
>>> >>
>>> >> For selectedItem, adding or removing an item will keep the same item
>>> >> selected until that item no longer exists. For example, if the 4th
>>>it

Re: [Royale] Collection work

2018-01-02 Thread Peter Ent
I thought because you mentioned that rollover and selection were messed
up, that was the thing needing attention. I must have misread your email;
I'll go back.

In the meantime, I have a Button that inserts an item into the
dataProvider. Before doing this I am:

var oldSelection:Object = list.selectedItem; // or selectedIndex??


then update the dataProvider by inserting an item into it. For a List with
the standard bead set, I have to:

list.dataProvider = null;
list.dataProvider = applicationModel.dataProvider;

After that, I just restore the selection: list.dataProvider = oldSelection

Need to figure out if the dataProvider will change, save the selection,
allow the change, then restore it.

—peter

On 1/2/18, 3:58 PM, "Piotr Zarzycki"  wrote:

>How are you doing that preservation, by simply saving item somewhere
>before
>remove/add operation ?
>
>I'm not following the part where we you wanted some opinion. Actually in
>case of refreshing I didn't even thing about saving selection, but it's
>true that it should happen! It's surprises me that in my app I forgot
>about
>that. :)
>
>Thanks, Piotr
>
>
>2018-01-02 21:44 GMT+01:00 Peter Ent :
>
>> The first task is to determine if a list's selectedIndex or selectedItem
>> should be preserved.
>>
>> For selectedIndex, adding or removing an item will get the same row
>> selected until that row no longer exists.
>>
>> For selectedItem, adding or removing an item will keep the same item
>> selected until that item no longer exists. For example, if the 4th item
>>is
>> "red" and you insert an item at position 2, "red" remains selected by
>> shifts down a row.
>>
>> I can see this working both ways.
>>
>> In either case, first preserving the selection (index or item) before
>>the
>> add or remove and then restoring it works fine - I did this in
>>application
>> code, not in framework code. Works very nicely, as a matter of fact.
>>Works
>> for both traditional lists and dynamic lists with the new beads (yours,
>> Piotr, or my new collection ones). Its *very simple* code.
>>
>> So once we decide which selection is preserved, we need to decide where
>> that goes. Even though this code is just a couple of lines, in the PAYG
>> world, not every app needs this so it must go into additional beads
>>since
>> it is added functionality.
>>
>> —peter
>>
>>
>>
>>
>>
>> On 1/2/18, 1:31 PM, "Piotr Zarzycki"  wrote:
>>
>> >Hi Peter,
>> >
>> >Welcome after vacation! I sense all ideas when I'm working with that
>> >stuff.
>> >I think you will see the issue with indexes, even if it's not the case
>> >with
>> >removing from the list. I will wait for your review with that index
>> >refresh.
>> >
>> >Thank you so much! :)
>> >
>> >
>> >2018-01-02 19:10 GMT+01:00 Peter Ent :
>> >
>> >> Hi,
>> >>
>> >> Catching up and building stuff. I'm going to repeat some things for
>>the
>> >> befit of anyone joining Royale for 2018 (and to refresh my own
>>thoughts
>> >> coming off of holiday!).
>> >>
>> >> The initial idea of List and related classes was their beads were to
>>be
>> >> almost static. You'd have data that you would use to create the
>> >> dataProvider to the list and when set, would cause the itemRenderers
>>to
>> >>be
>> >> deleted and replaced. Even something as simple as adding new data to
>>the
>> >> end of the dataProvider would require this reset: you'd have to clear
>> >>the
>> >> dataProvider (list.dataProver = null) and set it again or create a
>> >> completely new dataProvider and set that to the list.
>> >>
>> >> The selected item and index should, in this case, be cleared. I'd
>>have
>> >>to
>> >> run a test to see if that really happens as I don't remember. If you
>> >>want
>> >> to reset them back (assuming that index still existed) you would
>>write a
>> >> bead to do it.
>> >>
>> >> Now we are at the dynamic stage where we want to handle runtime
>>updates
>> >>to
>> >> the dataProvider and create just new itemRenderers and insert them or
>> >> remove itemRenderers when data is deleted from the dataProvider.
>> >>
>> >> Alex believes that the initial creation and insertions are the most
&

Re: [Royale] Collection work

2018-01-02 Thread Peter Ent
The first task is to determine if a list's selectedIndex or selectedItem
should be preserved.

For selectedIndex, adding or removing an item will get the same row
selected until that row no longer exists.

For selectedItem, adding or removing an item will keep the same item
selected until that item no longer exists. For example, if the 4th item is
"red" and you insert an item at position 2, "red" remains selected by
shifts down a row.

I can see this working both ways.

In either case, first preserving the selection (index or item) before the
add or remove and then restoring it works fine - I did this in application
code, not in framework code. Works very nicely, as a matter of fact. Works
for both traditional lists and dynamic lists with the new beads (yours,
Piotr, or my new collection ones). Its *very simple* code.

So once we decide which selection is preserved, we need to decide where
that goes. Even though this code is just a couple of lines, in the PAYG
world, not every app needs this so it must go into additional beads since
it is added functionality.

—peter





On 1/2/18, 1:31 PM, "Piotr Zarzycki"  wrote:

>Hi Peter,
>
>Welcome after vacation! I sense all ideas when I'm working with that
>stuff.
>I think you will see the issue with indexes, even if it's not the case
>with
>removing from the list. I will wait for your review with that index
>refresh.
>
>Thank you so much! :)
>
>
>2018-01-02 19:10 GMT+01:00 Peter Ent :
>
>> Hi,
>>
>> Catching up and building stuff. I'm going to repeat some things for the
>> befit of anyone joining Royale for 2018 (and to refresh my own thoughts
>> coming off of holiday!).
>>
>> The initial idea of List and related classes was their beads were to be
>> almost static. You'd have data that you would use to create the
>> dataProvider to the list and when set, would cause the itemRenderers to
>>be
>> deleted and replaced. Even something as simple as adding new data to the
>> end of the dataProvider would require this reset: you'd have to clear
>>the
>> dataProvider (list.dataProver = null) and set it again or create a
>> completely new dataProvider and set that to the list.
>>
>> The selected item and index should, in this case, be cleared. I'd have
>>to
>> run a test to see if that really happens as I don't remember. If you
>>want
>> to reset them back (assuming that index still existed) you would write a
>> bead to do it.
>>
>> Now we are at the dynamic stage where we want to handle runtime updates
>>to
>> the dataProvider and create just new itemRenderers and insert them or
>> remove itemRenderers when data is deleted from the dataProvider.
>>
>> Alex believes that the initial creation and insertions are the most
>>common
>> of the dynamic actions; removals being less common. As such in the PAYG
>> world you would have a bead that handled a replacement of the
>>dataProvider
>> (which covers the initialization step) and a bead which handled
>>additions
>> and a bead to handle removals. There's a lot of duplication of code in
>> these and under a non-PAYG system you'd just combine these into a single
>> bead to do initialize, add, and removal.
>>
>> In the dynamic beads, the selection should be preserved. That
>>information
>> is stored in the model. The model doesn't do much else accept keep the
>> data. The standard view bead would not know about these extra events so
>> yes, we'd need another view bead to intercept those events and re-apply
>>or
>> adjust the selection.
>>
>> ‹peter
>>
>> On 12/30/17, 4:29 PM, "Piotr Zarzycki" 
>>wrote:
>>
>> >Peter,
>> >
>> >I have figure out what is wrong in case of List. I reported in the
>> >previous
>> >email that in the ListExample once you remove one item, something is
>>wrong
>> >with selection. Issue happened when you removing item in the middle of
>> >collection.
>> >
>> >Let's say that you have 5 items and you are removing item with index =
>>2.
>> >Removing will work properly, but StringItemRenderer ->
>> >DataItemRenderer -> UIItemRendererBase
>> ><- has property "index" which is basically not being refreshed after
>> >remove. In the result renderers has following indexes:
>> >
>> >0,
>> >1,
>> >3,
>> >4
>> >
>> >Which is messes up selection and roll over color changes. How actually
>>fix
>> >that ? My first thought was that ListView should li

Re: [Royale] Collection work

2018-01-02 Thread Peter Ent
Hi,

Catching up and building stuff. I'm going to repeat some things for the
befit of anyone joining Royale for 2018 (and to refresh my own thoughts
coming off of holiday!).

The initial idea of List and related classes was their beads were to be
almost static. You'd have data that you would use to create the
dataProvider to the list and when set, would cause the itemRenderers to be
deleted and replaced. Even something as simple as adding new data to the
end of the dataProvider would require this reset: you'd have to clear the
dataProvider (list.dataProver = null) and set it again or create a
completely new dataProvider and set that to the list.

The selected item and index should, in this case, be cleared. I'd have to
run a test to see if that really happens as I don't remember. If you want
to reset them back (assuming that index still existed) you would write a
bead to do it.

Now we are at the dynamic stage where we want to handle runtime updates to
the dataProvider and create just new itemRenderers and insert them or
remove itemRenderers when data is deleted from the dataProvider.

Alex believes that the initial creation and insertions are the most common
of the dynamic actions; removals being less common. As such in the PAYG
world you would have a bead that handled a replacement of the dataProvider
(which covers the initialization step) and a bead which handled additions
and a bead to handle removals. There's a lot of duplication of code in
these and under a non-PAYG system you'd just combine these into a single
bead to do initialize, add, and removal.

In the dynamic beads, the selection should be preserved. That information
is stored in the model. The model doesn't do much else accept keep the
data. The standard view bead would not know about these extra events so
yes, we'd need another view bead to intercept those events and re-apply or
adjust the selection.

‹peter 

On 12/30/17, 4:29 PM, "Piotr Zarzycki"  wrote:

>Peter,
>
>I have figure out what is wrong in case of List. I reported in the
>previous
>email that in the ListExample once you remove one item, something is wrong
>with selection. Issue happened when you removing item in the middle of
>collection.
>
>Let's say that you have 5 items and you are removing item with index = 2.
>Removing will work properly, but StringItemRenderer ->
>DataItemRenderer -> UIItemRendererBase
><- has property "index" which is basically not being refreshed after
>remove. In the result renderers has following indexes:
>
>0,
>1,
>3,
>4
>
>Which is messes up selection and roll over color changes. How actually fix
>that ? My first thought was that ListView should listen for "layoutNeeded"
>(we are dispatching that event after remove, add etc.) and refresh indexes
>of all renderers.
>
>The second thought is that ListView should listen for remove event, where
>we will have index of removed row, so we will be able loop through part of
>the collection and refresh rest of the indexes. It is more efficient, but
>maybe this is job for new type of View (bead) - ListRemoveView bead ?
>
>Looking forward to your thought once you get back from Vacation. :)
>
>Thanks, Piotr
>
>
>
>2017-12-22 15:05 GMT+01:00 Piotr Zarzycki :
>
>> Hi Peter,
>>
>> I haven't checked your branch yet, but I just pushed couple of things to
>> the develop which I needed for my examples. Here is the list of beads
>>which
>> we currently have and can be used for List. I think names are self
>> explanatory.
>>
>> DynamicAddItemRendererForArrayListData
>>
>> DynamicUpdateItemRendererForArrayListData
>>
>> DynamicRemoveItemRendererForArrayListData
>>
>> DynamicRemoveAllItemRendererForArrayListData
>>
>> DynamicRemoveAllByNullItemRendererForArrayListData
>>
>> All beads above should be used once you set for your list:
>>IDataProviderItemRendererMapper:
>>ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForAr
>>rayList")
>>
>> We have also DynamicItemsRendererFactoryForArrayListData - which is
>>doing actually two things. Create all items once someone set
>>dataProvider (the same logic as in DataItemRendererFactoryForArrayList)
>>AND handle adding to
>>
>> ArrayList (the same logic as in DynamicAddItemRendererForArrayListData)
>>- It duplicates logic from those both beads.
>>
>>
>> Two Scenarios with DynamicItemsRendererFactoryForArrayListData:
>>
>> 1) If we use DynamicItemsRendererFactoryForArrayListData simply in the
>>List as it is in our ListExample [1] we don't have to remember to setup:
>>
>> IDataProviderItemRendererMapper:
>>ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForAr
>>rayList").
>>
>> However in that scenario we will have in List totally useless bead
>>DataItemRendererFactoryForArray which is being added default to the List.
>>
>> 2) If we use DynamicItemsRendererFactoryForArrayListData and we add in
>>CSS  IDataProviderItemRendererMapper:
>>ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForAr
>>rayList")
>>
>> I'm not sure what ca

Re: [Royale] Collection work

2017-12-19 Thread Peter Ent
The branch is pushed. It is not in features because I don't want it
building and possibly failing. Its just for looking. I'll dispose of the
branch once things are integrated.

‹peter

On 12/18/17, 5:31 PM, "Piotr Zarzycki"  wrote:

>Hi Peter,
>
>It looks pretty exciting! This new stuff may help with some sorting. Push
>the branch and maybe I will look if not I will definitely do this in the
>new year.
>
>Thank you and wish you all the best!
>Piotr
>
>
>
>2017-12-18 23:24 GMT+01:00 Peter Ent :
>
>> Piotr (and anyone else interested):
>>
>> Adobe has its winter break next week but I am leaving earlier (tomorrow)
>> and will be back working on the project in January.
>>
>> I have created a temporary branch, CollectionData, with my work
>> in-progress. While this branch is incomplete, you might be interested in
>> looking into it.
>>
>> Here's a summary:
>>
>> I created ICollectionView (Collections project), an interface that
>>allows
>> for inserting, removing items from a collection. ArrayList implements
>>it.
>> The idea is that you might want to create a collection that's a subset
>>or a
>> change to data without destroying or modifying the original data. For
>> example, maybe you want to filter the original data or sort it.
>>
>> I created TreeData (Collections project), which implements
>> ICollectionView. TreeData takes in HierarchicalData and converts it to a
>> FlattenedList (extends ArrayList). TreeData implements ICollectionView
>>via
>> its internal flattened list.
>>
>> I created SingleSelectionCollectionViewModel (Basic project) that mimics
>> ArrayListSelectionModel, but assumes its dataProvider is
>>ICollectionView.
>>
>> I created DataItemRendererFactoryForCollectionView (Basic project) which
>> assumes the dataProvider from the model is ICollectionView. This is
>> identical to DynamicItemsRendererFactoryForArrayList so perhaps it will
>> replace that class.
>>
>> I changed TreeModel is use TreeData as its dataProvider property. I
>> changed Tree to accept TreeData as its dataProvider (passes it to its
>> model).
>>
>> You can run a List using SingleSelectionCollectionModel and
>> DataItemRendererFactoryForCollectionView. The Tree works as does
>>DataGrid.
>>
>> I'm in the middle of getting TreeGrid to work with these new classes.
>>
>> Have a wonderful New Year.
>>
>> Regards,
>> Peter Ent
>> Adobe Systems/Apache Royale Project
>>
>
>
>
>-- 
>
>Piotr Zarzycki
>
>Patreon: 
>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C6e193cddcd4747ce
>314808d54667165f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636492330935
>034617&sdata=LcX1I6EQjhOnm6zSeNR7aH3169wjCVw8X6W2MpMqKso%3D&reserved=0
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C6e193cddcd4747ce
>314808d54667165f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636492330935
>034617&sdata=LcX1I6EQjhOnm6zSeNR7aH3169wjCVw8X6W2MpMqKso%3D&reserved=0>*



[Royale] Collection work

2017-12-18 Thread Peter Ent
Piotr (and anyone else interested):

Adobe has its winter break next week but I am leaving earlier (tomorrow) and 
will be back working on the project in January.

I have created a temporary branch, CollectionData, with my work in-progress. 
While this branch is incomplete, you might be interested in looking into it.

Here's a summary:

I created ICollectionView (Collections project), an interface that allows for 
inserting, removing items from a collection. ArrayList implements it. The idea 
is that you might want to create a collection that's a subset or a change to 
data without destroying or modifying the original data. For example, maybe you 
want to filter the original data or sort it.

I created TreeData (Collections project), which implements ICollectionView. 
TreeData takes in HierarchicalData and converts it to a FlattenedList (extends 
ArrayList). TreeData implements ICollectionView via its internal flattened list.

I created SingleSelectionCollectionViewModel (Basic project) that mimics 
ArrayListSelectionModel, but assumes its dataProvider is ICollectionView.

I created DataItemRendererFactoryForCollectionView (Basic project) which 
assumes the dataProvider from the model is ICollectionView. This is identical 
to DynamicItemsRendererFactoryForArrayList so perhaps it will replace that 
class.

I changed TreeModel is use TreeData as its dataProvider property. I changed 
Tree to accept TreeData as its dataProvider (passes it to its model).

You can run a List using SingleSelectionCollectionModel and 
DataItemRendererFactoryForCollectionView. The Tree works as does DataGrid.

I'm in the middle of getting TreeGrid to work with these new classes.

Have a wonderful New Year.

Regards,
Peter Ent
Adobe Systems/Apache Royale Project


Re: Dropdowns

2017-12-13 Thread Peter Ent
I have not tried this, but are there some kits, like jQuery, where you
just use  and then jQuery has a lot of CSS that enables the type
of thing Harbs wants to do as far as user interaction goes? Then you'd
just use a drop down list and style the heck out of it. In other words,
CSS takes care of the hiding and showing, you just change the style on the
. Again, just a guess but might be another path to try.

‹peter

On 12/13/17, 5:12 PM, "Alex Harui"  wrote:

>Take a look at ComboBox and/or DateField.  It might serve as a starting
>point.
>
>Ideally, ComboBox, DateField and this fancier DropDown should share a
>thing like a "PopUpButton" that we had in Flex.  The basic principle is
>that there is a ToggleButton that will show/hide a popup.  That thing gets
>composited with some sort of display field, and various beads integrate
>the pieces, including where the dropdown appears and when it closes and
>how any display field gets updated.
>
>My 2 cents,
>-Alex
>
>On 12/13/17, 1:57 PM, "Harbs"  wrote:
>
>>Right. I was not suggesting changing the basic dropdown.
>>
>>I was thinking we should have an ³advanced² dropdown which would use a
>>list with item renderers for the actual dropdown.
>>
>>It should probably be a button-esque component combined with a dropdown
>>similar to how dropdowns worked in Flex.
>>
>>A  opens initially on the selected item, but there¹s no ³sticky²
>>indication to what¹s selected. Additionally, there¹s no control over the
>>rendering of the list and how much space it takes up. The last bit is
>>especially important for my use case.
>>
>>The actual dropdown is also not style-able at all and sticks out quite
>>badly in my UI.
>>
>>Harbs
>>
>>> On Dec 13, 2017, at 10:36 PM, Alex Harui 
>>>wrote:
>>> 
>>> I am not understanding something.  The Basic DropDownList just wraps a
>>> .  That's all it should do.  I thought  knew how to
>>>show
>>> what is selected?
>>> 
>>> Anything else can be added via PAYG principles, including DropDowns
>>>that
>>> have custom item renderers.
>>> 
>>> My 2 cents,
>>> -Alex
>>> 
>>> On 12/13/17, 11:20 AM, "Harbs"  wrote:
>>> 
 I didn¹t. Thanks.
 
 I¹ll take a look. (although we really should create a better standard
 dropdown component)
 
> On Dec 13, 2017, at 9:17 PM, Piotr Zarzycki
>
> wrote:
> 
> Hi Harbs,
> 
> Did you try MDL DropDownList ? Maybe it is something which can help
>you.
> 
> Thanks, Piotr
> 
> 2017-12-13 20:11 GMT+01:00 Harbs :
> 
>> Currently Royale has only very simple dropdown support.
>> 
>> Here¹s my idea of what a full-featured dropdown component should
>>look
>> like:
>> 
>> 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsema
>>n
>>ti
>> 
>>c-ui.com%2Fmodules%2Fdropdown.html&data=02%7C01%7Caharui%40adobe.com%
>>7
>>Ce
>> 
>>bbe6606359048fb283208d5425ea911%7Cfa7b1b5a7b34438794aed2c178decee1%7C
>>0
>>%7
>> 
>>C0%7C636487896692404835&sdata=Ljp6dAnb%2FoEs0adpQqj4OD%2BIzYJsjTpw3w5
>>e
>>u0
>> m074I%3D&reserved=0
>> 
>>>a
>>nt
>> 
>>ic-ui.com%2F&data=02%7C01%7Caharui%40adobe.com%7Cebbe6606359048fb2832
>>0
>>8d
>> 
>>5425ea911%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63648789669240
>>4
>>83
>> 5&sdata=MUxYDV6AjBLhfq%2FH5Hh5R0jHm9WfhQjBmGhfl3Y7Mis%3D&reserved=0
>> modules/dropdown.html>
>> 
>> Right now, the feature that I needed is a dropdown with ³selected².
>> Either
>> a checkbox or some other selection indicator is probably acceptable.
>> Has
>> anyone given thought into implementing a dropdown component yet?
>> 
>> Harbs
> 
> 
> 
> 
> -- 
> 
> Piotr Zarzycki
> 
> Patreon: 
> 
>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
>p
>at
> 
>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cebbe66063
>5
>90
> 
>48fb283208d5425ea911%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6364
>8
>78
> 
>96692404835&sdata=qkOHbSfErUjMxE2cG3QWQJhddovwLurgl%2B0VArfsAqg%3D&res
>e
>rv
> ed=0
> 
> 
>p
>at
> 
>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cebbe66063
>5
>90
> 
>48fb283208d5425ea911%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6364
>8
>78
> 
>96692404835&sdata=qkOHbSfErUjMxE2cG3QWQJhddovwLurgl%2B0VArfsAqg%3D&res
>e
>rv
> ed=0>*
 
>>> 
>>
>



Re: Slider Component

2017-12-13 Thread Peter Ent
I've pushed changes to the Slider component and resolved (I hope) most of
the issues listed below by Justin. Only one, having to do with arrow keys,
should be resolved or at least improved. The arrow keys should be
addressed by a keyboard controller bead.

I included a VerticalSliderLayout as well as VSliderMouseController
(you'll need both to do vertical sliders). I may roll this into a VSlider
for Express.

I also renamed SliderMouseController to HSliderMouseController to be
consistent. I checked other projects and found only Flat to have used that
directly.

‹peter

On 12/12/17, 5:21 PM, "Justin Mclean"  wrote:

>HI,
>
>A while back I raised several issues with the slider component, if you
>happen if fix any of these issues please close them. [1][2][3][4][5]
>
>I note for instance the slider still incorrectly gives the value NaN when
>you click on the track.
>The issue arises in this line in the calcValFromMousePosition method:
>
>var deltaX:Number = (useOffset ? event.offsetX : event.clientX) - origin;
> 
>As when you click on the track offsetX is not contained in the event.
>
>A fix (in the PR) is to change the line to:
>var deltaX:Number = (event.offsetX && useOffset ? event.offsetX :
>event.clientX) - origin;
>
>I would normally use event.offsetX !== undefined rather than just
>event.offsetX but this project seems to have an aversion to using the
>strict equality / inequality operators.
>
>There may of course be other ways to fix this issue.
>
>Thanks,
>Justin
>
>1. 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
>m%2Fapache%2Froyale-asjs%2Fissues%2F86&data=02%7C01%7Cpent%40adobe.com%7Cc
>1fc0a17ee274829d1d708d541aeb58e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636487140985163005&sdata=JkssfIJkd4YohkXMZ0ZCy98hK6ok38S3KShzzVr4hQE%3D
>&reserved=0
>2. 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
>m%2Fapache%2Froyale-asjs%2Fissues%2F84&data=02%7C01%7Cpent%40adobe.com%7Cc
>1fc0a17ee274829d1d708d541aeb58e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636487140985163005&sdata=s%2F83hm8ZBh5fIcPEMfbdmIliNYm6XVu1ev%2BjHaQF%2
>BNI%3D&reserved=0
>3. 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
>m%2Fapache%2Froyale-asjs%2Fissues%2F83&data=02%7C01%7Cpent%40adobe.com%7Cc
>1fc0a17ee274829d1d708d541aeb58e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636487140985163005&sdata=bnFSx8JXgOHwGQpBbAfihAZpgYXw%2BJeqg%2F9y4sfKii
>w%3D&reserved=0
>4. 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
>m%2Fapache%2Froyale-asjs%2Fissues%2F82&data=02%7C01%7Cpent%40adobe.com%7Cc
>1fc0a17ee274829d1d708d541aeb58e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636487140985163005&sdata=erh8n5SMNZB%2Ff%2FEKl0lxw3TS8wsFMzZ44e4GPxbYu7
>I%3D&reserved=0
>5. 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
>m%2Fapache%2Froyale-asjs%2Fissues%2F81&data=02%7C01%7Cpent%40adobe.com%7Cc
>1fc0a17ee274829d1d708d541aeb58e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636487140985163005&sdata=kK2sjhS0r71MgTlE7VE2XGGA1q6DUXirc%2B%2BH3Dh4d4
>s%3D&reserved=0
>



Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-13 Thread Peter Ent
I really don't know what is the best solution. I would have either a
.beginUpdate() and .endUpdate() function on ArrayList so it wouldn't
dispatch anything until the end (for both adding and removing) or have
.removeAll() dispatch a single event at the end. Not sure if either is
PAYG in this case.

It would seem though, that sending 1000 events to clear an array is bad.
Go with what you feel is better; it will certainly help performance. I do
think if you are going to have removeAll() dispatch one event, it should
either a) set the event's index property to -1 (indicating that no
specific item is involved) or b) have a new event type (ALL_ITEMS_REMOVED
or something like that). I introduced the index property so that event
listeners knew where an item was added or removed without having to guess
or iterate the list.

—peter

On 12/12/17, 5:25 PM, "Piotr Zarzycki"  wrote:

>Peter,
>
>I did fix all issues in MDL Table and playing with your
>DynamicRemoveItemRendererForArrayListData. If I do on ArrayList.removeAll
>-
>I'm getting ITEM_REMOVED, but one time. From the user perspective I don't
>know actually what has happened. How to proceed if I'm using your bead in
>that case ?
>
>I saw in other thread respond from you:
>
>"If you remove everything from the ArrayList, the ArrayList dispatches
>ITEM_REMOVED for each item (if you have 1000 items you will get 1000
>events). ArrayList should probably not do that and instead, dispatch a
>single COLLECTION_CHANGED event once completed."
>
>Maybe we should go to that direction ?
>
>Thanks, Piotr
>
>
>2017-12-11 19:29 GMT+01:00 Peter Ent :
>
>> I have a  in my test. Its defaults.css entry has
>> DataItemRendererFactoryForArrayData. When I add in the dynamic mapper
>>via
>> MXML, that supersedes the one specified in defaults.css. That happens
>> because the MXML bead of type IDataProviderItemRendererMapper is already
>> on the strand so the one specified by CSS (or in-line style) will not be
>> loaded.
>>
>> —peter
>>
>> On 12/11/17, 12:56 PM, "Piotr Zarzycki" 
>>wrote:
>>
>> >Peter,
>> >
>> >I will try your changes soon. I was thinking what you did write earlier
>> >and
>> >maybe I wasn't enough clear. I'm talking right now about following
>>cases.
>> >Let's say that you have list or MDL Table doesn't matter and you did
>> >specify in your css file following class:
>> >
>> >.myList
>> >{
>> > IDataProviderItemRendererMapper: ClassReference(
>> >"org.apache.royale.html.beads.DataItemRendererFactoryForArrayList");
>> >}
>> >
>> >and in your MXML:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >It means that apart of the code which is handling adding to us in
>> >DynamicItemsRendererFactoryForArrayListData - we have right now in both
>> >beads duplicated code, which is doing exactly the same. - I'm not sure
>> >what
>> >can happen if we have both beads added.
>> >
>> >However I do understand also other use cases.
>> >
>> >Thanks, Piotr
>> >
>> >
>> >2017-12-11 17:16 GMT+01:00 Peter Ent :
>> >
>> >> I committed the change to the remove bead after running the
>>MDLExample
>> >> with no errors in the browser console.
>> >>
>> >> Hope this works!
>> >> —peter
>> >>
>> >> On 12/11/17, 10:45 AM, "Piotr Zarzycki" 
>> >>wrote:
>> >>
>> >> >Hi Peter,
>> >> >
>> >> >If I remember correctly I was using those beads [1] and as
>> >> >IDataProviderItemRendererMapper:
>> >> >DynamicItemsRendererFactoryForArrayListData
>> >> >- declared in CSS. You can take a look into the example
>> >> >MDLDynamicTableExample.
>> >> >
>> >> >With your solution where we are looking actually into the events
>>from
>> >> >dataProvider, I just thought that code which creates item renderers
>>is
>> >>not
>> >> >needed in DynamicItemsRendererFactoryForArrayListData.
>> >> >
>> >> >Looking forward to the results of your investigation.
>> >> >
>> >> >[1]
>> >> >https://na01.safelinks.protection.outlook.com/?url=
>> >> https%3A%2F%2Fpaste.apa
>> >> >che.org%2F07m8&data=02%7C01%7Cpent%40adobe.com%
>> >> 7C835b99b029af47936d8508d54
>> &g

Re: Slider Component

2017-12-12 Thread Peter Ent
If you set the slider's width and height explicitly, the layout should
work fine. Found two issues:

The SliderMouseController is oriented toward a horizontal slider. I will
create a HorizontalSliderMouseController and a
VerticalSLiderMouseController.

Second, on the HTML/JS side, the slider controller is supposed to receive
a BrowserEvent, but is actually receiving a "native" (I think) MouseEvent.
This event's properties do not provide actual local x & y (or client x &
y) values which is throwing the mouse tracking off. It looks like there is
an override in HTMLElementWrapper that is discarding the BrowserEvent and
sending a native event instead.

—peter

On 12/12/17, 3:53 PM, "Peter Ent"  wrote:

>Hi Carlos,
>
>I've pushed some changes to Slider. I created HorizontalSliderLayout to
>size and position the components of the Slider. I also fixed the layout on
>the HTML/JS side by adding some style commands in defaults.css.
>
>There are a couple of issues, but you should be able to make some
>progress.
>
>The tracking of the Slider thumb on HTML/JS is very jittery and not always
>accurate. I'm not sure why so I will be looking into that next. I also
>created a VerticalSliderLayout, but that doesn't work at all; it may have
>something to do with the graphics for the track and maybe there needs to
>be a vertical track.
>
>So it is "better" and I'll continue to work on it.
>
>—peter
>
>On 12/12/17, 1:27 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
> wrote:
>
>>Thanks Peter,
>>
>>This is one of the components I want to stylize, so if you upgrade it, I
>>could as well work on the visuals ( and use it for the demo controls too)
>>
>>Carlos
>>
>>2017-12-12 16:35 GMT+01:00 Peter Ent :
>>
>>> I just saw this email. I'll be happy to look at it. I think it was made
>>> early in FlexJS. I imagine it could be crude. I'm also sure it is
>>> horizontal. I'll keep vertical in mind - maybe it needs different
>>>layouts
>>> to handle that.
>>>
>>> ‹peter
>>>
>>> On 12/12/17, 5:00 AM, "carlos.rov...@gmail.com on behalf of Carlos
>>>Rovira"
>>>  wrote:
>>>
>>> >Hi,
>>> >
>>> >I'm planning to start working soon in the theme feature and one thing
>>>I
>>> >was
>>> >trying to use is the Slider component (both for styling and for use to
>>> >control styling change in examples in real time)
>>> >
>>> >I found some weeks ago that the Slider component was not working as
>>> >expected, as I move the thumb it was doing very strange things
>>>(flickering
>>> >and jumping) and I think the layout is only horizontal but not
>>>vertical.
>>> >
>>> >I think Peter made this component and want to ask if he could review
>>>it to
>>> >see if something was broken and improve it in order to use it in this
>>> >styling effort
>>> >
>>> >Thanks
>>> >
>>> >--
>>> >Carlos Rovira
>>> >https://na01.safelinks.protection.outlook.com/?url=
>>> http%3A%2F%2Fabout.me%2
>>> >Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%
>>> 7Cb1bd73ec13ef4fb75c6408d541
>>> >4732ba%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
>>> 7C636486696475000148&sda
>>> >ta=MDUaZWs7b8savnySNQ653fWLrdWLkkw%2FSKbY%2Bg00J38%3D&reserved=0
>>>
>>>
>>
>>
>>-- 
>>Carlos Rovira
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%
>>2
>>Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%7Cbc3147dc43414b511a6a08d54
>>1
>>8dfe47%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636487000472376988&sd
>>a
>>ta=Y%2BcJd6LoUXLPxTfL82s39hRQz74SSOZtLNcX3EVWPQc%3D&reserved=0
>



Re: Slider Component

2017-12-12 Thread Peter Ent
Hi Carlos,

I've pushed some changes to Slider. I created HorizontalSliderLayout to
size and position the components of the Slider. I also fixed the layout on
the HTML/JS side by adding some style commands in defaults.css.

There are a couple of issues, but you should be able to make some progress.

The tracking of the Slider thumb on HTML/JS is very jittery and not always
accurate. I'm not sure why so I will be looking into that next. I also
created a VerticalSliderLayout, but that doesn't work at all; it may have
something to do with the graphics for the track and maybe there needs to
be a vertical track.

So it is "better" and I'll continue to work on it.

—peter

On 12/12/17, 1:27 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Thanks Peter,
>
>This is one of the components I want to stylize, so if you upgrade it, I
>could as well work on the visuals ( and use it for the demo controls too)
>
>Carlos
>
>2017-12-12 16:35 GMT+01:00 Peter Ent :
>
>> I just saw this email. I'll be happy to look at it. I think it was made
>> early in FlexJS. I imagine it could be crude. I'm also sure it is
>> horizontal. I'll keep vertical in mind - maybe it needs different
>>layouts
>> to handle that.
>>
>> ‹peter
>>
>> On 12/12/17, 5:00 AM, "carlos.rov...@gmail.com on behalf of Carlos
>>Rovira"
>>  wrote:
>>
>> >Hi,
>> >
>> >I'm planning to start working soon in the theme feature and one thing I
>> >was
>> >trying to use is the Slider component (both for styling and for use to
>> >control styling change in examples in real time)
>> >
>> >I found some weeks ago that the Slider component was not working as
>> >expected, as I move the thumb it was doing very strange things
>>(flickering
>> >and jumping) and I think the layout is only horizontal but not
>>vertical.
>> >
>> >I think Peter made this component and want to ask if he could review
>>it to
>> >see if something was broken and improve it in order to use it in this
>> >styling effort
>> >
>> >Thanks
>> >
>> >--
>> >Carlos Rovira
>> >https://na01.safelinks.protection.outlook.com/?url=
>> http%3A%2F%2Fabout.me%2
>> >Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%
>> 7Cb1bd73ec13ef4fb75c6408d541
>> >4732ba%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
>> 7C636486696475000148&sda
>> >ta=MDUaZWs7b8savnySNQ653fWLrdWLkkw%2FSKbY%2Bg00J38%3D&reserved=0
>>
>>
>
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%7Cbc3147dc43414b511a6a08d541
>8dfe47%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636487000472376988&sda
>ta=Y%2BcJd6LoUXLPxTfL82s39hRQz74SSOZtLNcX3EVWPQc%3D&reserved=0



[Royale] TreeGrid

2017-12-12 Thread Peter Ent
Hi,

I've pushed a new component for the Basic package: TreeGrid. This component is 
a hybrid of Tree and DataGrid. TreeGrid uses a Hierarchical data provider and 
displays a Tree in the first column; the other columns display additional 
fields from the records.

You can use TreeGrid like this:


   









You can look at the TreeExample that comes with Royale for a working example.  
This is a first-pass at TreeGrid. Has its own beads: TreeGridView, 
TreeGridModel, and TreeGridLayout.

Regards,
Peter Ent
Adobe Systems/Apache Royale Project



Re: Slider Component

2017-12-12 Thread Peter Ent
I just saw this email. I'll be happy to look at it. I think it was made
early in FlexJS. I imagine it could be crude. I'm also sure it is
horizontal. I'll keep vertical in mind - maybe it needs different layouts
to handle that.

‹peter

On 12/12/17, 5:00 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi,
>
>I'm planning to start working soon in the theme feature and one thing I
>was
>trying to use is the Slider component (both for styling and for use to
>control styling change in examples in real time)
>
>I found some weeks ago that the Slider component was not working as
>expected, as I move the thumb it was doing very strange things (flickering
>and jumping) and I think the layout is only horizontal but not vertical.
>
>I think Peter made this component and want to ask if he could review it to
>see if something was broken and improve it in order to use it in this
>styling effort
>
>Thanks
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Cpent%40adobe.com%7Cb1bd73ec13ef4fb75c6408d541
>4732ba%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636486696475000148&sda
>ta=MDUaZWs7b8savnySNQ653fWLrdWLkkw%2FSKbY%2Bg00J38%3D&reserved=0



Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-11 Thread Peter Ent
I have a  in my test. Its defaults.css entry has
DataItemRendererFactoryForArrayData. When I add in the dynamic mapper via
MXML, that supersedes the one specified in defaults.css. That happens
because the MXML bead of type IDataProviderItemRendererMapper is already
on the strand so the one specified by CSS (or in-line style) will not be
loaded.

—peter

On 12/11/17, 12:56 PM, "Piotr Zarzycki"  wrote:

>Peter,
>
>I will try your changes soon. I was thinking what you did write earlier
>and
>maybe I wasn't enough clear. I'm talking right now about following cases.
>Let's say that you have list or MDL Table doesn't matter and you did
>specify in your css file following class:
>
>.myList
>{
> IDataProviderItemRendererMapper: ClassReference(
>"org.apache.royale.html.beads.DataItemRendererFactoryForArrayList");
>}
>
>and in your MXML:
>
>
>
>
>
>
>
>It means that apart of the code which is handling adding to us in
>DynamicItemsRendererFactoryForArrayListData - we have right now in both
>beads duplicated code, which is doing exactly the same. - I'm not sure
>what
>can happen if we have both beads added.
>
>However I do understand also other use cases.
>
>Thanks, Piotr
>
>
>2017-12-11 17:16 GMT+01:00 Peter Ent :
>
>> I committed the change to the remove bead after running the MDLExample
>> with no errors in the browser console.
>>
>> Hope this works!
>> —peter
>>
>> On 12/11/17, 10:45 AM, "Piotr Zarzycki" 
>>wrote:
>>
>> >Hi Peter,
>> >
>> >If I remember correctly I was using those beads [1] and as
>> >IDataProviderItemRendererMapper:
>> >DynamicItemsRendererFactoryForArrayListData
>> >- declared in CSS. You can take a look into the example
>> >MDLDynamicTableExample.
>> >
>> >With your solution where we are looking actually into the events from
>> >dataProvider, I just thought that code which creates item renderers is
>>not
>> >needed in DynamicItemsRendererFactoryForArrayListData.
>> >
>> >Looking forward to the results of your investigation.
>> >
>> >[1]
>> >https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fpaste.apa
>> >che.org%2F07m8&data=02%7C01%7Cpent%40adobe.com%
>> 7C835b99b029af47936d8508d54
>> >0ae2eda%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
>> 7C636486039218879495&sd
>> >ata=cghdpJo101E1sgl%2FgG2VFahFno78Y8nwfiks7bbPdHE%3D&reserved=0
>> >
>> >Thanks, Piotr
>> >
>> >
>> >2017-12-11 16:29 GMT+01:00 Peter Ent :
>> >
>> >> In the PAYG world of Royale, we need to keep a number of features
>> >>separate
>> >> so apps are not weighed down by unused code. I originally had a bead
>> >>that
>> >> refreshed all item renderers by deleting them from the DataGroup and
>> >> re-creating them. I also had a bead that just created itemRenderers
>>on
>> >> demand when it detected an ItemAdded event. Likewise, a bead to
>>remove
>> >> them on demand. To avoid duplicating code, I had the refresh bead
>>look
>> >>for
>> >> the add bead and use it (there was a public function to create an
>> >> itemRenderer). This kept things very separate. However, the refresh
>>bead
>> >> required the add bead so Alex suggested combining the two since there
>> >>was
>> >> really nothing being gained by the separation. Removal is considered
>>an
>> >> "extra" since many apps do not need to remove things. I don't know if
>> >> that's really true, but it fits the PAYG model.
>> >>
>> >> The ArrayList itself emits events. It is also a dataProvider that
>>can be
>> >> used with a model. I find this to be confusing sometimes, but that's
>> >>just
>> >> me.
>> >>
>> >> Piotr, I don't see how your original version of
>> >> DynamicItemsRendererFactoryForArrayListData could have worked since
>>the
>> >> model does not dispatch ItemAdded events; only ArrayList (the model's
>> >> dataProvider) does that. In my tests, the DynamicŠData bead never
>> >>received
>> >> the event until I changed it.
>> >>
>> >> Personally, I think the collection classes should emit their own
>>events,
>> >> but when used within a model, the model should intercept them and
>> >> re-dispatch the events as their own. This

Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-11 Thread Peter Ent
I committed the change to the remove bead after running the MDLExample
with no errors in the browser console.

Hope this works!
—peter

On 12/11/17, 10:45 AM, "Piotr Zarzycki"  wrote:

>Hi Peter,
>
>If I remember correctly I was using those beads [1] and as
>IDataProviderItemRendererMapper:
>DynamicItemsRendererFactoryForArrayListData
>- declared in CSS. You can take a look into the example
>MDLDynamicTableExample.
>
>With your solution where we are looking actually into the events from
>dataProvider, I just thought that code which creates item renderers is not
>needed in DynamicItemsRendererFactoryForArrayListData.
>
>Looking forward to the results of your investigation.
>
>[1] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apa
>che.org%2F07m8&data=02%7C01%7Cpent%40adobe.com%7C835b99b029af47936d8508d54
>0ae2eda%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636486039218879495&sd
>ata=cghdpJo101E1sgl%2FgG2VFahFno78Y8nwfiks7bbPdHE%3D&reserved=0
>
>Thanks, Piotr
>
>
>2017-12-11 16:29 GMT+01:00 Peter Ent :
>
>> In the PAYG world of Royale, we need to keep a number of features
>>separate
>> so apps are not weighed down by unused code. I originally had a bead
>>that
>> refreshed all item renderers by deleting them from the DataGroup and
>> re-creating them. I also had a bead that just created itemRenderers on
>> demand when it detected an ItemAdded event. Likewise, a bead to remove
>> them on demand. To avoid duplicating code, I had the refresh bead look
>>for
>> the add bead and use it (there was a public function to create an
>> itemRenderer). This kept things very separate. However, the refresh bead
>> required the add bead so Alex suggested combining the two since there
>>was
>> really nothing being gained by the separation. Removal is considered an
>> "extra" since many apps do not need to remove things. I don't know if
>> that's really true, but it fits the PAYG model.
>>
>> The ArrayList itself emits events. It is also a dataProvider that can be
>> used with a model. I find this to be confusing sometimes, but that's
>>just
>> me.
>>
>> Piotr, I don't see how your original version of
>> DynamicItemsRendererFactoryForArrayListData could have worked since the
>> model does not dispatch ItemAdded events; only ArrayList (the model's
>> dataProvider) does that. In my tests, the DynamicŠData bead never
>>received
>> the event until I changed it.
>>
>> Personally, I think the collection classes should emit their own events,
>> but when used within a model, the model should intercept them and
>> re-dispatch the events as their own. This would make writing beads
>>cleaner
>> and we would not need as many variations that only differ by how the
>> dataProvider is accessed as all access to the dataProvider would go
>> through the model via a standard interface.
>>
>> I will figure out why the removal bead is failing and then re-test with
>> MDL but I won't change anything else unless there is no other choice.
>>
>> ‹peter
>>
>> On 12/10/17, 2:53 PM, "piotrz"  wrote:
>>
>> >Hi Peter,
>> >
>> >Ok DynamicItemsRendererFactoryForArrayListData is now working
>>perfectly.
>> >Unfortunately I just tried DynamicRemoveItemRendererForArrayListData
>>and
>> >got
>> >NPE. This time dataProviderModel is being null
>> >
>> ><https://na01.safelinks.protection.outlook.com/?url=
>> http%3A%2F%2Fapache-ro
>> >yale-development.20373.n8.nabble.com%2Ffile%2Ft1%
>> 2Fdynamic_remove_null.png
>> >&data=02%7C01%7Cpent%40adobe.com%7C3e768dcacec447640aa208d54007
>> a62b%7Cfa7b
>> >1b5a7b34438794aed2c178decee1%7C0%7C0%7C636485323953316454&
>> sdata=iktsZuL5sc
>> >DNbJu26jprPRlwA3Zx0w%2FJVriETkMQLqo%3D&reserved=0>
>> >
>> >There is in general something wrong and I think there a bit more work.
>> >DynamicItemsRendererFactoryForArrayListData  now is different than
>> >DynamicRemoveItemRendererForArrayListData, cause the first on have
>>logic
>> >which is not only adding item renderer, but also creates them which is
>>not
>> >present in the Remove version.
>> >
>> >In the other words DynamicItemsRendererFactoryForArrayListData it is
>> >IDataProviderItemRendererMapper. I think we should go with following
>> >changes.
>> >
>> >1) DynamicItemsRendererFactoryForArrayListData  - logic for creating
>>item
>> >renderers should be remov

Re: Hackathon

2017-12-11 Thread Peter Ent
Hi,

Thanks for the invite, but I do not think it will be possible for me to
join you.

Regards,
Peter

On 12/9/17, 1:30 PM, "Harbs"  wrote:

>The only flights I can take on Thursday are pretty early in the day. That
>would only give us the morning, and I don¹t see that being very
>productive. Missing those flights would mean I couldn¹t leave until
>Sunday, and my wife would not be happy about thatŠ ;-)
>
>I might be able to come to Seattle for the 11th and 12th. If there¹s
>others who can join, that would probably add weight to deciding to come.
>
>Who else could make it? I know Josh lives in Seattle. I¹m not sure if he
>has time or interest in joining. Any chance of Om coming to Seattle?
>Peter? Anyone else?
>
>Harbs
>
>> On Dec 8, 2017, at 7:49 PM, Alex Harui  wrote:
>> 
>> Hi Harbs,
>> 
>> Unfortunately, the 18th is the only window of time I currently have
>>open,
>> and after a red-eye flight, not sure I productive I'll be. What time do
>> flights leave to return you home?  Maybe there is an overnight flight
>>you
>> can take as well and we can get a full day in on the 18th.
>> 
>> Also, where would we meet?  Adobe has a (mostly) sales office in NYC.
>>Not
>> sure if we can get a room there or not.
>> 
>> If you come out to Seattle, I can easily get rooms for us to work in,
>>and
>> there is a larger window on the 11th and 12th that is available.
>> 
>> If you go out to San Francisco/San Jose, I lose the window on the 11th
>>as
>> I have to be in Seattle on the evening of the 11th.
>> 
>> Thanks,
>> -Alex
>> 
>> On 12/8/17, 2:26 AM, "Harbs"  wrote:
>> 
>>> I don¹t have hard plans yet, but I was thinking of going back home on
>>>the
>>> 18th.
>>> 
>>> If the only way of getting together would be to fly to the west coast,
>>> that¹s not out of the question, but it does conflict with my main
>>>reason
>>> for flying to NY. I don¹t want to discuss my personal matters on a
>>>public
>>> list. If we get an idea of who is interested, we can try and see if
>>> interests and timing can jive off list where I can properly express my
>>> limitations.
>>> 
>>> Thanks,
>>> Harbs
>>> 
 On Dec 8, 2017, at 10:51 AM, Alex Harui 
 wrote:
 
 What day are you flying back?  I might be able to get there Thur AM
(on
 the 18th) and leave Fri AM.
 
 On 12/7/17, 3:00 AM, "Harbs"  wrote:
 
> It looks like I¹m going to be in New York the second and third weeks
>of
> January.
> 
> I¹d very much be interested in getting together with whoever could
>make
> it for a couple of days of hacking to knock off a bunch of items on
>our
> ³to do² list. It would also be great if any ³lurkers² might join to
>get
> more involved in the framework.
> 
> Anyone else interested? What are the chances of arranging something?
> 
> Harbs
 
>>> 
>> 
>



Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-11 Thread Peter Ent
In the PAYG world of Royale, we need to keep a number of features separate
so apps are not weighed down by unused code. I originally had a bead that
refreshed all item renderers by deleting them from the DataGroup and
re-creating them. I also had a bead that just created itemRenderers on
demand when it detected an ItemAdded event. Likewise, a bead to remove
them on demand. To avoid duplicating code, I had the refresh bead look for
the add bead and use it (there was a public function to create an
itemRenderer). This kept things very separate. However, the refresh bead
required the add bead so Alex suggested combining the two since there was
really nothing being gained by the separation. Removal is considered an
"extra" since many apps do not need to remove things. I don't know if
that's really true, but it fits the PAYG model.

The ArrayList itself emits events. It is also a dataProvider that can be
used with a model. I find this to be confusing sometimes, but that's just
me.

Piotr, I don't see how your original version of
DynamicItemsRendererFactoryForArrayListData could have worked since the
model does not dispatch ItemAdded events; only ArrayList (the model's
dataProvider) does that. In my tests, the DynamicŠData bead never received
the event until I changed it.

Personally, I think the collection classes should emit their own events,
but when used within a model, the model should intercept them and
re-dispatch the events as their own. This would make writing beads cleaner
and we would not need as many variations that only differ by how the
dataProvider is accessed as all access to the dataProvider would go
through the model via a standard interface.

I will figure out why the removal bead is failing and then re-test with
MDL but I won't change anything else unless there is no other choice.

‹peter

On 12/10/17, 2:53 PM, "piotrz"  wrote:

>Hi Peter,
>
>Ok DynamicItemsRendererFactoryForArrayListData is now working perfectly.
>Unfortunately I just tried DynamicRemoveItemRendererForArrayListData and
>got
>NPE. This time dataProviderModel is being null
>
>yale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fdynamic_remove_null.png
>&data=02%7C01%7Cpent%40adobe.com%7C3e768dcacec447640aa208d54007a62b%7Cfa7b
>1b5a7b34438794aed2c178decee1%7C0%7C0%7C636485323953316454&sdata=iktsZuL5sc
>DNbJu26jprPRlwA3Zx0w%2FJVriETkMQLqo%3D&reserved=0>
>
>There is in general something wrong and I think there a bit more work.
>DynamicItemsRendererFactoryForArrayListData  now is different than
>DynamicRemoveItemRendererForArrayListData, cause the first on have logic
>which is not only adding item renderer, but also creates them which is not
>present in the Remove version.
>
>In the other words DynamicItemsRendererFactoryForArrayListData it is
>IDataProviderItemRendererMapper. I think we should go with following
>changes.
>
>1) DynamicItemsRendererFactoryForArrayListData  - logic for creating item
>renderers should be removed from that bead
>2) We should rename DynamicItemsRendererFactoryForArrayListData  to
>DynamicAddItemRendererForArrayListData
>3) For List, MDL Table, MDL Tabs and all things inherited from List should
>as IDataProviderItemRendererMapper we should use:
>DataItemRendererFactoryForArrayData or
>DataItemRendererFactoryForSeriesArrayListData (use this to have all the
>advantages of above beads).
>
>What do you think ?
>
>If you will make above changes check all the MDL examples which have Tabs,
>Tables etc. - Build MDLExample.
>
>Thanks, Piotr
>
>
>
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7C3
>e768dcacec447640aa208d54007a62b%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>%7C636485323953316454&sdata=sRTfb3ro%2Fj66%2FHhWWEU6ZgOsNo9jqlqtEdE7nNF9Py
>A%3D&reserved=0



Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-09 Thread Peter Ent
I’m thinking that all changes should go through a model and not the data 
source. The model can interface with that. So: model.getItemAt() and 
model.addItem() and so forth. 

This way the data source can be anything. Then our models like 
ArrayListSelectionModel can dispatch those events. We can even have 
ArraySelectionModel. App writers can extend these classes to make custom models 
or implement the interfaces from scratch. It would certainly help to have some 
uniformity.  

Peter 


> On Dec 9, 2017, at 3:09 PM, Peter Ent  wrote:
> 
> Piotr,
> 
> The model classes do not dispatch CollectionEvents - only ArrayList (or
> something like it) dispatches those events. So we cannot listen on the
> model.
> 
> What I've done, however, is change things in DynamicŠ so that when the
> dataProvider does change (or is initially present), then a listener is set
> up on that dataProvider. I think this will work and, in fact, work better.
> 
> Pull down my change and see if that works better.
> 
> ‹peter
> 
>> On 12/9/17, 6:17 AM, "Piotr Zarzycki"  wrote:
>> 
>> Peter,
>> 
>> That's when my initial implementation of that bead was to listen on model
>> instead directly on dataProvider. I'm using following beads [1] for MDL
>> Table and bead DynamicItemsRendererFactoryForArrayListData is being added
>> through CSS.
>> I hope that details help.
>> 
>> [1] 
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apa
>> che.org%2Foyex&data=02%7C01%7Cpent%40adobe.com%7C73405c25faf041c2b6a608d53
>> ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636484150397586526&sd
>> ata=XDE1Eh%2FS8%2FD%2BvQrHlzM9QhXFeC6pCkuU9jO30SLecTo%3D&reserved=0
>> 
>> Thanks, Piotr
>> 
>> 
>> 2017-12-09 11:16 GMT+01:00 piotrz :
>> 
>>> Hi Peter,
>>> 
>>> I just tried newest build of Royale. I didn't use your new bead yet,
>>> but I
>>> had use the "DynamicItemsRendererFactoryForArrayListData", so decided to
>>> first build project without any changes.
>>> I'm getting NPE in this bead, cause my dataProvider initially is simply
>>> null.
>>> 
>>> 
>>> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-r
>>> oyale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fnpe_dp.png&data=02%7C
>>> 01%7Cpent%40adobe.com%7C73405c25faf041c2b6a608d53ef66915%7Cfa7b1b5a7b3443
>>> 8794aed2c178decee1%7C0%7C0%7C636484150397586526&sdata=X5QFRzVGvb3U2ASb6AY
>>> dbE4imeRzuihhWUEhWvCDboU%3D&reserved=0>
>>> 
>>> 
>>> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-r
>>> oyale-development.20373.n8.nabble&data=02%7C01%7Cpent%40adobe.com%7C73405
>>> c25faf041c2b6a608d53ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C
>>> 636484150397586526&sdata=PM7%2FkmhNoJPQ1vyCaJYMPQQutUDfNo9mK89r7l%2F5b3w%
>>> 3D&reserved=0.
>>> com/file/t1/npe_initially.png>
>>> 
>>> Thanks, Piotr
>>> 
>>> 
>>> 
>>> --
>>> Sent from: 
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-ro
>>> yale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7
>>> C73405c25faf041c2b6a608d53ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>>> 7C0%7C636484150397586526&sdata=A%2FnYC0Pz0zJzloLH5yNnQnzR%2BFT2IzmPoGNBKe
>>> ybqHY%3D&reserved=0
>>> 
>> 
>> 
>> 
>> -- 
>> 
>> Piotr Zarzycki
>> 
>> Patreon: 
>> *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>> eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C73405c25faf041c2
>> b6a608d53ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636484150397
>> 586526&sdata=yTNkr2RwZEmGixH4v57MWEnf3ahxBaG1DcyNGG39abA%3D&reserved=0
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>> eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C73405c25faf041c2
>> b6a608d53ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636484150397
>> 586526&sdata=yTNkr2RwZEmGixH4v57MWEnf3ahxBaG1DcyNGG39abA%3D&reserved=0>*
> 


Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-09 Thread Peter Ent
Piotr,

The model classes do not dispatch CollectionEvents - only ArrayList (or
something like it) dispatches those events. So we cannot listen on the
model.

What I've done, however, is change things in DynamicŠ so that when the
dataProvider does change (or is initially present), then a listener is set
up on that dataProvider. I think this will work and, in fact, work better.

Pull down my change and see if that works better.

‹peter

On 12/9/17, 6:17 AM, "Piotr Zarzycki"  wrote:

>Peter,
>
>That's when my initial implementation of that bead was to listen on model
>instead directly on dataProvider. I'm using following beads [1] for MDL
>Table and bead DynamicItemsRendererFactoryForArrayListData is being added
>through CSS.
>I hope that details help.
>
>[1] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apa
>che.org%2Foyex&data=02%7C01%7Cpent%40adobe.com%7C73405c25faf041c2b6a608d53
>ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636484150397586526&sd
>ata=XDE1Eh%2FS8%2FD%2BvQrHlzM9QhXFeC6pCkuU9jO30SLecTo%3D&reserved=0
>
>Thanks, Piotr
>
>
>2017-12-09 11:16 GMT+01:00 piotrz :
>
>> Hi Peter,
>>
>> I just tried newest build of Royale. I didn't use your new bead yet,
>>but I
>> had use the "DynamicItemsRendererFactoryForArrayListData", so decided to
>> first build project without any changes.
>> I'm getting NPE in this bead, cause my dataProvider initially is simply
>> null.
>>
>> 
>>>oyale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fnpe_dp.png&data=02%7C
>>01%7Cpent%40adobe.com%7C73405c25faf041c2b6a608d53ef66915%7Cfa7b1b5a7b3443
>>8794aed2c178decee1%7C0%7C0%7C636484150397586526&sdata=X5QFRzVGvb3U2ASb6AY
>>dbE4imeRzuihhWUEhWvCDboU%3D&reserved=0>
>>
>> 
>>>oyale-development.20373.n8.nabble&data=02%7C01%7Cpent%40adobe.com%7C73405
>>c25faf041c2b6a608d53ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C
>>636484150397586526&sdata=PM7%2FkmhNoJPQ1vyCaJYMPQQutUDfNo9mK89r7l%2F5b3w%
>>3D&reserved=0.
>> com/file/t1/npe_initially.png>
>>
>> Thanks, Piotr
>>
>>
>>
>> --
>> Sent from: 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-ro
>>yale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7
>>C73405c25faf041c2b6a608d53ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>>7C0%7C636484150397586526&sdata=A%2FnYC0Pz0zJzloLH5yNnQnzR%2BFT2IzmPoGNBKe
>>ybqHY%3D&reserved=0
>>
>
>
>
>-- 
>
>Piotr Zarzycki
>
>Patreon: 
>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C73405c25faf041c2
>b6a608d53ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636484150397
>586526&sdata=yTNkr2RwZEmGixH4v57MWEnf3ahxBaG1DcyNGG39abA%3D&reserved=0
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C73405c25faf041c2
>b6a608d53ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636484150397
>586526&sdata=yTNkr2RwZEmGixH4v57MWEnf3ahxBaG1DcyNGG39abA%3D&reserved=0>*



Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-09 Thread Peter Ent
Thanks for pointing that out. I’ll try to get to it over the weekend. I think 
there is an issue/concept we need to sort out: listen on Model vs dataProvider. 

Peter 


> On Dec 9, 2017, at 6:17 AM, Piotr Zarzycki  wrote:
> 
> Peter,
> 
> That's when my initial implementation of that bead was to listen on model
> instead directly on dataProvider. I'm using following beads [1] for MDL
> Table and bead DynamicItemsRendererFactoryForArrayListData is being added
> through CSS.
> I hope that details help.
> 
> [1] 
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2Foyex&data=02%7C01%7Cpent%40adobe.com%7C73405c25faf041c2b6a608d53ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636484150397586526&sdata=XDE1Eh%2FS8%2FD%2BvQrHlzM9QhXFeC6pCkuU9jO30SLecTo%3D&reserved=0
> 
> Thanks, Piotr
> 
> 
> 2017-12-09 11:16 GMT+01:00 piotrz :
> 
>> Hi Peter,
>> 
>> I just tried newest build of Royale. I didn't use your new bead yet, but I
>> had use the "DynamicItemsRendererFactoryForArrayListData", so decided to
>> first build project without any changes.
>> I'm getting NPE in this bead, cause my dataProvider initially is simply
>> null.
>> 
>> 
>> 
>> > com/file/t1/npe_initially.png>
>> 
>> Thanks, Piotr
>> 
>> 
>> 
>> --
>> Sent from: 
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2F&data=02%7C01%7Cpent%40adobe.com%7C73405c25faf041c2b6a608d53ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636484150397586526&sdata=A%2FnYC0Pz0zJzloLH5yNnQnzR%2BFT2IzmPoGNBKeybqHY%3D&reserved=0
>> 
> 
> 
> 
> -- 
> 
> Piotr Zarzycki
> 
> Patreon: 
> *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C73405c25faf041c2b6a608d53ef66915%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636484150397586526&sdata=yTNkr2RwZEmGixH4v57MWEnf3ahxBaG1DcyNGG39abA%3D&reserved=0
> *


Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-08 Thread Peter Ent
Hi.

I just pushed my changes. I changed DynamicItemsRenderer… a little bit and
added a new bead, DynamicRemoteItemRendererForArrayListData so you can
just attach that bead to the List strand and it will remove the
itemRenderer.

I wound up making a couple of smaller changes in the DataGroup and related
classes to handle adding an itemRenderer at a specific index.

—peter

On 12/7/17, 4:38 PM, "Piotr Zarzycki"  wrote:

>Cool! Look forward to your commit! :)
>
>Thanks, Piotr
>
>2017-12-07 22:19 GMT+01:00 Peter Ent :
>
>> It looks like, after discussing this with Alex, we will use
>> DynamicItemsRendererFactoryForArrayListData to refresh and insert items
>> and if you want to remove items, add in the RemoveItemRendererBead. I'll
>> probably think of a better name for that one.
>>
>> ‹peter
>>
>> On 12/7/17, 4:03 PM, "Piotr Zarzycki"  wrote:
>>
>> >My thoughts about DynamicItemsRendererFactoryForArrayListData was
>> >initially
>> >that this bead allows for Adding and Removing items from List. I just
>> >didn't have chance to finish it. As I said you can even remove it and
>>use
>> >your own.
>> >In whatever direction you will go I just need solution which allows me
>>for
>> >dynamic add/remove from MDL Table.
>> >
>> >Thanks, Piotr
>> >
>> >
>> >2017-12-07 22:00 GMT+01:00 Piotr Zarzycki :
>> >
>> >> Hi Peter,
>> >>
>> >> If your new Beads, will be doing also adding, you can even replace my
>> >> DynamicItemsRendererFactoryForArrayListData. I'm ok in whatever
>> >>direction
>> >> you will go. There is an example which is using that bead [1]
>> >>
>> >> [1]
>> >>https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fgithub.c
>> >>om%2Fapache%2Froyale-asjs%2Ftree%2Fdevelop%2Fexamples%
>> 2Froyale%2F&data=02
>> >>%7C01%7Cpent%40adobe.com%7C7eae28a09fe34ab5601208d53db7
>> 93e5%7Cfa7b1b5a7b3
>> >>4438794aed2c178decee1%7C0%7C0%7C636482781023742530&
>> sdata=lCQYe8JT4hVyaM%2
>> >>FHWXW3Bo0S737W2Z0l8YiGYs26Kc4%3D&reserved=0
>> >> MDLDynamicTableExample
>> >>
>> >> Thanks, Piotr
>> >>
>> >>
>> >> 2017-12-07 21:52 GMT+01:00 Peter Ent :
>> >>
>> >>> I'm trying to see if my new RemoveItemRendererBead works with
>> >>> DynamicItemsRendererFactoryForArrayListData and discovered that this
>> >>> class is listening to the model for the ITEM_ADDED event.
>> >>>
>> >>> The model doesn't dispatch the event - the dataProvider (ArrayList)
>> >>> dispatches the event. The model dispatches events like
>> >>>selectedIndexChanged.
>> >>>
>> >>> Is it OK that I change this class to listen to the dataProvider (aka
>> >>> ArrayList) in the model? I don't see that anything is depending on
>> >>> something that is not happening.
>> >>>
>> >>> Thanks,
>> >>> Peter
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >>
>> >> Piotr Zarzycki
>> >>
>> >> Patreon:
>> >>*https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fwww.pat
>> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com
>> %7C7eae28a09fe34a
>> >>b5601208d53db793e5%7Cfa7b1b5a7b34438794aed2c178de
>> cee1%7C0%7C0%7C636482781
>> >>023742530&sdata=wB4yRF4dVG4GsHy2n0%2FL%2FdEnrtW2q%2FG58h2vfcG7HrQ%3D&
>> rese
>> >>rved=0
>> >>
>> >><https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fwww.pat
>> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com
>> %7C7eae28a09fe34a
>> >>b5601208d53db793e5%7Cfa7b1b5a7b34438794aed2c178de
>> cee1%7C0%7C0%7C636482781
>> >>023742530&sdata=wB4yRF4dVG4GsHy2n0%2FL%2FdEnrtW2q%2FG58h2vfcG7HrQ%3D&
>> rese
>> >>rved=0>*
>> >>
>> >
>> >
>> >
>> >--
>> >
>> >Piotr Zarzycki
>> >
>> >Patreon:
>> >*https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fwww.patr
>> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%
>> 7C7eae28a09fe34ab5
>> >601208d53db793e5%7Cfa7b1b5a7b34438794aed2c178de
>> cee1%7C0%7C0%7C636482781023
>> >742530&sdata=wB4yRF4dVG4GsHy2n0%2FL%2FdEnrtW2q%2FG58h2vfcG7HrQ%3D&
>> reserved
>> >=0
>> ><https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fwww.patr
>> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%
>> 7C7eae28a09fe34ab5
>> >601208d53db793e5%7Cfa7b1b5a7b34438794aed2c178de
>> cee1%7C0%7C0%7C636482781023
>> >742530&sdata=wB4yRF4dVG4GsHy2n0%2FL%2FdEnrtW2q%2FG58h2vfcG7HrQ%3D&
>> reserved
>> >=0>*
>>
>>
>
>
>-- 
>
>Piotr Zarzycki
>
>Patreon: 
>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7Ca6e18c3663334e60
>255c08d53dbaf125%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636482795478
>566320&sdata=DYQRsQdp%2BB3EJveV3fOuWYXVgE%2Buqloy2PjJbPYGLB0%3D&reserved=0
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7Ca6e18c3663334e60
>255c08d53dbaf125%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636482795478
>566320&sdata=DYQRsQdp%2BB3EJveV3fOuWYXVgE%2Buqloy2PjJbPYGLB0%3D&reserved=0
>>*



Re: [Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-07 Thread Peter Ent
It looks like, after discussing this with Alex, we will use
DynamicItemsRendererFactoryForArrayListData to refresh and insert items
and if you want to remove items, add in the RemoveItemRendererBead. I'll
probably think of a better name for that one.

‹peter

On 12/7/17, 4:03 PM, "Piotr Zarzycki"  wrote:

>My thoughts about DynamicItemsRendererFactoryForArrayListData was
>initially
>that this bead allows for Adding and Removing items from List. I just
>didn't have chance to finish it. As I said you can even remove it and use
>your own.
>In whatever direction you will go I just need solution which allows me for
>dynamic add/remove from MDL Table.
>
>Thanks, Piotr
>
>
>2017-12-07 22:00 GMT+01:00 Piotr Zarzycki :
>
>> Hi Peter,
>>
>> If your new Beads, will be doing also adding, you can even replace my
>> DynamicItemsRendererFactoryForArrayListData. I'm ok in whatever
>>direction
>> you will go. There is an example which is using that bead [1]
>>
>> [1] 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>>om%2Fapache%2Froyale-asjs%2Ftree%2Fdevelop%2Fexamples%2Froyale%2F&data=02
>>%7C01%7Cpent%40adobe.com%7C7eae28a09fe34ab5601208d53db793e5%7Cfa7b1b5a7b3
>>4438794aed2c178decee1%7C0%7C0%7C636482781023742530&sdata=lCQYe8JT4hVyaM%2
>>FHWXW3Bo0S737W2Z0l8YiGYs26Kc4%3D&reserved=0
>> MDLDynamicTableExample
>>
>> Thanks, Piotr
>>
>>
>> 2017-12-07 21:52 GMT+01:00 Peter Ent :
>>
>>> I'm trying to see if my new RemoveItemRendererBead works with
>>> DynamicItemsRendererFactoryForArrayListData and discovered that this
>>> class is listening to the model for the ITEM_ADDED event.
>>>
>>> The model doesn't dispatch the event - the dataProvider (ArrayList)
>>> dispatches the event. The model dispatches events like
>>>selectedIndexChanged.
>>>
>>> Is it OK that I change this class to listen to the dataProvider (aka
>>> ArrayList) in the model? I don't see that anything is depending on
>>> something that is not happening.
>>>
>>> Thanks,
>>> Peter
>>>
>>
>>
>>
>> --
>>
>> Piotr Zarzycki
>>
>> Patreon: 
>>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C7eae28a09fe34a
>>b5601208d53db793e5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636482781
>>023742530&sdata=wB4yRF4dVG4GsHy2n0%2FL%2FdEnrtW2q%2FG58h2vfcG7HrQ%3D&rese
>>rved=0
>> 
>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C7eae28a09fe34a
>>b5601208d53db793e5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636482781
>>023742530&sdata=wB4yRF4dVG4GsHy2n0%2FL%2FdEnrtW2q%2FG58h2vfcG7HrQ%3D&rese
>>rved=0>*
>>
>
>
>
>-- 
>
>Piotr Zarzycki
>
>Patreon: 
>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C7eae28a09fe34ab5
>601208d53db793e5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636482781023
>742530&sdata=wB4yRF4dVG4GsHy2n0%2FL%2FdEnrtW2q%2FG58h2vfcG7HrQ%3D&reserved
>=0
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C7eae28a09fe34ab5
>601208d53db793e5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636482781023
>742530&sdata=wB4yRF4dVG4GsHy2n0%2FL%2FdEnrtW2q%2FG58h2vfcG7HrQ%3D&reserved
>=0>*



[Royale] DynamicItemsRendererFactoryForArrayListData

2017-12-07 Thread Peter Ent
I'm trying to see if my new RemoveItemRendererBead works with 
DynamicItemsRendererFactoryForArrayListData and discovered that this class is 
listening to the model for the ITEM_ADDED event.

The model doesn't dispatch the event - the dataProvider (ArrayList) dispatches 
the event. The model dispatches events like selectedIndexChanged.

Is it OK that I change this class to listen to the dataProvider (aka ArrayList) 
in the model? I don't see that anything is depending on something that is not 
happening.

Thanks,
Peter


Re: Names and Packages (was Re: MXMLDataInterpreter)

2017-12-07 Thread Peter Ent
I also wonder if List, DataGrid, Tree shouldn't be moved out of "basic"
and into "advanced" - they along with their supporting beads. From the
work I've been doing with handling "itemAdded" event vs
"dataProviderChanged", it might be easier for customers who want the
expense of a DataGrid to just pay for ArrayList as the default model
rather than trying to maintain Array as an entry point model. Having
Array, which does not offer a uniform access method (eg, getItemAt) means
duplicating code to support it. Then if ArrayList supported IDataModel (a
more generic name) instead of IArrayList, an app writer's more complex
data source, like a database, could implement IDataModel and be easily
substituted as the dataProvider to the List support beads.

Just a thought.

‹peter

On 12/7/17, 4:39 AM, "Harbs"  wrote:

>Related thoughts about names and packages:
>1. I think the bead classes should be organized better. There¹s currently
>controllers, layouts and models packages. There should be views,
>behaviors, appearances, etc.
>2. I¹m not sure that the ³html² package in Basic is the right name.
>³basic² seems much more appropriate to me as it¹s really not HTML
>specific and there¹s no guarantee in the components as to which html
>element is actually used.
>3. It also might be time to move code around in the different swcs.
>³core² in the Basic package might belong in Core rather than Basic. ³svg²
>should probably be moved into an SVG package, etc.
>
>> On Dec 7, 2017, at 10:13 AM, Harbs  wrote:
>> 
>> I was thinking a bit about naming. A few points to ponder:
>> 
>> 1. If anything it should mention Group rather than Container, because
>>anything subclassing GroupBase should work.
>> 2. Maybe mentioning the ³holder² type is just confusing. Maybe
>>SingleSelectionBead?
>> 3. This got me thinking about bead names in general:
>> 
>> I¹m wondering if bead names should be more explicit about their
>>function? We already have view beads with a suffix of View, controllers
>>with a suffix of Controller, models with a suffix of Model and Layout
>>for layout. What about SingleSelectionBehavior? Some suffixes might be:
>>Behavior, Appearance, Measurement. Basically, I¹m suggesting that the
>>bead names should describe what category they fit into. We can also drop
>>the word ³Bead² from them.
>> 
>> Thoughts?
>> 
>>> On Dec 6, 2017, at 11:35 PM, Harbs >>> wrote:
>>> 
>>> It is.
>>> 
>>> Possibly it could use a better name?
>>> 
 On Dec 6, 2017, at 9:16 PM, Alex Harui >>>> wrote:
 
 There probably shouldn't have been a need for
SingleSelectionContainerBead unless it is an aggregation of
SingleSelectionModelBead and SingleSelectionControllerBead.
>>> 
>> 
>



Re: Thoughts on ToggleButton

2017-12-07 Thread Peter Ent
I’ve felt that way on occasion too. What we did was create view beads for SWF 
and not JS in some cases because the createElement function was enough. Not 
sure what to do in these cases. 

Peter 


> On Dec 7, 2017, at 5:52 AM, Piotr Zarzycki  wrote:
> 
> Hi Harbs,
> 
> I would also place the logic which changes the image into the View bead. If
> I correct understand your thoughts. I think if it is possible it would be
> great reuse ImageButton in somehow, cause actually it is doing for one
> state what you want.
> 
> It is the matter of handling states in the view.
> 
> Thanks, Piotr
> 
> 
> 2017-12-07 11:46 GMT+01:00 Harbs :
> 
>> I need a toggle button which displays images (i.e. ImageToggleButton).
>> 
>> Right now, the way ImageButton works is that the main component modifies
>> the element to show an image. This works only if you want a single image no
>> matter what the state of the button is. If you want different images on
>> hover, active, selected, etc. that requires a separate component.
>> Additionally, I wanted a button in an app which uses images for states. I
>> ended up just using a plain old div and setting the background image via
>> css for the different states. Adding components for each and every use case
>> seems broken.
>> 
>> Ideally, with Royale architecture, the component should really be much
>> more about the behavior of the component and the view should be delegated
>> to a bead.
>> 
>> I’m thinking that the logic which sets the html of the element should be a
>> a view bead. Any thoughts about reworking this?
>> 
>> Harbs
> 
> 
> 
> 
> -- 
> 
> Piotr Zarzycki
> 
> Patreon: 
> *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C71c36e4bf8a741aec75108d53d608a2e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636482407203235193&sdata=NJ8ww%2BNnW%2Fd7RWIp%2BQ7p07QBNmvJgiwxIJgyzv5IuPE%3D&reserved=0
> *


Re: List, MDL Table - How to remove all content

2017-12-06 Thread Peter Ent
Just to give an idea of where this is going.

I've taken DataItemRendererFactorForArrayList and turned it into three
beads:

RefreshItemRenderersBead. This bead listens for dataProviderChanged and
replaced all of the itemRenderers in the IItemRendererParent with fresh
copies. It does this using the AddItemRendererBead.

AddItemRendererBead. This bead has two jobs: it exposes a function to
create a new itemRenderer and it listens for itemAdded on the
model.dataProvider and inserts a new itemRenderer (using the exposed
function). When this bead handles the itemAdded event it also dispatches a
"layoutNeeded" event on the strand.

RemoveItemRendererBead. This bead listens for itemRemoved and removed the
corresponding itemRenderer. Once the itemRenderer is removed it dispatches
"layoutNeeded" on the strand.




 


This would add the AddItemRendererBead automatically since
RefreshItemRenderersBead needs it.

I'm not completely happy with the names but that's the best I could come
up with to keep them reasonably short. I guess they could be
RefreshItemRenderersForArrayListData, AddItemRendererForArrayListData, and
RemoveItemRendererForArrayListData.

Its unfortunate that this won't work for Array. While Array does not
dispatch an itemAdded or itemRemoved, the Refresh bead could be used, but
the access to the individual items in Array is the [] operator while
ArrayList it is getItemAt(index). Aside from that, this bead would work
correctly for Array as well and could be the default bead for lists.

I'm wondering if we aren't going about providing data and models the right
way for our list classes. Our beads make a data type assumption about the
dataProvider; perhaps they should not. Might want to re-think this a bit.
Could be easier if the application writer supplied the model via a
standard interface.

—peter 

On 12/5/17, 3:51 PM, "Peter Ent"  wrote:

>I'm working on three approached trying to decide which is a best fit.
>
>Using the DynamicItemsRendererFactoryForArrayListData and adding handling
>for items removed and changed is the easiest thing to do. We have one
>bead, DataItemRendererFactoryForArrayList that's used for static lists and
>then this dynamic one. There is some overlap of code.
>
>Another approach is to leave DataItemRendererFactoryForArrayList alone and
>just be able to stick on a bead to watch for items being added and one to
>watch for items being removed. Adding a bead requires copying most of the
>bead-adding code from DataItemRendererFactoryForArrayList and putting that
>into the new bead. Then the DataItem… bead would do the wholesale change
>work and if you dynamically added or removed elements to the ArrayList the
>new beads would handle it. But even to do this, DataItemRenderer… bead
>needs to make some functions public because it knows how to get to them
>(eg, its itemRendererFactory and the DataGroup) from its strand.
>
>Another approach to basically rewrite DataItemRendererFactoryForArrayList
>and have beads that do full replacement, add/insert, remove item, handle
>item changes. This separates functionality and DataItemRenderer… becaomes
>more like a coordinator and supplier of information (like the DataGroup to
>use and itemRendererFactory). There is some duplication of code again, but
>perhaps not as much.
>
>I'm not really happy with any of these ways, but in the spirit of PAYG I'm
>now thinking the last way is better. So it will be a few more days before
>I wrap this up.
>
>—peter
>
>On 12/5/17, 1:40 PM, "Piotr Zarzycki"  wrote:
>
>>Alex,
>>
>>I do understand that, but in the results of that event which are coming
>>from ArrayList I need to do action on object (IItemRendererParent) and
>>remove those item renderers. - This part along with listeners to that
>>event
>>should be done by bead. As I understand Peter is digging in that area. No
>>matter whether his changes directly resolve my problems or not I prefer
>>wait for them.
>>
>>I can always write my own beads and have it as part of the application -
>>That's not the problem.
>>
>>Thanks a lot for the inputs!
>>Piotr
>>
>>
>>2017-12-05 19:35 GMT+01:00 Alex Harui :
>>
>>> In Flex, you can call ArrayList.removeItemAt and generate an
>>>ITEM_REMOVED
>>> for each call, or set the source of the ArrayList which triggers a
>>> different event as well.
>>>
>>> So as Peter is saying, for Royale, there will similarly be two
>>>different
>>> events and two different ways to remove items (individually or all at
>>> once) and you get to choose.  If you only have a few items in the list,
>>> you might want to call itemRemoved sev

Re: SingleSelectionContainerBead (was Re: MXMLDataInterpreter)

2017-12-06 Thread Peter Ent
Ha. Just sent a reply on the other thread with pretty much the same thing
that you did. Might be nice addition for Express. Just in-line the things
you want to toggle. Would it work with a ToggleButton, a CheckBox, and a
couple of RadioButtons or do all of the children have to be ToggleButtons?

‹peter

On 12/6/17, 7:37 AM, "Harbs"  wrote:

>OK.
>
>I¹m done with the SingleSelectionContainerBead and committed it.
>
>Here¹s a sample of how to use it:
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apa
>che.org%2FKG0k&data=02%7C01%7Cpent%40adobe.com%7C92de86e3967441568cd908d53
>ca61e1f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636481606522932424&sd
>ata=A2WCO0Vk3X7fYeOK06D6IvY7JnKGOADK4R0laAi2BKQ%3D&reserved=0
>ache.org%2FKG0k&data=02%7C01%7Cpent%40adobe.com%7C92de86e3967441568cd908d5
>3ca61e1f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636481606523088680&s
>data=k8AReDmUvQ9Hr2myYtna0tiPhTJGCxUj34ek18KkYj0%3D&reserved=0>
>
>It¹s intelligent enough to allow adding non-ISelectable components to a
>container and the index and selection management will only apply to the
>ISelectable children. That should give a lot of flexibility in how it can
>be used.
>
>I have not created a ³ToggleButtonBar² component. I¹m not sure if there¹s
>a need for one in Basic, although it might be nice to add one to Express?
>
>I wasn¹t sure if events should be dispatched from the host component. For
>now, the bead is dispatching the events directly.
>
>Comments welcomeŠ
>
>Harbs
>
>> On Dec 6, 2017, at 10:10 AM, Alex Harui 
>>wrote:
>> 
>> Of course I could be wrong, but I'm packing it in for tonight, so I'll
>> find out in my morning.
>



Re: MXMLDataInterpreter

2017-12-06 Thread Peter Ent
Sometimes you really just want a set of buttons to act like a toggle
button bar. There's nothing dynamic about them. Putting them into an
container (I would recommend Group over Container since its much lighter
in weight and you probably don't need the possibility of scrolling).

The SingleSelectionContainerBead is what is looking at the children of the
Group and listening for their events and translating the clicks into:
state changes in the buttons (one highlighted, the others not) and
dispatching an event:



Its much like a controller with some model information (what's selected).
That's a pretty straightforward way to make this. The
SingleSelectionContainerBead could, if needed, programmatically select one
of the toggle buttons via index; don't know if that¹s a requirement you
have, but it would make the bead more useable to others.

The List, dataProvider, itemRenderers, factories, etc. is pretty complex
right now. I think we've seen a lot and maybe we should rethink all of
that. I'm trying to make additional beads that augment the lists to just
create and insert a single itemRenderer in response to a CollectionEvent
on ArrayList. Conceptually simple, but its just messy.

FWIW: if you aren't concerned about the SWF side, then don't even use a
layout, jut make a Group (which has no layout by default) and style the
toggle buttons with display style. Make the browser do the work and reduce
your download size.

‹peter

On 12/6/17, 3:40 AM, "Harbs"  wrote:

>>> 
>>> Agreed, but I can¹t think of a way to do this.
>> 
>> One way is to have assignable removeElement logic.
>
>Meaning an assignable Function property, or something else?
>
>> Another is to have a bead that overwrites
>>UIBase.prototype.removeElement.
>> What won't work on SWF but will on JS.
>
>Interesting. Probably worth looking into.
>
>>> 
>>> I¹m trying to keep this really simple. ButtonBar extends List which
>>> requires dataProviders, ItemRendererers, etc. My approach is to allow
>>> adding any component which has a selected property to any container.
>>>The
>>> bead will handle correcting the selection of the unselected elements. I
>>> want to enable the following mxml:
>>> 
>>> 
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>> 
>>> 
>>> Those ToggleTextButtons could be RadioButtons, Checkboxes, etc.
>> 
>> We should make sure it works, but I would expect issues around focus,
>> keyboard selection and accessibility.  And also, how it upgrades to
>>being
>> able to load the text labels from resources or a server and add or
>>remove
>> buttons.
>
>I¹m not sure I understand why you think these are issues. The components
>should be pretty much self contained. I guess I¹ll see.
>
>> This sort of thing makes me wonder if there is some other item renderer
>> contract we should be offering instead.  IIRC, right now, the contract
>> dictates that the renderer must have a "data" property.  Maybe if there
>> was a contract where we could dictate the property to set you could just
>> drop in an existing component as a renderer.  There was a similar thing
>>in
>> Flex.  It was a bit heavy, but maybe folks don't care.
>> 
>> Way back I pointed out that all components should be able to be
>>expressed
>> as a UIBase or ContainerBase/GroupBase with a collection of beads.  It
>> would be interesting to see what the other List beads expect.  Right
>>now a
>> factory watches a dataProvider and generates an item renderer for each
>> dataProvider item.  Hopefully the other beads don't care how the item
>> renderers appeared and can be repurposed to your pattern.  IOW, either
>>you
>> specify a factory and an item renderer and a dataProvider or you supply
>>a
>> set of children, but everything else should work.
>
>I¹m not sure if I¹m following you here. My understanding was that the
>only way to specify the children of a list is to provide a dataProvider.
>It seems like you are saying that it should technically be possible to
>add the children directly. For kicks I just tried the following to see
>and it did not work at all (i.e. nothing was added to the button bar):
>
>   
>   
>   
>   
>
>
>I¹m guessing that you are suggesting a factory could be added with
>conditional logic.
>
>Harbs
>
>



Re: List, MDL Table - How to remove all content

2017-12-05 Thread Peter Ent
I'm working on three approached trying to decide which is a best fit.

Using the DynamicItemsRendererFactoryForArrayListData and adding handling
for items removed and changed is the easiest thing to do. We have one
bead, DataItemRendererFactoryForArrayList that's used for static lists and
then this dynamic one. There is some overlap of code.

Another approach is to leave DataItemRendererFactoryForArrayList alone and
just be able to stick on a bead to watch for items being added and one to
watch for items being removed. Adding a bead requires copying most of the
bead-adding code from DataItemRendererFactoryForArrayList and putting that
into the new bead. Then the DataItem… bead would do the wholesale change
work and if you dynamically added or removed elements to the ArrayList the
new beads would handle it. But even to do this, DataItemRenderer… bead
needs to make some functions public because it knows how to get to them
(eg, its itemRendererFactory and the DataGroup) from its strand.

Another approach to basically rewrite DataItemRendererFactoryForArrayList
and have beads that do full replacement, add/insert, remove item, handle
item changes. This separates functionality and DataItemRenderer… becaomes
more like a coordinator and supplier of information (like the DataGroup to
use and itemRendererFactory). There is some duplication of code again, but
perhaps not as much.

I'm not really happy with any of these ways, but in the spirit of PAYG I'm
now thinking the last way is better. So it will be a few more days before
I wrap this up.

—peter

On 12/5/17, 1:40 PM, "Piotr Zarzycki"  wrote:

>Alex,
>
>I do understand that, but in the results of that event which are coming
>from ArrayList I need to do action on object (IItemRendererParent) and
>remove those item renderers. - This part along with listeners to that
>event
>should be done by bead. As I understand Peter is digging in that area. No
>matter whether his changes directly resolve my problems or not I prefer
>wait for them.
>
>I can always write my own beads and have it as part of the application -
>That's not the problem.
>
>Thanks a lot for the inputs!
>Piotr
>
>
>2017-12-05 19:35 GMT+01:00 Alex Harui :
>
>> In Flex, you can call ArrayList.removeItemAt and generate an
>>ITEM_REMOVED
>> for each call, or set the source of the ArrayList which triggers a
>> different event as well.
>>
>> So as Peter is saying, for Royale, there will similarly be two different
>> events and two different ways to remove items (individually or all at
>> once) and you get to choose.  If you only have a few items in the list,
>> you might want to call itemRemoved several times and attach some cool
>> remove effect.
>>
>> My 2 cents,
>> -Alex
>>
>> On 12/5/17, 8:15 AM, "Peter Ent"  wrote:
>>
>> >If you remove everything from the ArrayList, the ArrayList dispatches
>> >ITEM_REMOVED for each item (if you have 1000 items you will get 1000
>> >events). ArrayList should probably not do that and instead, dispatch a
>> >single COLLECTION_CHANGED event once completed.
>> >
>> >But the RemoveItemBead will in fact, handle each ITEM_REMOVED event and
>> >eventually clear out the list. To be more efficient, another bead
>>should
>> >be made since DataItemRendererFactoryForArrayList does not listen to
>> >COLLECTION_CHANGED (perhaps it should or perhaps we need a new PAYG
>> >enhanced version of that).
>> >
>> >I have also been toying with just updating
>> >DynamicItemsRenderFactoryForArrayList to make it handle all the cases
>>and
>> >forget the individual beads. You can pay little by using the
>> >DataItemRendererFactoryForArrayList bead if you just want to display a
>> >static list or pay it all and use
>>DynamicItemsRendererFactoryForArrayList
>> >even though you may only be inserting and never removing items.
>> >
>> >—peter
>> >
>> >
>> >
>> >On 12/5/17, 10:17 AM, "Piotr Zarzycki" 
>>wrote:
>> >
>> >>However those two beads are for remove single items? What if I remove
>> >>everything from the ArrayList?
>> >>
>> >>On Tue, Dec 5, 2017, 16:16 Piotr Zarzycki 
>> >>wrote:
>> >>
>> >>> Those two beads will handle remove/add, so will I be able to use it
>>for
>> >>> list?
>> >>>
>> >>> It look like all your upcoming changes is something which I need
>>for.
>> >>>
>> >>> I'm look forward to your commit!
>> >>>
>> >>> Thanks, Piotr
>> >

Re: List, MDL Table - How to remove all content

2017-12-05 Thread Peter Ent
If you remove everything from the ArrayList, the ArrayList dispatches
ITEM_REMOVED for each item (if you have 1000 items you will get 1000
events). ArrayList should probably not do that and instead, dispatch a
single COLLECTION_CHANGED event once completed.

But the RemoveItemBead will in fact, handle each ITEM_REMOVED event and
eventually clear out the list. To be more efficient, another bead should
be made since DataItemRendererFactoryForArrayList does not listen to
COLLECTION_CHANGED (perhaps it should or perhaps we need a new PAYG
enhanced version of that).

I have also been toying with just updating
DynamicItemsRenderFactoryForArrayList to make it handle all the cases and
forget the individual beads. You can pay little by using the
DataItemRendererFactoryForArrayList bead if you just want to display a
static list or pay it all and use DynamicItemsRendererFactoryForArrayList
even though you may only be inserting and never removing items.

—peter



On 12/5/17, 10:17 AM, "Piotr Zarzycki"  wrote:

>However those two beads are for remove single items? What if I remove
>everything from the ArrayList?
>
>On Tue, Dec 5, 2017, 16:16 Piotr Zarzycki 
>wrote:
>
>> Those two beads will handle remove/add, so will I be able to use it for
>> list?
>>
>> It look like all your upcoming changes is something which I need for.
>>
>> I'm look forward to your commit!
>>
>> Thanks, Piotr
>>
>> On Tue, Dec 5, 2017, 16:03 Peter Ent  wrote:
>>
>>> I am working on an AddItemBead and RemoveItemBead. These beads assume
>>>the
>>> dataProvider in the model are ArrayList since that collection
>>>dispatches
>>> CollectionEvents with itemAdded and itemRemoved events. So these beads
>>> will either add an item to the DataGroup or remove one. Then they will
>>> adjust the model's selectedItem and selectedIndex accordingly.
>>>
>>> These will be beads of the DataItemRendererFactoryForArrayList and not
>>> beads on the List itself. I'm having to change
>>> DataItemRendererFactoryForArrayList to make things more public since it
>>> isn't trivial to add or remove an itemRenderer.
>>>
>>> —peter
>>>
>>> On 12/5/17, 9:51 AM, "Piotr Zarzycki" 
>>>wrote:
>>>
>>> >Hi Peter,
>>> >
>>> >I see that and there is question whether I can put that code as a
>>> separate
>>> >bead to our repo and whether you are not going to do this?
>>> >You have started other thread about Tree Grid and beads mentioned by
>>>you
>>> >seems to be the answer. Let me know before I create something.
>>> >
>>> >Thanks, Piotr
>>> >
>>> >On Tue, Dec 5, 2017, 15:43 Peter Ent  wrote:
>>> >
>>> >> I think some of this changes when you are running in the browser.
>>>Does
>>> >>our
>>> >> framework code really need to know if an item is visible or not to
>>> >>remove
>>> >> it? You want it gone from the DOM so you need to remove it and the
>>> >>browser
>>> >> takes care of the visuals. Depending on the CSS for that container,
>>> >>things
>>> >> would probably just sort themselves out - no need to fool with
>>> >>scrollbars
>>> >> either as they are the responsibility of the browser. On the browser
>>> >> platform, adding a remove function would not, I think, be as costly
>>>as
>>> >>it
>>> >> would on the Flash platform.
>>> >>
>>> >> Now the selectedItem and selectedIndex are, of course, Royale
>>>things so
>>> >> that would need to be considered. But that's the same as for adding
>>>or
>>> >> inserting an item into a list. Again, the browser should take care
>>>of
>>> >>the
>>> >> visuals once the item is added to the DOM. If the item has been
>>>tagged
>>> >> properly for CSS, you wouldn't even need to trigger the Royale
>>>layout.
>>> >>
>>> >> As a side note, the reason the Group does not have a default layout
>>>is
>>> >>to
>>> >> allow you to make a DIV (the Group), put stuff into it, and style
>>>it so
>>> >> that the "layout" is handled in CSS. This way added, removing,
>>>changing
>>> >>is
>>> >> left up the browser with no need for Royale code support since the
>>> >>browser
>>> >>

Re: List, MDL Table - How to remove all content

2017-12-05 Thread Peter Ent
I am working on an AddItemBead and RemoveItemBead. These beads assume the
dataProvider in the model are ArrayList since that collection dispatches
CollectionEvents with itemAdded and itemRemoved events. So these beads
will either add an item to the DataGroup or remove one. Then they will
adjust the model's selectedItem and selectedIndex accordingly.

These will be beads of the DataItemRendererFactoryForArrayList and not
beads on the List itself. I'm having to change
DataItemRendererFactoryForArrayList to make things more public since it
isn't trivial to add or remove an itemRenderer.

—peter

On 12/5/17, 9:51 AM, "Piotr Zarzycki"  wrote:

>Hi Peter,
>
>I see that and there is question whether I can put that code as a separate
>bead to our repo and whether you are not going to do this?
>You have started other thread about Tree Grid and beads mentioned by you
>seems to be the answer. Let me know before I create something.
>
>Thanks, Piotr
>
>On Tue, Dec 5, 2017, 15:43 Peter Ent  wrote:
>
>> I think some of this changes when you are running in the browser. Does
>>our
>> framework code really need to know if an item is visible or not to
>>remove
>> it? You want it gone from the DOM so you need to remove it and the
>>browser
>> takes care of the visuals. Depending on the CSS for that container,
>>things
>> would probably just sort themselves out - no need to fool with
>>scrollbars
>> either as they are the responsibility of the browser. On the browser
>> platform, adding a remove function would not, I think, be as costly as
>>it
>> would on the Flash platform.
>>
>> Now the selectedItem and selectedIndex are, of course, Royale things so
>> that would need to be considered. But that's the same as for adding or
>> inserting an item into a list. Again, the browser should take care of
>>the
>> visuals once the item is added to the DOM. If the item has been tagged
>> properly for CSS, you wouldn't even need to trigger the Royale layout.
>>
>> As a side note, the reason the Group does not have a default layout is
>>to
>> allow you to make a DIV (the Group), put stuff into it, and style it so
>> that the "layout" is handled in CSS. This way added, removing, changing
>>is
>> left up the browser with no need for Royale code support since the
>>browser
>> has all the code already and your Royale payload can be smaller. You
>>only
>> need to "pay" if you want a layout that cannot be accomplished with CSS.
>>
>> Supporting virtualized list is a completely different matter. HTML
>>doesn't
>> support that and then what Alex says really comes into play there.
>>
>> Back the question about removing all the rows. The DataGroup has a
>> function to remove all of the itemRenderers. You need to trigger that
>> somehow - either in your own code or perhaps a bead. Then clean up the
>> selectedItem/selectedIndex in the model.
>>
>> ‹peter
>>
>> On 12/5/17, 12:03 AM, "Alex Harui"  wrote:
>>
>> >In general, removing stuff should be PAYG.  Not every app needs to
>>remove
>> >things, and removal is often way more expensive than adding.
>> >
>> >For example, when an item is added to a sophisticated list, the various
>> >beads have to do these things:
>> >1) figure out if the item is on screen and a new renderer needs to be
>> >added.
>> >2) figure out if the item was added before the selectedIndex so the
>> >selectedIndex needs to be updated
>> >3) update the scrollbar (if any).
>> >
>> >When removing, the various beads have more to do:
>> >1) figure out if the item is on screen and its renderer needs to be
>> >removed.
>> >2) figure out if the renderer removed is on the last visible page of
>>the
>> >list and scrollbars are up and the item that will take up the removed
>> >renderer needs to come from a lower index in the data provider
>> >3) figure out if the item was added before the selectedIndex so the
>> >selectedIndex needs to be updated
>> >4) figure out if the item removed was the selectedIndex and thus decide
>> >what to do about selectedIndex and selectedItem
>> >5) update the scrollbar (if any).
>> >
>> >HTH,
>> >-Alex
>> >
>> >
>> >On 12/4/17, 5:08 PM, "Peter Ent"  wrote:
>> >
>> >>I need to think about this for a bit because I¹m fiddling with this
>>bit
>> >>of code in List. I¹ll get back to you in my tomorrow.
>> >>
>> >

Re: List, MDL Table - How to remove all content

2017-12-05 Thread Peter Ent
I think some of this changes when you are running in the browser. Does our
framework code really need to know if an item is visible or not to remove
it? You want it gone from the DOM so you need to remove it and the browser
takes care of the visuals. Depending on the CSS for that container, things
would probably just sort themselves out - no need to fool with scrollbars
either as they are the responsibility of the browser. On the browser
platform, adding a remove function would not, I think, be as costly as it
would on the Flash platform.

Now the selectedItem and selectedIndex are, of course, Royale things so
that would need to be considered. But that's the same as for adding or
inserting an item into a list. Again, the browser should take care of the
visuals once the item is added to the DOM. If the item has been tagged
properly for CSS, you wouldn't even need to trigger the Royale layout.

As a side note, the reason the Group does not have a default layout is to
allow you to make a DIV (the Group), put stuff into it, and style it so
that the "layout" is handled in CSS. This way added, removing, changing is
left up the browser with no need for Royale code support since the browser
has all the code already and your Royale payload can be smaller. You only
need to "pay" if you want a layout that cannot be accomplished with CSS.

Supporting virtualized list is a completely different matter. HTML doesn't
support that and then what Alex says really comes into play there.

Back the question about removing all the rows. The DataGroup has a
function to remove all of the itemRenderers. You need to trigger that
somehow - either in your own code or perhaps a bead. Then clean up the
selectedItem/selectedIndex in the model.

‹peter 

On 12/5/17, 12:03 AM, "Alex Harui"  wrote:

>In general, removing stuff should be PAYG.  Not every app needs to remove
>things, and removal is often way more expensive than adding.
>
>For example, when an item is added to a sophisticated list, the various
>beads have to do these things:
>1) figure out if the item is on screen and a new renderer needs to be
>added.
>2) figure out if the item was added before the selectedIndex so the
>selectedIndex needs to be updated
>3) update the scrollbar (if any).
>
>When removing, the various beads have more to do:
>1) figure out if the item is on screen and its renderer needs to be
>removed.
>2) figure out if the renderer removed is on the last visible page of the
>list and scrollbars are up and the item that will take up the removed
>renderer needs to come from a lower index in the data provider
>3) figure out if the item was added before the selectedIndex so the
>selectedIndex needs to be updated
>4) figure out if the item removed was the selectedIndex and thus decide
>what to do about selectedIndex and selectedItem
>5) update the scrollbar (if any).
>
>HTH,
>-Alex
>
>
>On 12/4/17, 5:08 PM, "Peter Ent"  wrote:
>
>>I need to think about this for a bit because I¹m fiddling with this bit
>>of code in List. I¹ll get back to you in my tomorrow.
>>
>>Peter 
>>
>>
>>> On Dec 4, 2017, at 4:53 PM, Piotr Zarzycki 
>>>wrote:
>>> Hi Guys,
>>> 
>>> I have faced an issue where solution seems to be not so easy. I have
>>>MDL
>>> Table (issue affects also List) with some rows.
>>> 
>>> If I simply assign to dataProvider = null it doesn't remove all
>>>content. It
>>> is because in our DataItemRendererFactoryForArrayData and other type of
>>> that class we have in listeners of  "dataProviderChanged" this code
>>>[1].
>>> Basically if we assign null to dataProvider we are not cleaning up item
>>> renderers, but should we ?
>>> 
>>> Maybe there should be separate bead which allow to do such operations ?
>>> 
>>> Thoughts ?
>>> 
>>> [1] 
>>>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.
>>>a
>>>pache.org%2F6qVy&data=02%7C01%7Cpent%40adobe.com%7C05ca01d43a8448485bd50
>>>8
>>>d53b617760%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6364802121644991
>>>9
>>>9&sdata=6mmrQ1g5CRuRmRyRpSLNil3LUn93jAKTJVI6RHSocL8%3D&reserved=0
>>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.
>>>a
>>>pache.org%2F6qVy&data=02%7C01%7Cpent%40adobe.com%7C05ca01d43a8448485bd50
>>>8
>>>d53b617760%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6364802121644991
>>>9
>>>9&sdata=6mmrQ1g5CRuRmRyRpSLNil3LUn93jAKTJVI6RHSocL8%3D&reserved=0>*
>>> 
>>> Thanks,
>>> -- 
>>> 
>>> Piotr 

Re: List, MDL Table - How to remove all content

2017-12-04 Thread Peter Ent
I need to think about this for a bit because I’m fiddling with this bit of code 
in List. I’ll get back to you in my tomorrow. 

Peter 


> On Dec 4, 2017, at 4:53 PM, Piotr Zarzycki  wrote:
> Hi Guys,
> 
> I have faced an issue where solution seems to be not so easy. I have MDL
> Table (issue affects also List) with some rows.
> 
> If I simply assign to dataProvider = null it doesn't remove all content. It
> is because in our DataItemRendererFactoryForArrayData and other type of
> that class we have in listeners of  "dataProviderChanged" this code [1].
> Basically if we assign null to dataProvider we are not cleaning up item
> renderers, but should we ?
> 
> Maybe there should be separate bead which allow to do such operations ?
> 
> Thoughts ?
> 
> [1] 
> *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F6qVy&data=02%7C01%7Cpent%40adobe.com%7C05ca01d43a8448485bd508d53b617760%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636480212164499199&sdata=6mmrQ1g5CRuRmRyRpSLNil3LUn93jAKTJVI6RHSocL8%3D&reserved=0
>  
> *
> 
> Thanks,
> -- 
> 
> Piotr Zarzycki
> 
> Patreon: 
> *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C05ca01d43a8448485bd508d53b617760%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636480212164499199&sdata=Lh5NSyP1MPIG6h5X4eG9RW3MWcQMiMBDevLzt8WoPS4%3D&reserved=0
> *


Re: [Royale - ASJS] PAYG list beads

2017-12-01 Thread Peter Ent
Update (aka, Thinking Out Loud):

I think the way to go here is to have new beads like ItemsAdded,
ItemsRemoved, ItemsChanged, added to DataItemRendererFactoryForArrayList
and that bead can delegate the updating of the DataGroup to those beads,
if present. The default can be a bead that listens for
"dataProviderChanged" and do the wholesale replace that the factory bead
does now.

The factory beads will need to have a change in their interfaces to
support having their own beads and to be able to delegate to them.

—peter



On 12/1/17, 9:59 AM, "Peter Ent"  wrote:

>Thanks for the reminder, Justin.
>
>I had thought about the Decorator pattern; after all, beads really should
>be thought of as Decorators. When we add a password protection bead to the
>TextInput component, it does not change what the TextInput component is,
>it merely enhances it.
>
>The problem is that some things in Royale have wandered away from the
>Decorator pattern. The DataItemRendererFactory* beads probably do too
>much. For example, not only are they listening for a "dataProviderChanged"
>event, they act on it by erasing the current itemRenderers and generating
>new ones. 
>
>To me, a Decorator version of the DataItemRendererFactory would simply
>provide an itemRenderer from information passed to it (such as the class
>to use). Responding to items being added, changed, or removed would not
>fall to the factory but to something else that would call upon the factory
>to create a new itemRenderer if needed.
>
>The question becomes, what part of a List (or DataContainer) is
>responsible for driving the creation of itemRenderers and listening for
>other changes? To make that a replaceable part, the DataContainer needs a
>core engine that can delegate to its Decorators the responsibility of
>modifying the visuals (itemRenderers) in various ways. That is, in one
>case the addition of a datum to the model would cause a wholesale
>replacement of all itemRenderers and in another case a single new
>itemRenderer would be inserted into the display list.
>
>In either case, the layout beads would then need to know something has
>changed (we do have an event for that) to process the children. Some
>layouts would need to examine every child and move and/or resize it.
>Another layout might cause a fluid effect of sliding some items down to
>insert the new item - which means the item being inserted has to be
>communicated to the layout in a PAYG fashion (meaning: many layouts won't
>need this information but a few might).
>
>The PAYG world gives us lots of opportunities to craft this in different
>ways. I will re-think this now that the Decorator pattern has been brought
>up.
>
>Again, thanks for pointing this out.
>‹peter
>
>On 11/30/17, 7:33 PM, "Justin Mclean"  wrote:
>
>>Hi,
>>
>>>  thinking that when you add DataProviderItemsChangeNotifier to a List
>>>strand, you could also replace the itemRenderer factory that is more
>>>"capable":
>>> 
>>> DataItemRendererFactoryForArrayListSupportsItemsAdded
>>> DataItemRendererFactoryForArrayListSupportsItemsRemoved
>>> DataItemRendererFactoryForArrayListSupportsItemsAddedAndRemoved
>>> DataItemRendererFactoryForArrayListSupportsItemsChanged
>>> DataItemRendererFactoryForArrayListSupportsItemsAddedChangedAndRemoved
>>
>>A suggestion would be looking into using the decorator design pattern [1]
>>that way you would only need three beads (and less code duplication).
>>
>>Thanks,
>>Justin
>>
>>1. 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourcema
>>k
>>ing.com%2Fdesign_patterns%2Fdecorator&data=02%7C01%7Cpent%40adobe.com%7C9
>>4
>>dc46d35417405d838d08d5385323db%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0
>>%
>>7C636476852095520303&sdata=VBGHJoNyY1%2BK5T8ZtpWlNmYJGKatuqzkCt4TO%2F1%2B
>>y
>>XI%3D&reserved=0
>



Re: [Royale - ASJS] PAYG list beads

2017-12-01 Thread Peter Ent
Thanks for the reminder, Justin.

I had thought about the Decorator pattern; after all, beads really should
be thought of as Decorators. When we add a password protection bead to the
TextInput component, it does not change what the TextInput component is,
it merely enhances it.

The problem is that some things in Royale have wandered away from the
Decorator pattern. The DataItemRendererFactory* beads probably do too
much. For example, not only are they listening for a "dataProviderChanged"
event, they act on it by erasing the current itemRenderers and generating
new ones. 

To me, a Decorator version of the DataItemRendererFactory would simply
provide an itemRenderer from information passed to it (such as the class
to use). Responding to items being added, changed, or removed would not
fall to the factory but to something else that would call upon the factory
to create a new itemRenderer if needed.

The question becomes, what part of a List (or DataContainer) is
responsible for driving the creation of itemRenderers and listening for
other changes? To make that a replaceable part, the DataContainer needs a
core engine that can delegate to its Decorators the responsibility of
modifying the visuals (itemRenderers) in various ways. That is, in one
case the addition of a datum to the model would cause a wholesale
replacement of all itemRenderers and in another case a single new
itemRenderer would be inserted into the display list.

In either case, the layout beads would then need to know something has
changed (we do have an event for that) to process the children. Some
layouts would need to examine every child and move and/or resize it.
Another layout might cause a fluid effect of sliding some items down to
insert the new item - which means the item being inserted has to be
communicated to the layout in a PAYG fashion (meaning: many layouts won't
need this information but a few might).

The PAYG world gives us lots of opportunities to craft this in different
ways. I will re-think this now that the Decorator pattern has been brought
up.

Again, thanks for pointing this out.
‹peter

On 11/30/17, 7:33 PM, "Justin Mclean"  wrote:

>Hi,
>
>>  thinking that when you add DataProviderItemsChangeNotifier to a List
>>strand, you could also replace the itemRenderer factory that is more
>>"capable":
>> 
>> DataItemRendererFactoryForArrayListSupportsItemsAdded
>> DataItemRendererFactoryForArrayListSupportsItemsRemoved
>> DataItemRendererFactoryForArrayListSupportsItemsAddedAndRemoved
>> DataItemRendererFactoryForArrayListSupportsItemsChanged
>> DataItemRendererFactoryForArrayListSupportsItemsAddedChangedAndRemoved
>
>A suggestion would be looking into using the decorator design pattern [1]
>that way you would only need three beads (and less code duplication).
>
>Thanks,
>Justin
>
>1. 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourcemak
>ing.com%2Fdesign_patterns%2Fdecorator&data=02%7C01%7Cpent%40adobe.com%7C94
>dc46d35417405d838d08d5385323db%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
>7C636476852095520303&sdata=VBGHJoNyY1%2BK5T8ZtpWlNmYJGKatuqzkCt4TO%2F1%2By
>XI%3D&reserved=0



[Royale - ASJS] PAYG list beads

2017-11-30 Thread Peter Ent
Hi,

I'm developing a TreeGrid (Tree/DataGrid hybrid). It could use the ability to 
add and remove rows on the fly. Right now, we only can add/remove/change data 
to our dataProvider and then have all of the itemRenderers re-generated. At 
least I do not see that there exists beads to do otherwise.

I'm thinking that when you add DataProviderItemsChangeNotifier to a List 
strand, you could also replace the itemRenderer factory that is more "capable":

DataItemRendererFactoryForArrayListSupportsItemsAdded
DataItemRendererFactoryForArrayListSupportsItemsRemoved
DataItemRendererFactoryForArrayListSupportsItemsAddedAndRemoved
DataItemRendererFactoryForArrayListSupportsItemsChanged
DataItemRendererFactoryForArrayListSupportsItemsAddedChangedAndRemoved

This would keep with the PAYG philosophy and let developers choose the precise 
features they wanted to include.

What do you think? Does something like this already exist and I just don't see 
it; I don't want to duplicate effort.

—peter


Re: FAQ page on website

2017-11-16 Thread Peter Ent
As a native (American) English speaker (and sadly, the only language I
speak and often not that well sometimes), reading something written by a
non-native speak is usually pretty easy and the meaning clear. I'd be more
than happy to help with words or phrasing if someone wants guidance.

We have a very international group here which is fantastic (maybe the UN
could learn something from us!). Do not let anything stop you from
contributing; we are all here to help.

‹peter

On 11/15/17, 1:56 PM, "Piotr Zarzycki"  wrote:

>Hi Carlos,
>
>One question which come up to each of so far created website - Does they
>need to be checked by someone who is native english speaker ?
>
>Thanks, Piotr
>
>
>2017-11-15 19:52 GMT+01:00 Carlos Rovira :
>
>> Hi,
>>
>> I put on place a first draft of the FAQ page. You can review it here:
>>
>> 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Froyale.co
>>deoscopic.com%2Ffaq%2F&data=02%7C01%7C%7Ce84c70fd7d114d5829a108d52c5aa142
>>%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636463690116847969&sdata=b%
>>2B1FYvnSG8Qx1lPKRBN6DeDhbjimurs1HWJ4fVC3KjY%3D&reserved=0
>>
>> As always, please check it and read to discover :
>>
>> * if the content is what you expect
>> * If sections are ok, and if you want to add more sections.
>> * for the content you consider right if is well written (think that I'm
>> spanish and I try to do my best, but some phrases or words could have
>>typos
>> and other irregularities )
>> * If you think some content should be added, please, post it here, so I
>>can
>> copy and paste to the page, or request for a user in the wordpress
>>instance
>> so you can enter it yourself.
>>
>> Thanks for your help!
>>
>> --
>> Carlos Rovira
>> 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%
>>2Fcarlosrovira&data=02%7C01%7C%7Ce84c70fd7d114d5829a108d52c5aa142%7Cfa7b1
>>b5a7b34438794aed2c178decee1%7C0%7C0%7C636463690116847969&sdata=VrA%2BgIeF
>>BujKT%2FiKwNX5HvQKtuKNhGXtFvbBwrdnakM%3D&reserved=0
>>
>
>
>
>-- 
>
>Piotr Zarzycki
>
>Patreon: 
>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7C%7Ce84c70fd7d114d5829a108d52c5aa142
>%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636463690116847969&sdata=I4X
>vVNCEKrpslEN8rckqaYg80IDNXlIrOGSsJRap0gI%3D&reserved=0
>eon.com%2Fpiotrzarzycki&data=02%7C01%7C%7Ce84c70fd7d114d5829a108d52c5aa142
>%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636463690116847969&sdata=I4X
>vVNCEKrpslEN8rckqaYg80IDNXlIrOGSsJRap0gI%3D&reserved=0>*



Re: About Semantic UI and our UI Set + look-and-feel effort

2017-11-14 Thread Peter Ent
For things like lists and tables, we have our dataProviders and
itemRenderer factories. Could probably be more streamlined to produce list
and table elements for the itemRenderers. Being able to make a quick
in-line list with some text and buttons ought to be easy and not require a
dataProvider and itemRenderers; those should also be possible, but I think
we should consider having both.

‹peter

On 11/14/17, 10:25 AM, "Yishay Weiss"  wrote:

>One thing that I found problematic with the mdl implementation was that
>there was a feeling of thin wrappers on a blackbox. Whatever default
>theme we choose, I think we should implement it so the core functionality
>is easily understandable to an AS3 programmer with some CSS knowledge.
>That should also help create new good looking components (and themes)
>easier by looking at the existing examples.
>
>
>
>
>From: carlos.rov...@gmail.com  on behalf of
>Carlos Rovira 
>Sent: Tuesday, November 14, 2017 5:10:21 PM
>To: dev@royale.apache.org
>Subject: About Semantic UI and our UI Set + look-and-feel effort
>
>Hi,
>
>I was looking at Semantic UI and it has most of the things we want to get
>with our UI set + Look and feel effort.
>
>I need to investigate it more, but maybe we don't need to reinvent the
>wheel here. Supposing licenses are ok, we could base the new UI Set to be
>based on Semantic UI or make our own Semantic UI implementation.
>
>Regarding look -and-feel you can get most of the main actual look and
>feels
>out-of-the-box (material, amazon, bootstrap, twitter,...)
>
>The main concepts behind are great as well:
>
>* Use concise and natural HTML
>* Intuitive JS
>
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsemantic-
>ui.com&data=02%7C01%7C%7C51ef41a95ca2499c44e508d52b73f19d%7Cfa7b1b5a7b3443
>8794aed2c178decee1%7C0%7C0%7C636462699328603148&sdata=edLmEIa8vS0VZqKrTdir
>GxZxeAwpHE05ba4wUxKMAbs%3D&reserved=0
>
>It has already integrations with React, Angular,...
>
>Maybe our potencial is not in this area but in our composition concepts
>and
>this could be integrated.
>
>This would need to make a new UI Set as we did with MDL, but this time
>this
>could be the main UI Set since it could have all we need, different look
>and feels, all controls needed...
>
>We can as well use it to reach 1.0 and from there think if we need to
>create out own.
>
>Another thing to think about it is how this will deal with other outputs
>far beyond javascript (SWF, WebAssembly,...), maybe those outputs will
>need
>to be develop by us
>
>Semantic-UI is under MIT license what I think is compatible with create
>what we need or take parts from here right?
>
>Thoughts?
>
>
>--
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7C%7C51ef41a95ca2499c44e508d52b73f19d%7Cfa7b1b5
>a7b34438794aed2c178decee1%7C0%7C0%7C636462699328603148&sdata=uofFjlOAiyWXA
>GS%2Bk49ieME8QJL7cgxNrlCGwi798ZY%3D&reserved=0



Re: About Semantic UI and our UI Set + look-and-feel effort

2017-11-14 Thread Peter Ent
I did a quick look. Seems pretty cool and definitely useful. Plus it gives
us direction. But please, please, please, figure out licensing before
going a step further.

This is what I found: https://semantic-ui.mit-license.org

‹peter

On 11/14/17, 10:10 AM, "carlos.rov...@gmail.com on behalf of Carlos
Rovira" 
wrote:

>Hi,
>
>I was looking at Semantic UI and it has most of the things we want to get
>with our UI set + Look and feel effort.
>
>I need to investigate it more, but maybe we don't need to reinvent the
>wheel here. Supposing licenses are ok, we could base the new UI Set to be
>based on Semantic UI or make our own Semantic UI implementation.
>
>Regarding look -and-feel you can get most of the main actual look and
>feels
>out-of-the-box (material, amazon, bootstrap, twitter,...)
>
>The main concepts behind are great as well:
>
>* Use concise and natural HTML
>* Intuitive JS
>
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsemantic-
>ui.com&data=02%7C01%7C%7Ccf07ee8f4d624dc3f3a808d52b71e30b%7Cfa7b1b5a7b3443
>8794aed2c178decee1%7C0%7C0%7C636462690496476790&sdata=BkWnPANyqUPXEK6AVBZ3
>fgJEAbM%2Bd9EZkGThutaSNUA%3D&reserved=0
>
>It has already integrations with React, Angular,...
>
>Maybe our potencial is not in this area but in our composition concepts
>and
>this could be integrated.
>
>This would need to make a new UI Set as we did with MDL, but this time
>this
>could be the main UI Set since it could have all we need, different look
>and feels, all controls needed...
>
>We can as well use it to reach 1.0 and from there think if we need to
>create out own.
>
>Another thing to think about it is how this will deal with other outputs
>far beyond javascript (SWF, WebAssembly,...), maybe those outputs will
>need
>to be develop by us
>
>Semantic-UI is under MIT license what I think is compatible with create
>what we need or take parts from here right?
>
>Thoughts?
>
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7C%7Ccf07ee8f4d624dc3f3a808d52b71e30b%7Cfa7b1b5
>a7b34438794aed2c178decee1%7C0%7C0%7C636462690496476790&sdata=XRlG5rGdMKsEQ
>kvFXCHG8%2FrRz%2F2gVSozQbMcXw%2B3LKo%3D&reserved=0



Re: [royale-asjs] branch develop updated: PanelView no longer removes beads. Instead, it transfers beads from the Panel to its Container content area.

2017-11-09 Thread Peter Ent
I wonder if that's not a little too complex. I really couldn't figure out
how to use it without experimentation and even then, didn't realize about
the itemRenderer aspect.

How about something like this:












This way we don't have to do much special and the developer doesn't have
to see dataProviders and . The AccordionItem really supplies
just a header and it could even be a subclass of TitleBar that accepts a
single child. Plus you could change its IBeadView from
AccordionItemViewBead to something custom. And with each AccordionItem
having a single child, that child could be anything you wanted.

I'll just publish an example for how it works now and leave it unless
there's a desire for something else.

—peter




On 11/9/17, 2:32 PM, "Harbs"  wrote:

>The rendering of the items is done by ItemRenderers (which in the default
>I believe is a Panel).
>
>> On Nov 9, 2017, at 9:31 PM, Harbs  wrote:
>> 
>> Accordion was designed to not care what specific components the
>>individual panels are. For a title, it needs a TitleBarModel. That’s it.
>> 
>> Here’s an example:
>> 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>>om%2Fyishayw%2FExamples%2Fblob%2FAccordion_Express%2FExamples.mxml&data=0
>>2%7C01%7C%7C095c290879ce4c1d712108d527a89e8e%7Cfa7b1b5a7b34438794aed2c178
>>decee1%7C0%7C0%7C636458527527098248&sdata=DutGVMejNnl7H18IB%2BqhqlKOYlwUn
>>G8sh2j%2BiKPPHhY%3D&reserved=0
>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.
>>com%2Fyishayw%2FExamples%2Fblob%2FAccordion_Express%2FExamples.mxml&data=
>>02%7C01%7C%7C095c290879ce4c1d712108d527a89e8e%7Cfa7b1b5a7b34438794aed2c17
>>8decee1%7C0%7C0%7C636458527527098248&sdata=DutGVMejNnl7H18IB%2BqhqlKOYlwU
>>nG8sh2j%2BiKPPHhY%3D&reserved=0>
>> 
>>> On Nov 9, 2017, at 6:39 PM, Peter Ent >><mailto:p...@adobe.com.INVALID>> wrote:
>>> 
>>> I saw that Container worked, but how do you get labels on them?
>>> —peter
>>> 
>>> 
>>> On 11/9/17, 9:54 AM, "Harbs" >><mailto:harbs.li...@gmail.com>> wrote:
>>> 
>>>> Inside the js:Array should be Container elements.
>>>> 
>>>> I’m using it in production.
>>>> 
>>>>> On Nov 9, 2017, at 4:28 PM, Peter Ent >>>><mailto:p...@adobe.com.INVALID>> wrote:
>>>>> 
>>>>> I tested my change. I don't think it adversely affects Accordion at
>>>>>all,
>>>>> but Accordion doesn't seem to be working correctly anyway.
>>>>> 
>>>>> I'm getting Panels inside of Panels. So if in the 
>>>>>supplied to
>>>>> Accordion, I have a , that Panel gives title to the
>>>>>Accordion
>>>>> header, but then a panel becomes a child of that container. I think
>>>>> Accordion needs a re-do.
>>>>> 
>>>>> The change I made to PanelView is very simple and I cannot see it
>>>>>having
>>>>> any adverse affects. I also found an old email where I said I would
>>>>>make
>>>>> an official AccordionExample as part of the examples/ directory. I'm
>>>>> going
>>>>> to take what I just put together and do that so we'll have something
>>>>>to
>>>>> work with.
>>>>> 
>>>>> ‹peter
>>>>> 
>>>>> On 11/8/17, 5:23 PM, "Harbs" >>>><mailto:harbs.li...@gmail.com>> wrote:
>>>>> 
>>>>>> Did you test if this effects Accordion?
>>>>>> 
>>>>>>> On Nov 8, 2017, at 8:00 PM, p...@apache.org
>>>>>>><mailto:p...@apache.org> wrote:
>>>>>>> 
>>>>>>> This is an automated email from the ASF dual-hosted git repository.
>>>>>>> 
>>>>>>> pent pushed a commit to branch develop
>>>>>>> in repository
>>>>>>> 
>>>>>>> 
>>>>>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
>>>>>>>box 
>>>>>>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
>>>>>>>tbox>
>>>>>>> .a
>>>>>>> 
>>>>>>> 
>>>>>>>pache.org%2Frepos%2Fasf%2Froyale-asjs.git&data=02%7C01%7

Re: [royale-asjs] branch develop updated: PanelView no longer removes beads. Instead, it transfers beads from the Panel to its Container content area.

2017-11-09 Thread Peter Ent
I saw that Container worked, but how do you get labels on them?
—peter


On 11/9/17, 9:54 AM, "Harbs"  wrote:

>Inside the js:Array should be Container elements.
>
>I’m using it in production.
>
>> On Nov 9, 2017, at 4:28 PM, Peter Ent  wrote:
>> 
>> I tested my change. I don't think it adversely affects Accordion at all,
>> but Accordion doesn't seem to be working correctly anyway.
>> 
>> I'm getting Panels inside of Panels. So if in the  supplied to
>> Accordion, I have a , that Panel gives title to the Accordion
>> header, but then a panel becomes a child of that container. I think
>> Accordion needs a re-do.
>> 
>> The change I made to PanelView is very simple and I cannot see it having
>> any adverse affects. I also found an old email where I said I would make
>> an official AccordionExample as part of the examples/ directory. I'm
>>going
>> to take what I just put together and do that so we'll have something to
>> work with.
>> 
>> ‹peter
>> 
>> On 11/8/17, 5:23 PM, "Harbs"  wrote:
>> 
>>> Did you test if this effects Accordion?
>>> 
>>>> On Nov 8, 2017, at 8:00 PM, p...@apache.org wrote:
>>>> 
>>>> This is an automated email from the ASF dual-hosted git repository.
>>>> 
>>>> pent pushed a commit to branch develop
>>>> in repository 
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox
>>>>.a
>>>> 
>>>>pache.org%2Frepos%2Fasf%2Froyale-asjs.git&data=02%7C01%7C%7C562974befcb
>>>>e4
>>>> 
>>>>86610ce08d526f758a5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636457
>>>>76
>>>> 
>>>>6135386019&sdata=5cJenPvUsEXBM5%2FqvCbC557p5fkLxsCZCP%2By0LIitH8%3D&res
>>>>er
>>>> ved=0
>>>> 
>>>> 
>>>> The following commit(s) were added to refs/heads/develop by this push:
>>>>new 3e77b0c  PanelView no longer removes beads. Instead, it
>>>> transfers beads from the Panel to its Container content area.
>>>> 3e77b0c is described below
>>>> 
>>>> commit 3e77b0ce0a9e967fd229a2218cd277d593b58e69
>>>> Author: Peter Ent 
>>>> AuthorDate: Wed Nov 8 13:00:20 2017 -0500
>>>> 
>>>>   PanelView no longer removes beads. Instead, it transfers beads from
>>>> the Panel to its Container content area.
>>>> ---
>>>> .../org/apache/royale/html/beads/PanelView.as  | 58
>>>> --
>>>> 1 file changed, 32 insertions(+), 26 deletions(-)
>>>> 
>>>> diff --git 
>>>> 
>>>>a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/bead
>>>>s/
>>>> PanelView.as 
>>>> 
>>>>b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/bead
>>>>s/
>>>> PanelView.as
>>>> index 67b0552..e1343ff 100644
>>>> --- 
>>>> 
>>>>a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/bead
>>>>s/
>>>> PanelView.as
>>>> +++ 
>>>> 
>>>>b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/bead
>>>>s/
>>>> PanelView.as
>>>> @@ -133,10 +133,29 @@ package org.apache.royale.html.beads
>>>> 
>>>>var host:UIBase = UIBase(value);
>>>> 
>>>> +  // Look for a layout and/or viewport bead on the host's 
>>>> beads
>>>>list.
>>>> If one
>>>> +  // is found, pull it off so it will not be added 
>>>> permanently
>>>> +  // to the strand.
>>>> +var beads: Array = host.beads;
>>>> +var transferLayoutBead: IBeadLayout;
>>>> +var transferViewportBead: IViewport;
>>>> +  if (host.beads != null) {
>>>> +  for(var i:int=host.beads.length-1; i >= 0; i--) 
>>>> {
>>>> +  if (host.beads[i] is IBeadLayout) {
>>>> +  transferLayoutBead = 
>>>> host.beads[i] as IBeadLayout;
>>>> +  host.beads.splice(i, 1);
>>>> +  }
>>>> +

Re: [royale-asjs] branch develop updated: PanelView no longer removes beads. Instead, it transfers beads from the Panel to its Container content area.

2017-11-09 Thread Peter Ent
I tested my change. I don't think it adversely affects Accordion at all,
but Accordion doesn't seem to be working correctly anyway.

I'm getting Panels inside of Panels. So if in the  supplied to
Accordion, I have a , that Panel gives title to the Accordion
header, but then a panel becomes a child of that container. I think
Accordion needs a re-do.

The change I made to PanelView is very simple and I cannot see it having
any adverse affects. I also found an old email where I said I would make
an official AccordionExample as part of the examples/ directory. I'm going
to take what I just put together and do that so we'll have something to
work with.

‹peter

On 11/8/17, 5:23 PM, "Harbs"  wrote:

>Did you test if this effects Accordion?
>
>> On Nov 8, 2017, at 8:00 PM, p...@apache.org wrote:
>> 
>> This is an automated email from the ASF dual-hosted git repository.
>> 
>> pent pushed a commit to branch develop
>> in repository 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.a
>>pache.org%2Frepos%2Fasf%2Froyale-asjs.git&data=02%7C01%7C%7C562974befcbe4
>>86610ce08d526f758a5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63645776
>>6135386019&sdata=5cJenPvUsEXBM5%2FqvCbC557p5fkLxsCZCP%2By0LIitH8%3D&reser
>>ved=0
>> 
>> 
>> The following commit(s) were added to refs/heads/develop by this push:
>> new 3e77b0c  PanelView no longer removes beads. Instead, it
>>transfers beads from the Panel to its Container content area.
>> 3e77b0c is described below
>> 
>> commit 3e77b0ce0a9e967fd229a2218cd277d593b58e69
>> Author: Peter Ent 
>> AuthorDate: Wed Nov 8 13:00:20 2017 -0500
>> 
>>PanelView no longer removes beads. Instead, it transfers beads from
>>the Panel to its Container content area.
>> ---
>> .../org/apache/royale/html/beads/PanelView.as  | 58
>>--
>> 1 file changed, 32 insertions(+), 26 deletions(-)
>> 
>> diff --git 
>>a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/
>>PanelView.as 
>>b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/
>>PanelView.as
>> index 67b0552..e1343ff 100644
>> --- 
>>a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/
>>PanelView.as
>> +++ 
>>b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/
>>PanelView.as
>> @@ -133,10 +133,29 @@ package org.apache.royale.html.beads
>> 
>> var host:UIBase = UIBase(value);
>> 
>> +// Look for a layout and/or viewport bead on the host's 
>> beads list.
>>If one
>> +// is found, pull it off so it will not be added 
>> permanently
>> +// to the strand.
>> +var beads: Array = host.beads;
>> +var transferLayoutBead: IBeadLayout;
>> +var transferViewportBead: IViewport;
>> +if (host.beads != null) {
>> +for(var i:int=host.beads.length-1; i >= 0; i--) 
>> {
>> +if (host.beads[i] is IBeadLayout) {
>> +transferLayoutBead = 
>> host.beads[i] as IBeadLayout;
>> +host.beads.splice(i, 1);
>> +}
>> +else if (host.beads[i] is IViewport) {
>> +transferViewportBead = 
>> host.beads[i] as IViewport
>> +host.beads.splice(i, 1);
>> +}
>> +}
>> +}
>> +
>> if (!_titleBar) {
>> _titleBar = new TitleBar();
>>  }
>> -
>> +
>>  _titleBar.id = "panelTitleBar";
>> 
>>  COMPILE::SWF {
>> @@ -153,7 +172,7 @@ package org.apache.royale.html.beads
>>  _titleBar.element.style["flex-grow"] = "0";
>>  _titleBar.element.style["order"] = "1";
>>  }
>> -
>> +
>>  _titleBar.addEventListener("close", handleClose);
>> 
>>  // replace the TitleBar's model with the Panel's model 
>> (it
>>implements ITitleBarModel) so that
>> @@ -167,

  1   2   >