Re: [royale-asjs] branch develop updated: Fixes #258. But is that a proper fix?

2018-06-11 Thread Alex Harui
AIUI, the issue is how it is possible, if at all, to use position:absolute or 
position:relative selectively in the DOM.  IIRC, it isn't a matter of creating 
a descendant selector for the object you want to position, it is setting the 
position style on all of its parents without affecting any other of the other 
children of those parents in the DOM that might not be expecting position to be 
set.  Because position not only changes the position, but it seems to affect 
what offsetWidth is of those parents.

I haven't looked at existing JS frameworks and successful JS websites.  Maybe 
position is an "all-or-nothing" kind of choice.  You have to decide to use it 
and deal with setting position!=static throughout the DOM, or use it in many 
places and pick a few offsetParents to base all of your math on, or not use it 
all and rely on margins and padding and other tricks.   Note that Flex does not 
support margins and Royale can, so maybe proper use of margin can eliminate 
some of the reliance on x,y in Royale.

So it may be that we need different groups of beads to allow these three 
choices.  If you choose position!=static you use a particular bead and it uses 
different handlers for x,y,width/height.  And maybe we should make a 
"RelativeToMeBead" that you stick on a UI widget and all children x,y is 
relative to that.

So maybe, Royale should provide choices.  What is really hard and not PAYG is 
trying to make one method handle all of these situations.

Just thinking out loud,
-Alex

On 6/11/18, 12:36 AM, "Harbs"  wrote:

We could always have a bead which sets:

.foo *{
   position: static;
}
To reset the defaults of all elements below “foo” to static.

Of course to change it to something else, you’d need:
.foo .baz{
   position: absolute;
}

I’m not sure how well this would work with the Jewel layout beads. I’m not 
sure what the specificity is on that.

Harbs

> On Jun 11, 2018, at 10:11 AM, Alex Harui  wrote:
> 
> The emulation Application is based on Container and thus creates a Div.  
It may not stay that way, but we did it so that the SystemManager can parent 
the app like it does in Flex.
> 
> Feel free to commit the bead.  It won't hurt anything and some folks will 
be able to use it.  I'm still wondering what the right answer is going to be 
for the emulation component sets.  Or what to do if someone does have some part 
of the DOM that they do not want style.position set.  There is no CSS way to 
specify "set style on all parents", AFAIK, which is would help reduce 
side-effects.
> 
> Later,
> -Alex
> 
> On 6/8/18, 9:02 AM, "Harbs"  wrote:
> 
>> Interesting idea, but I thought there was concern about the global 
selector affecting HTML around the app?
> 
>Currently, we don’t have an Application class that attaches to regular 
divs It always controls the body element. Since we control the whole page, it’s 
not a problem. If we do get to the point where a Royale app can be injected 
into a random div, then setting a global selector might be a problem if there’s 
other HTML which relies on static. We can have heavier-duty beads to deal with 
setting relative positioning in those cases.
> 
>Harbs
> 





Re: [royale-asjs] branch develop updated: Fixes #258. But is that a proper fix?

2018-06-11 Thread Harbs
Not disagreeing with anything you write here…

FWIW, I was thinking of adding a “constrainment” bead which would allow 
left/right/top/bottom values. This would likely work in the context of other 
layouts and be applied to components directly.

> On Jun 11, 2018, at 6:43 PM, Alex Harui  wrote:
> 
> So yeah, % works differently in Royale compared to Flex for some layouts, but 
> may not for other layouts.  It is ok if Harbs app couldn't use some of our 
> Basic layouts without adding calc().  If other sites can go to production 
> without using calc() then our simplest layouts should allow them to do so.  
> If there is a pattern where many apps use calc() a certain way, that should 
> be encapsulated into another layout in Royale.



Re: [royale-asjs] branch develop updated: Fixes #258. But is that a proper fix?

2018-06-11 Thread Alex Harui
IMO, regarding layouts, there will be many kinds of layouts.  In Royale we want 
to give people choices.

-The emulation component sets will mimic Flex layout behavior where % is 
calculated on available space.  I'm pretty sure these will use absolute 
positioning and never set element.style.width to a percentage.  In these 
layouts, replicating Flex behavior is more important than performance.
-Most of the Basic layouts (and hopefully lots of other layouts) are simply 
intended to produce common patterns in the DOM.  No promise of backward 
compatibility with Flex.  Instead of thinking about Flex layouts when writing 
these Basic layouts, the goal should be to work from the browser backwards.  
IOW, if you looked at how 100 different existing websites handle some aspect of 
layout, find the common/popular pattern, and create a Royale layout bead that 
sets styles on the parent and/or children in that pattern.  That's why 
VerticalLayout just sets display:block on every child, or some other layout 
sets display:flex.  The goal is to be able to have Royale efficiently produce 
the same DOM that other sites are using successfully today.
-Other layouts may address common problems.  If you go to StackOverflow you can 
find lots of people running into the same HTML layout problem over and over 
again.  If we can encapsulate the solution on SO, we will save lots of people 
lots of time.  We won't worry too much about performance and code size of these 
solutions.  I think we sort of have a few like that already for handling nested 
divs with percentage sizes in display:flex layouts.
-Custom layouts.  We might someday make a 3DividedPanes layout that handles the 
layout of 3 panes like many email clients or our ASDoc if that helps save 
people time and hassle.  And there will be custom layouts for DataGrid and 
other complex components.

So yeah, % works differently in Royale compared to Flex for some layouts, but 
may not for other layouts.  It is ok if Harbs app couldn't use some of our 
Basic layouts without adding calc().  If other sites can go to production 
without using calc() then our simplest layouts should allow them to do so.  If 
there is a pattern where many apps use calc() a certain way, that should be 
encapsulated into another layout in Royale.

My 2 cents,
-Alex

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

I think Yishay is on track. I'm still changing my mind on how things are on
html, different to flex.
For example, in flexbox there's no gap number, but the layout knows it
should be gap between elements (with "space-between").
So Flexbox put the space, how many? that depends on parent sizes...to make
the simulation without space-between we use margins...
At the end, are different approaches, and sometimes is very difficult to
handle as we did in Flex, maybe not impossible. What I'm trying
to do now is see get more experience and see how to get the best solution
of both worlds...

2018-06-11 12:25 GMT+02:00 Harbs :

> The problem is that the child does not have a way of knowing what the
> extra space surrounding the parent (such as padding) will be.
>
> One day, I’m probably going to work on a constrained layout…
>
> > On Jun 11, 2018, at 1:20 PM, Yishay Weiss 
> wrote:
> >
> > I guess we’re a bit prejudiced coming from Flex. Once you let go of the
> notion that percentages are not of the available space but of the total
> parent space, it sort of makes sense.
>
>


-- 
Carlos Rovira

https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira=02%7C01%7Caharui%40adobe.com%7C78b99b908a0c471ac54d08d5cf8e48b6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636643132375937723=xj27KElCDdfT%2BH5%2FSB%2FwCaF7JIcvJ%2FNyDHslDtqLhak%3D=0




Re: [royale-asjs] branch develop updated: fix latest commit, since binary data to string method was not really working

2018-06-11 Thread Carlos Rovira
Hi Harbs,

I just check it and all seems to work ok :)

2018-06-11 13:30 GMT+02:00 Carlos Rovira :

>
>
> 2018-06-11 13:26 GMT+02:00 Harbs :
>
>> I changed toString() to be a pointer to readUTFBytes.
>>
>
> ok, I'll check if it works for UID generation as I can
>
>
>>
>> Uint16Array will not work for UTF8. It might work for UTF16. Not sure. It
>> might be interesting to see if the String.fromCharCode.apply approach would
>> work with Uint8Array. If yes, the readUTFBtyes method could possibly be
>> simplified.
>>
>> I’m not sure what the value of having a toString method is. Is that
>> something needed for AMF?
>>
>
> Yes, it's used on UID generation.
>
>
>>
>> Harbs
>>
>> > On Jun 11, 2018, at 2:17 PM, Carlos Rovira 
>> wrote:
>> >
>> > Hi Harbs,
>> >
>> > see my fix, and if you think is not ok, feel free to update as you
>> think.
>> > Then I can try AMF generation of UID and see if it continues working
>> right
>> > ok?
>> >
>> > I think with my latest commit I revert to how this was working...if I'm
>> not
>> > missing something
>> >
>> > thanks
>> >
>> >
>> >
>> >
>> > 2018-06-11 13:14 GMT+02:00 Harbs > harbs.li...@gmail.com>>:
>> >
>> >> Why do you need toString rather than readUTFBytes()? FWIW,
>> readUTFBytes()
>> >> already falls back to TextDecoder when available.
>> >>
>> >>> On Jun 11, 2018, at 2:07 PM, Carlos Rovira 
>> >> wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> no problem, we can go back to how it was that line before. I changed
>> it
>> >> be
>> >>> have the same in all that class, but wasn't aware of that problem.
>> >>> So I'll change to what we had, and make to String do the same. I
>> think it
>> >>> should work the same and as well work on IE/Edge
>> >>>
>> >>> I'll take a look right now
>> >>>
>> >>> 2018-06-11 11:13 GMT+02:00 Harbs > harbs.li...@gmail.com> > >> harbs.li...@gmail.com >>:
>> >>>
>>  FWIW, I always check web API support in MDN and caniuse.com <
>> http://caniuse.com/> before
>> >> using
>>  them in Royale.
>> 
>>  Some more details win this specific issue:
>> 
>>  It looks like you added toString() to BinaryData and changed
>> UIDUtils to
>>  use that.
>> 
>>  I don’t think a toString method in BinaryData makes sense. Flash was
>> >> very
>>  smart about how it converted to a string. It was able to use the
>> system
>>  encoding if available. etc.
>> 
>>  Trying to emulate that kind of behavior in BinaryData is not going
>> to be
>>  very PAYG. BinaryData already has UTF methods which cover the vast
>> >> majority
>>  of text needs with BinaryData. Other types of text conversions
>> should be
>>  handled using utility functions if needed.
>> 
>>  There are ways to get cross-browser support similar to TextEncoder,
>> but
>>  it’s not very PAYG either.[1]
>> 
>>  My $0.02,
>>  Harbs
>> 
>>  [1]https://stackoverflow.com/questions/6965107/converting- <
>> https://stackoverflow.com/questions/6965107/converting->
>>  between-strings-and-arraybuffers > https://stackoverflow.com/> <
>> >> https://stackoverflow.com/>
>>  questions/6965107/converting-between-strings-and-arraybuffers>
>> > On Jun 11, 2018, at 12:02 PM, Yishay Weiss 
>>  wrote:
>> >
>> > Carols,
>> >
>> >
>> >
>> > This breaks our app on IE and Edge, as they don’t support
>> TextDecoder.
>>  Can you fix this?
>> >
>> >
>> >
>> > 
>> > From: carlosrov...@apache.org 
>> > Sent: Sunday, May 27, 2018 11:29:14 PM
>> > To: comm...@royale.apache.org
>> > Subject: [royale-asjs] branch develop updated: fix latest commit,
>> since
>>  binary data to string method was not really working
>> >
>> > This is an automated email from the ASF dual-hosted git repository.
>> >
>> > carlosrovira pushed a commit to branch develop
>> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>> >
>> >
>> > The following commit(s) were added to refs/heads/develop by this
>> push:
>> >   new 028a26a  fix latest commit, since binary data to string method
>>  was not really working
>> > 028a26a is described below
>> >
>> > commit 028a26ad29aac3740f150f9b971e310731a69db9
>> > Author: Carlos Rovira 
>> > AuthorDate: Sun May 27 22:28:57 2018 +0200
>> >
>> >  fix latest commit, since binary data to string method was not
>> really
>>  working
>> > ---
>> > .../Core/src/main/royale/org/apache/royale/utils/BinaryData.as
>> >> |
>>  4 ++--
>> > 1 file changed, 2 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/frameworks/projects/Core/src/main/royale/org/apache/
>> >> royale/utils/BinaryData.as
>>  b/frameworks/projects/Core/src/main/royale/org/apache/
>>  royale/utils/BinaryData.as
>> > index 0aa3097..5500c8f 100644
>> > --- 

Re: [royale-asjs] branch develop updated: fix latest commit, since binary data to string method was not really working

2018-06-11 Thread Carlos Rovira
2018-06-11 13:26 GMT+02:00 Harbs :

> I changed toString() to be a pointer to readUTFBytes.
>

ok, I'll check if it works for UID generation as I can


>
> Uint16Array will not work for UTF8. It might work for UTF16. Not sure. It
> might be interesting to see if the String.fromCharCode.apply approach would
> work with Uint8Array. If yes, the readUTFBtyes method could possibly be
> simplified.
>
> I’m not sure what the value of having a toString method is. Is that
> something needed for AMF?
>

Yes, it's used on UID generation.


>
> Harbs
>
> > On Jun 11, 2018, at 2:17 PM, Carlos Rovira 
> wrote:
> >
> > Hi Harbs,
> >
> > see my fix, and if you think is not ok, feel free to update as you think.
> > Then I can try AMF generation of UID and see if it continues working
> right
> > ok?
> >
> > I think with my latest commit I revert to how this was working...if I'm
> not
> > missing something
> >
> > thanks
> >
> >
> >
> >
> > 2018-06-11 13:14 GMT+02:00 Harbs  harbs.li...@gmail.com>>:
> >
> >> Why do you need toString rather than readUTFBytes()? FWIW,
> readUTFBytes()
> >> already falls back to TextDecoder when available.
> >>
> >>> On Jun 11, 2018, at 2:07 PM, Carlos Rovira 
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> no problem, we can go back to how it was that line before. I changed it
> >> be
> >>> have the same in all that class, but wasn't aware of that problem.
> >>> So I'll change to what we had, and make to String do the same. I think
> it
> >>> should work the same and as well work on IE/Edge
> >>>
> >>> I'll take a look right now
> >>>
> >>> 2018-06-11 11:13 GMT+02:00 Harbs  harbs.li...@gmail.com>  >> harbs.li...@gmail.com >>:
> >>>
>  FWIW, I always check web API support in MDN and caniuse.com <
> http://caniuse.com/> before
> >> using
>  them in Royale.
> 
>  Some more details win this specific issue:
> 
>  It looks like you added toString() to BinaryData and changed UIDUtils
> to
>  use that.
> 
>  I don’t think a toString method in BinaryData makes sense. Flash was
> >> very
>  smart about how it converted to a string. It was able to use the
> system
>  encoding if available. etc.
> 
>  Trying to emulate that kind of behavior in BinaryData is not going to
> be
>  very PAYG. BinaryData already has UTF methods which cover the vast
> >> majority
>  of text needs with BinaryData. Other types of text conversions should
> be
>  handled using utility functions if needed.
> 
>  There are ways to get cross-browser support similar to TextEncoder,
> but
>  it’s not very PAYG either.[1]
> 
>  My $0.02,
>  Harbs
> 
>  [1]https://stackoverflow.com/questions/6965107/converting- <
> https://stackoverflow.com/questions/6965107/converting->
>  between-strings-and-arraybuffers  https://stackoverflow.com/> <
> >> https://stackoverflow.com/>
>  questions/6965107/converting-between-strings-and-arraybuffers>
> > On Jun 11, 2018, at 12:02 PM, Yishay Weiss 
>  wrote:
> >
> > Carols,
> >
> >
> >
> > This breaks our app on IE and Edge, as they don’t support
> TextDecoder.
>  Can you fix this?
> >
> >
> >
> > 
> > From: carlosrov...@apache.org 
> > Sent: Sunday, May 27, 2018 11:29:14 PM
> > To: comm...@royale.apache.org
> > Subject: [royale-asjs] branch develop updated: fix latest commit,
> since
>  binary data to string method was not really working
> >
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > carlosrovira pushed a commit to branch develop
> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> >
> >
> > The following commit(s) were added to refs/heads/develop by this
> push:
> >   new 028a26a  fix latest commit, since binary data to string method
>  was not really working
> > 028a26a is described below
> >
> > commit 028a26ad29aac3740f150f9b971e310731a69db9
> > Author: Carlos Rovira 
> > AuthorDate: Sun May 27 22:28:57 2018 +0200
> >
> >  fix latest commit, since binary data to string method was not really
>  working
> > ---
> > .../Core/src/main/royale/org/apache/royale/utils/BinaryData.as
> >> |
>  4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/frameworks/projects/Core/src/main/royale/org/apache/
> >> royale/utils/BinaryData.as
>  b/frameworks/projects/Core/src/main/royale/org/apache/
>  royale/utils/BinaryData.as
> > index 0aa3097..5500c8f 100644
> > --- a/frameworks/projects/Core/src/main/royale/org/apache/
>  royale/utils/BinaryData.as
> > +++ b/frameworks/projects/Core/src/main/royale/org/apache/
>  royale/utils/BinaryData.as
> > @@ -213,7 +213,7 @@ public class BinaryData implements
> >> IBinaryDataInput,
>  IBinaryDataOutput
> >
> 

Re: [royale-asjs] branch develop updated: Fixes #258. But is that a proper fix?

2018-06-11 Thread Carlos Rovira
I think Yishay is on track. I'm still changing my mind on how things are on
html, different to flex.
For example, in flexbox there's no gap number, but the layout knows it
should be gap between elements (with "space-between").
So Flexbox put the space, how many? that depends on parent sizes...to make
the simulation without space-between we use margins...
At the end, are different approaches, and sometimes is very difficult to
handle as we did in Flex, maybe not impossible. What I'm trying
to do now is see get more experience and see how to get the best solution
of both worlds...

2018-06-11 12:25 GMT+02:00 Harbs :

> The problem is that the child does not have a way of knowing what the
> extra space surrounding the parent (such as padding) will be.
>
> One day, I’m probably going to work on a constrained layout…
>
> > On Jun 11, 2018, at 1:20 PM, Yishay Weiss 
> wrote:
> >
> > I guess we’re a bit prejudiced coming from Flex. Once you let go of the
> notion that percentages are not of the available space but of the total
> parent space, it sort of makes sense.
>
>


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


Re: [royale-asjs] branch develop updated: fix latest commit, since binary data to string method was not really working

2018-06-11 Thread Carlos Rovira
Hi Harbs,

see my fix, and if you think is not ok, feel free to update as you think.
Then I can try AMF generation of UID and see if it continues working right
ok?

I think with my latest commit I revert to how this was working...if I'm not
missing something

thanks




2018-06-11 13:14 GMT+02:00 Harbs :

> Why do you need toString rather than readUTFBytes()? FWIW, readUTFBytes()
> already falls back to TextDecoder when available.
>
> > On Jun 11, 2018, at 2:07 PM, Carlos Rovira 
> wrote:
> >
> > Hi,
> >
> > no problem, we can go back to how it was that line before. I changed it
> be
> > have the same in all that class, but wasn't aware of that problem.
> > So I'll change to what we had, and make to String do the same. I think it
> > should work the same and as well work on IE/Edge
> >
> > I'll take a look right now
> >
> > 2018-06-11 11:13 GMT+02:00 Harbs  harbs.li...@gmail.com>>:
> >
> >> FWIW, I always check web API support in MDN and caniuse.com before
> using
> >> them in Royale.
> >>
> >> Some more details win this specific issue:
> >>
> >> It looks like you added toString() to BinaryData and changed UIDUtils to
> >> use that.
> >>
> >> I don’t think a toString method in BinaryData makes sense. Flash was
> very
> >> smart about how it converted to a string. It was able to use the system
> >> encoding if available. etc.
> >>
> >> Trying to emulate that kind of behavior in BinaryData is not going to be
> >> very PAYG. BinaryData already has UTF methods which cover the vast
> majority
> >> of text needs with BinaryData. Other types of text conversions should be
> >> handled using utility functions if needed.
> >>
> >> There are ways to get cross-browser support similar to TextEncoder, but
> >> it’s not very PAYG either.[1]
> >>
> >> My $0.02,
> >> Harbs
> >>
> >> [1]https://stackoverflow.com/questions/6965107/converting-
> >> between-strings-and-arraybuffers  https://stackoverflow.com/>
> >> questions/6965107/converting-between-strings-and-arraybuffers>
> >>> On Jun 11, 2018, at 12:02 PM, Yishay Weiss 
> >> wrote:
> >>>
> >>> Carols,
> >>>
> >>>
> >>>
> >>> This breaks our app on IE and Edge, as they don’t support TextDecoder.
> >> Can you fix this?
> >>>
> >>>
> >>>
> >>> 
> >>> From: carlosrov...@apache.org 
> >>> Sent: Sunday, May 27, 2018 11:29:14 PM
> >>> To: comm...@royale.apache.org
> >>> Subject: [royale-asjs] branch develop updated: fix latest commit, since
> >> binary data to string method was not really working
> >>>
> >>> This is an automated email from the ASF dual-hosted git repository.
> >>>
> >>> carlosrovira pushed a commit to branch develop
> >>> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> >>>
> >>>
> >>> The following commit(s) were added to refs/heads/develop by this push:
> >>>new 028a26a  fix latest commit, since binary data to string method
> >> was not really working
> >>> 028a26a is described below
> >>>
> >>> commit 028a26ad29aac3740f150f9b971e310731a69db9
> >>> Author: Carlos Rovira 
> >>> AuthorDate: Sun May 27 22:28:57 2018 +0200
> >>>
> >>>   fix latest commit, since binary data to string method was not really
> >> working
> >>> ---
> >>> .../Core/src/main/royale/org/apache/royale/utils/BinaryData.as
> |
> >> 4 ++--
> >>> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/frameworks/projects/Core/src/main/royale/org/apache/
> royale/utils/BinaryData.as
> >> b/frameworks/projects/Core/src/main/royale/org/apache/
> >> royale/utils/BinaryData.as
> >>> index 0aa3097..5500c8f 100644
> >>> --- a/frameworks/projects/Core/src/main/royale/org/apache/
> >> royale/utils/BinaryData.as
> >>> +++ b/frameworks/projects/Core/src/main/royale/org/apache/
> >> royale/utils/BinaryData.as
> >>> @@ -213,7 +213,7 @@ public class BinaryData implements
> IBinaryDataInput,
> >> IBinaryDataOutput
> >>>
> >>>COMPILE::JS
> >>>{
> >>> -return String.fromCharCode.apply(null, new
> >> Uint16Array(ba));
> >>> +return (new TextDecoder("utf-8")).decode(ba);
> >>>}
> >>>}
> >>>
> >>> @@ -804,7 +804,7 @@ public class BinaryData implements
> IBinaryDataInput,
> >> IBinaryDataOutput
> >>>}
> >>>COMPILE::JS
> >>>{
> >>> -return _len;;
> >>> +return _len;
> >>>}
> >>>}
> >>>
> >>>
> >>> --
> >>> To stop receiving notification emails like this one, please contact
> >>> carlosrov...@apache.org.
> >>
> >>
> >
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira 
>



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


Re: [royale-asjs] branch develop updated: fix latest commit, since binary data to string method was not really working

2018-06-11 Thread Carlos Rovira
Hi, just committed a solution that does the same done in "readUTFBytes" on
line 985
Let me know if this solves the issue

2018-06-11 13:07 GMT+02:00 Carlos Rovira :

> Hi,
>
> no problem, we can go back to how it was that line before. I changed it be
> have the same in all that class, but wasn't aware of that problem.
> So I'll change to what we had, and make to String do the same. I think it
> should work the same and as well work on IE/Edge
>
> I'll take a look right now
>
> 2018-06-11 11:13 GMT+02:00 Harbs :
>
>> FWIW, I always check web API support in MDN and caniuse.com before using
>> them in Royale.
>>
>> Some more details win this specific issue:
>>
>> It looks like you added toString() to BinaryData and changed UIDUtils to
>> use that.
>>
>> I don’t think a toString method in BinaryData makes sense. Flash was very
>> smart about how it converted to a string. It was able to use the system
>> encoding if available. etc.
>>
>> Trying to emulate that kind of behavior in BinaryData is not going to be
>> very PAYG. BinaryData already has UTF methods which cover the vast majority
>> of text needs with BinaryData. Other types of text conversions should be
>> handled using utility functions if needed.
>>
>> There are ways to get cross-browser support similar to TextEncoder, but
>> it’s not very PAYG either.[1]
>>
>> My $0.02,
>> Harbs
>>
>> [1]https://stackoverflow.com/questions/6965107/converting-be
>> tween-strings-and-arraybuffers > stions/6965107/converting-between-strings-and-arraybuffers>
>> > On Jun 11, 2018, at 12:02 PM, Yishay Weiss 
>> wrote:
>> >
>> > Carols,
>> >
>> >
>> >
>> > This breaks our app on IE and Edge, as they don’t support TextDecoder.
>> Can you fix this?
>> >
>> >
>> >
>> > 
>> > From: carlosrov...@apache.org 
>> > Sent: Sunday, May 27, 2018 11:29:14 PM
>> > To: comm...@royale.apache.org
>> > Subject: [royale-asjs] branch develop updated: fix latest commit, since
>> binary data to string method was not really working
>> >
>> > This is an automated email from the ASF dual-hosted git repository.
>> >
>> > carlosrovira pushed a commit to branch develop
>> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>> >
>> >
>> > The following commit(s) were added to refs/heads/develop by this push:
>> > new 028a26a  fix latest commit, since binary data to string method
>> was not really working
>> > 028a26a is described below
>> >
>> > commit 028a26ad29aac3740f150f9b971e310731a69db9
>> > Author: Carlos Rovira 
>> > AuthorDate: Sun May 27 22:28:57 2018 +0200
>> >
>> >fix latest commit, since binary data to string method was not really
>> working
>> > ---
>> > .../Core/src/main/royale/org/apache/royale/utils/BinaryData.as
>> | 4 ++--
>> > 1 file changed, 2 insertions(+), 2 deletions(-)
>> >
>> > diff --git 
>> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
>> b/frameworks/projects/Core/src/main/royale/org/apache/royale
>> /utils/BinaryData.as
>> > index 0aa3097..5500c8f 100644
>> > --- a/frameworks/projects/Core/src/main/royale/org/apache/royale
>> /utils/BinaryData.as
>> > +++ b/frameworks/projects/Core/src/main/royale/org/apache/royale
>> /utils/BinaryData.as
>> > @@ -213,7 +213,7 @@ public class BinaryData implements
>> IBinaryDataInput, IBinaryDataOutput
>> >
>> > COMPILE::JS
>> > {
>> > -return String.fromCharCode.apply(null, new
>> Uint16Array(ba));
>> > +return (new TextDecoder("utf-8")).decode(ba);
>> > }
>> > }
>> >
>> > @@ -804,7 +804,7 @@ public class BinaryData implements
>> IBinaryDataInput, IBinaryDataOutput
>> > }
>> > COMPILE::JS
>> > {
>> > -return _len;;
>> > +return _len;
>> > }
>> > }
>> >
>> >
>> > --
>> > To stop receiving notification emails like this one, please contact
>> > carlosrov...@apache.org.
>>
>>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>


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


Re: [royale-asjs] branch develop updated: fix latest commit, since binary data to string method was not really working

2018-06-11 Thread Harbs
Why do you need toString rather than readUTFBytes()? FWIW, readUTFBytes() 
already falls back to TextDecoder when available.

> On Jun 11, 2018, at 2:07 PM, Carlos Rovira  wrote:
> 
> Hi,
> 
> no problem, we can go back to how it was that line before. I changed it be
> have the same in all that class, but wasn't aware of that problem.
> So I'll change to what we had, and make to String do the same. I think it
> should work the same and as well work on IE/Edge
> 
> I'll take a look right now
> 
> 2018-06-11 11:13 GMT+02:00 Harbs  >:
> 
>> FWIW, I always check web API support in MDN and caniuse.com before using
>> them in Royale.
>> 
>> Some more details win this specific issue:
>> 
>> It looks like you added toString() to BinaryData and changed UIDUtils to
>> use that.
>> 
>> I don’t think a toString method in BinaryData makes sense. Flash was very
>> smart about how it converted to a string. It was able to use the system
>> encoding if available. etc.
>> 
>> Trying to emulate that kind of behavior in BinaryData is not going to be
>> very PAYG. BinaryData already has UTF methods which cover the vast majority
>> of text needs with BinaryData. Other types of text conversions should be
>> handled using utility functions if needed.
>> 
>> There are ways to get cross-browser support similar to TextEncoder, but
>> it’s not very PAYG either.[1]
>> 
>> My $0.02,
>> Harbs
>> 
>> [1]https://stackoverflow.com/questions/6965107/converting-
>> between-strings-and-arraybuffers > 
>> questions/6965107/converting-between-strings-and-arraybuffers>
>>> On Jun 11, 2018, at 12:02 PM, Yishay Weiss 
>> wrote:
>>> 
>>> Carols,
>>> 
>>> 
>>> 
>>> This breaks our app on IE and Edge, as they don’t support TextDecoder.
>> Can you fix this?
>>> 
>>> 
>>> 
>>> 
>>> From: carlosrov...@apache.org 
>>> Sent: Sunday, May 27, 2018 11:29:14 PM
>>> To: comm...@royale.apache.org
>>> Subject: [royale-asjs] branch develop updated: fix latest commit, since
>> binary data to string method was not really working
>>> 
>>> This is an automated email from the ASF dual-hosted git repository.
>>> 
>>> carlosrovira pushed a commit to branch develop
>>> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>>> 
>>> 
>>> The following commit(s) were added to refs/heads/develop by this push:
>>>new 028a26a  fix latest commit, since binary data to string method
>> was not really working
>>> 028a26a is described below
>>> 
>>> commit 028a26ad29aac3740f150f9b971e310731a69db9
>>> Author: Carlos Rovira 
>>> AuthorDate: Sun May 27 22:28:57 2018 +0200
>>> 
>>>   fix latest commit, since binary data to string method was not really
>> working
>>> ---
>>> .../Core/src/main/royale/org/apache/royale/utils/BinaryData.as|
>> 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>> 
>>> diff --git 
>>> a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
>> b/frameworks/projects/Core/src/main/royale/org/apache/
>> royale/utils/BinaryData.as
>>> index 0aa3097..5500c8f 100644
>>> --- a/frameworks/projects/Core/src/main/royale/org/apache/
>> royale/utils/BinaryData.as
>>> +++ b/frameworks/projects/Core/src/main/royale/org/apache/
>> royale/utils/BinaryData.as
>>> @@ -213,7 +213,7 @@ public class BinaryData implements IBinaryDataInput,
>> IBinaryDataOutput
>>> 
>>>COMPILE::JS
>>>{
>>> -return String.fromCharCode.apply(null, new
>> Uint16Array(ba));
>>> +return (new TextDecoder("utf-8")).decode(ba);
>>>}
>>>}
>>> 
>>> @@ -804,7 +804,7 @@ public class BinaryData implements IBinaryDataInput,
>> IBinaryDataOutput
>>>}
>>>COMPILE::JS
>>>{
>>> -return _len;;
>>> +return _len;
>>>}
>>>}
>>> 
>>> 
>>> --
>>> To stop receiving notification emails like this one, please contact
>>> carlosrov...@apache.org.
>> 
>> 
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira 


Re: [royale-asjs] branch develop updated: fix latest commit, since binary data to string method was not really working

2018-06-11 Thread Carlos Rovira
Hi,

no problem, we can go back to how it was that line before. I changed it be
have the same in all that class, but wasn't aware of that problem.
So I'll change to what we had, and make to String do the same. I think it
should work the same and as well work on IE/Edge

I'll take a look right now

2018-06-11 11:13 GMT+02:00 Harbs :

> FWIW, I always check web API support in MDN and caniuse.com before using
> them in Royale.
>
> Some more details win this specific issue:
>
> It looks like you added toString() to BinaryData and changed UIDUtils to
> use that.
>
> I don’t think a toString method in BinaryData makes sense. Flash was very
> smart about how it converted to a string. It was able to use the system
> encoding if available. etc.
>
> Trying to emulate that kind of behavior in BinaryData is not going to be
> very PAYG. BinaryData already has UTF methods which cover the vast majority
> of text needs with BinaryData. Other types of text conversions should be
> handled using utility functions if needed.
>
> There are ways to get cross-browser support similar to TextEncoder, but
> it’s not very PAYG either.[1]
>
> My $0.02,
> Harbs
>
> [1]https://stackoverflow.com/questions/6965107/converting-
> between-strings-and-arraybuffers  questions/6965107/converting-between-strings-and-arraybuffers>
> > On Jun 11, 2018, at 12:02 PM, Yishay Weiss 
> wrote:
> >
> > Carols,
> >
> >
> >
> > This breaks our app on IE and Edge, as they don’t support TextDecoder.
> Can you fix this?
> >
> >
> >
> > 
> > From: carlosrov...@apache.org 
> > Sent: Sunday, May 27, 2018 11:29:14 PM
> > To: comm...@royale.apache.org
> > Subject: [royale-asjs] branch develop updated: fix latest commit, since
> binary data to string method was not really working
> >
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > carlosrovira pushed a commit to branch develop
> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> >
> >
> > The following commit(s) were added to refs/heads/develop by this push:
> > new 028a26a  fix latest commit, since binary data to string method
> was not really working
> > 028a26a is described below
> >
> > commit 028a26ad29aac3740f150f9b971e310731a69db9
> > Author: Carlos Rovira 
> > AuthorDate: Sun May 27 22:28:57 2018 +0200
> >
> >fix latest commit, since binary data to string method was not really
> working
> > ---
> > .../Core/src/main/royale/org/apache/royale/utils/BinaryData.as|
> 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git 
> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
> b/frameworks/projects/Core/src/main/royale/org/apache/
> royale/utils/BinaryData.as
> > index 0aa3097..5500c8f 100644
> > --- a/frameworks/projects/Core/src/main/royale/org/apache/
> royale/utils/BinaryData.as
> > +++ b/frameworks/projects/Core/src/main/royale/org/apache/
> royale/utils/BinaryData.as
> > @@ -213,7 +213,7 @@ public class BinaryData implements IBinaryDataInput,
> IBinaryDataOutput
> >
> > COMPILE::JS
> > {
> > -return String.fromCharCode.apply(null, new
> Uint16Array(ba));
> > +return (new TextDecoder("utf-8")).decode(ba);
> > }
> > }
> >
> > @@ -804,7 +804,7 @@ public class BinaryData implements IBinaryDataInput,
> IBinaryDataOutput
> > }
> > COMPILE::JS
> > {
> > -return _len;;
> > +return _len;
> > }
> > }
> >
> >
> > --
> > To stop receiving notification emails like this one, please contact
> > carlosrov...@apache.org.
>
>


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


Re: [royale-asjs] branch develop updated: Fixes #258. But is that a proper fix?

2018-06-11 Thread Harbs
The problem is that the child does not have a way of knowing what the extra 
space surrounding the parent (such as padding) will be.

One day, I’m probably going to work on a constrained layout…

> On Jun 11, 2018, at 1:20 PM, Yishay Weiss  wrote:
> 
> I guess we’re a bit prejudiced coming from Flex. Once you let go of the 
> notion that percentages are not of the available space but of the total 
> parent space, it sort of makes sense.



RE: [royale-asjs] branch develop updated: Fixes #258. But is that a proper fix?

2018-06-11 Thread Yishay Weiss
I guess we’re a bit prejudiced coming from Flex. Once you let go of the notion 
that percentages are not of the available space but of the total parent space, 
it sort of makes sense.




From: Harbs 
Sent: Monday, June 11, 2018 11:29:38 AM
To: dev@royale.apache.org
Subject: Re: [royale-asjs] branch develop updated: Fixes #258. But is that a 
proper fix?

FWIW, I’ve found that the single-most painful part of developing using Royale 
has been layouts.

I *think* defaulting to relative might help some issues, but things like 
percentages simply don’t work as you’d expect in HTML. I have been forced to 
stick calc() css in at least 12 places in my app.

> On Jun 11, 2018, at 11:00 AM, Carlos Rovira  wrote:
>
> Hi,
>
> I'm finding some problems with all this in Jewel as I go deeper with
> layouts. I'll write about it soon, I hope to solve some issue and left most
> important to discuss.
> As I get something working, I see a collateral effect that makes other
> thing that was working fail on some way...it's like a puzzle where
> positioning, layout, states must adjust to work ok. And still I'm getting
> hard time with ClassSelectorList. I think we have an huge issue with class
> name handling through Royale, since is not consistent, and class names are
> essential in html. For example since layouts class names are some kind of
> "typenames", those are removed when a user adds some class...
>
> This is a sneak peak of what I'm finding, and hope to work more over it and
> try to raise only essential issues
>
>
>
> 2018-06-11 9:36 GMT+02:00 Harbs :
>
>> We could always have a bead which sets:
>>
>> .foo *{
>>   position: static;
>> }
>> To reset the defaults of all elements below “foo” to static.
>>
>> Of course to change it to something else, you’d need:
>> .foo .baz{
>>   position: absolute;
>> }
>>
>> I’m not sure how well this would work with the Jewel layout beads. I’m not
>> sure what the specificity is on that.
>>
>> Harbs
>>
>>> On Jun 11, 2018, at 10:11 AM, Alex Harui 
>> wrote:
>>>
>>> The emulation Application is based on Container and thus creates a Div.
>> It may not stay that way, but we did it so that the SystemManager can
>> parent the app like it does in Flex.
>>>
>>> Feel free to commit the bead.  It won't hurt anything and some folks
>> will be able to use it.  I'm still wondering what the right answer is going
>> to be for the emulation component sets.  Or what to do if someone does have
>> some part of the DOM that they do not want style.position set.  There is no
>> CSS way to specify "set style on all parents", AFAIK, which is would help
>> reduce side-effects.
>>>
>>> Later,
>>> -Alex
>>>
>>> On 6/8/18, 9:02 AM, "Harbs"  wrote:
>>>
 Interesting idea, but I thought there was concern about the global
>> selector affecting HTML around the app?
>>>
>>>   Currently, we don’t have an Application class that attaches to
>> regular divs It always controls the body element. Since we control the
>> whole page, it’s not a problem. If we do get to the point where a Royale
>> app can be injected into a random div, then setting a global selector might
>> be a problem if there’s other HTML which relies on static. We can have
>> heavier-duty beads to deal with setting relative positioning in those cases.
>>>
>>>   Harbs
>>>
>>
>>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira



Re: [royale-asjs] branch develop updated: Fixes #258. But is that a proper fix?

2018-06-11 Thread Carlos Rovira
I think is important that we reach the most simple and cross browser way to
get things work. At least Royale should be able to make all most used
layouts
only declaring containers and layouts in its simplest forms. Then people
that want to make some not conventional things could need to make some
calculations, bindings and settings. Back in flex days, I remember to watch
code with calculations and bindings, I always think that 95% of times that
was not needed and only makes your code complex, less performant and
difficult to debug.
This is an important target for us
Let's see if we can get something cool here


2018-06-11 10:29 GMT+02:00 Harbs :

> FWIW, I’ve found that the single-most painful part of developing using
> Royale has been layouts.
>
> I *think* defaulting to relative might help some issues, but things like
> percentages simply don’t work as you’d expect in HTML. I have been forced
> to stick calc() css in at least 12 places in my app.
>
> > On Jun 11, 2018, at 11:00 AM, Carlos Rovira 
> wrote:
> >
> > Hi,
> >
> > I'm finding some problems with all this in Jewel as I go deeper with
> > layouts. I'll write about it soon, I hope to solve some issue and left
> most
> > important to discuss.
> > As I get something working, I see a collateral effect that makes other
> > thing that was working fail on some way...it's like a puzzle where
> > positioning, layout, states must adjust to work ok. And still I'm getting
> > hard time with ClassSelectorList. I think we have an huge issue with
> class
> > name handling through Royale, since is not consistent, and class names
> are
> > essential in html. For example since layouts class names are some kind of
> > "typenames", those are removed when a user adds some class...
> >
> > This is a sneak peak of what I'm finding, and hope to work more over it
> and
> > try to raise only essential issues
> >
> >
> >
> > 2018-06-11 9:36 GMT+02:00 Harbs :
> >
> >> We could always have a bead which sets:
> >>
> >> .foo *{
> >>   position: static;
> >> }
> >> To reset the defaults of all elements below “foo” to static.
> >>
> >> Of course to change it to something else, you’d need:
> >> .foo .baz{
> >>   position: absolute;
> >> }
> >>
> >> I’m not sure how well this would work with the Jewel layout beads. I’m
> not
> >> sure what the specificity is on that.
> >>
> >> Harbs
> >>
> >>> On Jun 11, 2018, at 10:11 AM, Alex Harui 
> >> wrote:
> >>>
> >>> The emulation Application is based on Container and thus creates a Div.
> >> It may not stay that way, but we did it so that the SystemManager can
> >> parent the app like it does in Flex.
> >>>
> >>> Feel free to commit the bead.  It won't hurt anything and some folks
> >> will be able to use it.  I'm still wondering what the right answer is
> going
> >> to be for the emulation component sets.  Or what to do if someone does
> have
> >> some part of the DOM that they do not want style.position set.  There
> is no
> >> CSS way to specify "set style on all parents", AFAIK, which is would
> help
> >> reduce side-effects.
> >>>
> >>> Later,
> >>> -Alex
> >>>
> >>> On 6/8/18, 9:02 AM, "Harbs"  wrote:
> >>>
>  Interesting idea, but I thought there was concern about the global
> >> selector affecting HTML around the app?
> >>>
> >>>   Currently, we don’t have an Application class that attaches to
> >> regular divs It always controls the body element. Since we control the
> >> whole page, it’s not a problem. If we do get to the point where a Royale
> >> app can be injected into a random div, then setting a global selector
> might
> >> be a problem if there’s other HTML which relies on static. We can have
> >> heavier-duty beads to deal with setting relative positioning in those
> cases.
> >>>
> >>>   Harbs
> >>>
> >>
> >>
> >
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
>
>


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


Re: [royale-asjs] branch develop updated: fix latest commit, since binary data to string method was not really working

2018-06-11 Thread Harbs
FWIW, I always check web API support in MDN and caniuse.com before using them 
in Royale.

Some more details win this specific issue:

It looks like you added toString() to BinaryData and changed UIDUtils to use 
that.

I don’t think a toString method in BinaryData makes sense. Flash was very smart 
about how it converted to a string. It was able to use the system encoding if 
available. etc.

Trying to emulate that kind of behavior in BinaryData is not going to be very 
PAYG. BinaryData already has UTF methods which cover the vast majority of text 
needs with BinaryData. Other types of text conversions should be handled using 
utility functions if needed.

There are ways to get cross-browser support similar to TextEncoder, but it’s 
not very PAYG either.[1]

My $0.02,
Harbs

[1]https://stackoverflow.com/questions/6965107/converting-between-strings-and-arraybuffers
 

> On Jun 11, 2018, at 12:02 PM, Yishay Weiss  wrote:
> 
> Carols,
> 
> 
> 
> This breaks our app on IE and Edge, as they don’t support TextDecoder. Can 
> you fix this?
> 
> 
> 
> 
> From: carlosrov...@apache.org 
> Sent: Sunday, May 27, 2018 11:29:14 PM
> To: comm...@royale.apache.org
> Subject: [royale-asjs] branch develop updated: fix latest commit, since 
> binary data to string method was not really working
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> carlosrovira pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> 
> 
> The following commit(s) were added to refs/heads/develop by this push:
> new 028a26a  fix latest commit, since binary data to string method was 
> not really working
> 028a26a is described below
> 
> commit 028a26ad29aac3740f150f9b971e310731a69db9
> Author: Carlos Rovira 
> AuthorDate: Sun May 27 22:28:57 2018 +0200
> 
>fix latest commit, since binary data to string method was not really 
> working
> ---
> .../Core/src/main/royale/org/apache/royale/utils/BinaryData.as| 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git 
> a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
>  
> b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
> index 0aa3097..5500c8f 100644
> --- 
> a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
> +++ 
> b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
> @@ -213,7 +213,7 @@ public class BinaryData implements IBinaryDataInput, 
> IBinaryDataOutput
> 
> COMPILE::JS
> {
> -return String.fromCharCode.apply(null, new Uint16Array(ba));
> +return (new TextDecoder("utf-8")).decode(ba);
> }
> }
> 
> @@ -804,7 +804,7 @@ public class BinaryData implements IBinaryDataInput, 
> IBinaryDataOutput
> }
> COMPILE::JS
> {
> -return _len;;
> +return _len;
> }
> }
> 
> 
> --
> To stop receiving notification emails like this one, please contact
> carlosrov...@apache.org.



RE: [royale-asjs] branch develop updated: fix latest commit, since binary data to string method was not really working

2018-06-11 Thread Yishay Weiss
Carols,



This breaks our app on IE and Edge, as they don’t support TextDecoder. Can you 
fix this?




From: carlosrov...@apache.org 
Sent: Sunday, May 27, 2018 11:29:14 PM
To: comm...@royale.apache.org
Subject: [royale-asjs] branch develop updated: fix latest commit, since binary 
data to string method was not really working

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

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


The following commit(s) were added to refs/heads/develop by this push:
 new 028a26a  fix latest commit, since binary data to string method was not 
really working
028a26a is described below

commit 028a26ad29aac3740f150f9b971e310731a69db9
Author: Carlos Rovira 
AuthorDate: Sun May 27 22:28:57 2018 +0200

fix latest commit, since binary data to string method was not really working
---
 .../Core/src/main/royale/org/apache/royale/utils/BinaryData.as| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
index 0aa3097..5500c8f 100644
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
@@ -213,7 +213,7 @@ public class BinaryData implements IBinaryDataInput, 
IBinaryDataOutput

 COMPILE::JS
 {
-return String.fromCharCode.apply(null, new Uint16Array(ba));
+return (new TextDecoder("utf-8")).decode(ba);
 }
 }

@@ -804,7 +804,7 @@ public class BinaryData implements IBinaryDataInput, 
IBinaryDataOutput
 }
 COMPILE::JS
 {
-return _len;;
+return _len;
 }
 }


--
To stop receiving notification emails like this one, please contact
carlosrov...@apache.org.


Re: [royale-asjs] branch develop updated: Fixes #258. But is that a proper fix?

2018-06-11 Thread Harbs
FWIW, I’ve found that the single-most painful part of developing using Royale 
has been layouts.

I *think* defaulting to relative might help some issues, but things like 
percentages simply don’t work as you’d expect in HTML. I have been forced to 
stick calc() css in at least 12 places in my app.

> On Jun 11, 2018, at 11:00 AM, Carlos Rovira  wrote:
> 
> Hi,
> 
> I'm finding some problems with all this in Jewel as I go deeper with
> layouts. I'll write about it soon, I hope to solve some issue and left most
> important to discuss.
> As I get something working, I see a collateral effect that makes other
> thing that was working fail on some way...it's like a puzzle where
> positioning, layout, states must adjust to work ok. And still I'm getting
> hard time with ClassSelectorList. I think we have an huge issue with class
> name handling through Royale, since is not consistent, and class names are
> essential in html. For example since layouts class names are some kind of
> "typenames", those are removed when a user adds some class...
> 
> This is a sneak peak of what I'm finding, and hope to work more over it and
> try to raise only essential issues
> 
> 
> 
> 2018-06-11 9:36 GMT+02:00 Harbs :
> 
>> We could always have a bead which sets:
>> 
>> .foo *{
>>   position: static;
>> }
>> To reset the defaults of all elements below “foo” to static.
>> 
>> Of course to change it to something else, you’d need:
>> .foo .baz{
>>   position: absolute;
>> }
>> 
>> I’m not sure how well this would work with the Jewel layout beads. I’m not
>> sure what the specificity is on that.
>> 
>> Harbs
>> 
>>> On Jun 11, 2018, at 10:11 AM, Alex Harui 
>> wrote:
>>> 
>>> The emulation Application is based on Container and thus creates a Div.
>> It may not stay that way, but we did it so that the SystemManager can
>> parent the app like it does in Flex.
>>> 
>>> Feel free to commit the bead.  It won't hurt anything and some folks
>> will be able to use it.  I'm still wondering what the right answer is going
>> to be for the emulation component sets.  Or what to do if someone does have
>> some part of the DOM that they do not want style.position set.  There is no
>> CSS way to specify "set style on all parents", AFAIK, which is would help
>> reduce side-effects.
>>> 
>>> Later,
>>> -Alex
>>> 
>>> On 6/8/18, 9:02 AM, "Harbs"  wrote:
>>> 
 Interesting idea, but I thought there was concern about the global
>> selector affecting HTML around the app?
>>> 
>>>   Currently, we don’t have an Application class that attaches to
>> regular divs It always controls the body element. Since we control the
>> whole page, it’s not a problem. If we do get to the point where a Royale
>> app can be injected into a random div, then setting a global selector might
>> be a problem if there’s other HTML which relies on static. We can have
>> heavier-duty beads to deal with setting relative positioning in those cases.
>>> 
>>>   Harbs
>>> 
>> 
>> 
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira



Re: [royale-asjs] branch develop updated: Fixes #258. But is that a proper fix?

2018-06-11 Thread Carlos Rovira
Hi,

I'm finding some problems with all this in Jewel as I go deeper with
layouts. I'll write about it soon, I hope to solve some issue and left most
important to discuss.
As I get something working, I see a collateral effect that makes other
thing that was working fail on some way...it's like a puzzle where
positioning, layout, states must adjust to work ok. And still I'm getting
hard time with ClassSelectorList. I think we have an huge issue with class
name handling through Royale, since is not consistent, and class names are
essential in html. For example since layouts class names are some kind of
"typenames", those are removed when a user adds some class...

This is a sneak peak of what I'm finding, and hope to work more over it and
try to raise only essential issues



2018-06-11 9:36 GMT+02:00 Harbs :

> We could always have a bead which sets:
>
> .foo *{
>position: static;
> }
> To reset the defaults of all elements below “foo” to static.
>
> Of course to change it to something else, you’d need:
> .foo .baz{
>position: absolute;
> }
>
> I’m not sure how well this would work with the Jewel layout beads. I’m not
> sure what the specificity is on that.
>
> Harbs
>
> > On Jun 11, 2018, at 10:11 AM, Alex Harui 
> wrote:
> >
> > The emulation Application is based on Container and thus creates a Div.
> It may not stay that way, but we did it so that the SystemManager can
> parent the app like it does in Flex.
> >
> > Feel free to commit the bead.  It won't hurt anything and some folks
> will be able to use it.  I'm still wondering what the right answer is going
> to be for the emulation component sets.  Or what to do if someone does have
> some part of the DOM that they do not want style.position set.  There is no
> CSS way to specify "set style on all parents", AFAIK, which is would help
> reduce side-effects.
> >
> > Later,
> > -Alex
> >
> > On 6/8/18, 9:02 AM, "Harbs"  wrote:
> >
> >> Interesting idea, but I thought there was concern about the global
> selector affecting HTML around the app?
> >
> >Currently, we don’t have an Application class that attaches to
> regular divs It always controls the body element. Since we control the
> whole page, it’s not a problem. If we do get to the point where a Royale
> app can be injected into a random div, then setting a global selector might
> be a problem if there’s other HTML which relies on static. We can have
> heavier-duty beads to deal with setting relative positioning in those cases.
> >
> >Harbs
> >
>
>


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


Re: [royale-asjs] branch develop updated: Fixes #258. But is that a proper fix?

2018-06-11 Thread Harbs
We could always have a bead which sets:

.foo *{
   position: static;
}
To reset the defaults of all elements below “foo” to static.

Of course to change it to something else, you’d need:
.foo .baz{
   position: absolute;
}

I’m not sure how well this would work with the Jewel layout beads. I’m not sure 
what the specificity is on that.

Harbs

> On Jun 11, 2018, at 10:11 AM, Alex Harui  wrote:
> 
> The emulation Application is based on Container and thus creates a Div.  It 
> may not stay that way, but we did it so that the SystemManager can parent the 
> app like it does in Flex.
> 
> Feel free to commit the bead.  It won't hurt anything and some folks will be 
> able to use it.  I'm still wondering what the right answer is going to be for 
> the emulation component sets.  Or what to do if someone does have some part 
> of the DOM that they do not want style.position set.  There is no CSS way to 
> specify "set style on all parents", AFAIK, which is would help reduce 
> side-effects.
> 
> Later,
> -Alex
> 
> On 6/8/18, 9:02 AM, "Harbs"  wrote:
> 
>> Interesting idea, but I thought there was concern about the global selector 
>> affecting HTML around the app?
> 
>Currently, we don’t have an Application class that attaches to regular 
> divs It always controls the body element. Since we control the whole page, 
> it’s not a problem. If we do get to the point where a Royale app can be 
> injected into a random div, then setting a global selector might be a problem 
> if there’s other HTML which relies on static. We can have heavier-duty beads 
> to deal with setting relative positioning in those cases.
> 
>Harbs
> 



Re: New project for migration using Emulation

2018-06-11 Thread Piotr Zarzycki
Alex,

I will suggest them for sure to subscribe. Maybe they are doing it already!

 In the other words I should look closer to those errors in the code.

Thanks,
Piotr


pon., 11 cze 2018 o 08:09 Alex Harui  napisał(a):

> Hi Piotr,
>
> Chris and Scott should just subscribe to dev@ and/or users@ and ask their
> questions directly.
>
> The compiler errors might be hiding some APIs from the report, plus we
> want the Royale Compiler to be able to compile existing Flex code, so we
> should see what the source code looks like for those errors.
>
> My 2 cents,
> -Alex
>
> On 6/10/18, 7:52 AM, "Piotr Zarzycki"  wrote:
>
> Hi Guys,
>
> Chris and Scott from Flex community approach to me and ask for help and
> guidance with porting his application to Royale. I think Emulation
> components will be the best to start whole effort.
>
> I will be probably super slow with that due to other tasks, but I will
> try
> to share all the problems here.
>
> My first step was to generate API report for the application. I got
> something, but I feel that is not the full one, because I see some Null
> Pointers and errors in the build. [1]. I've used following Royale
> build to
> generate report. [2]
>
> If I don't have to bother because of that errors let me know and I will
> share report here.
>
> [1]
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FLPkY=02%7C01%7Caharui%40adobe.com%7Cfa5d7c250e044b44823308d5cee1c966%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636642391522411350=D%2FFw%2BaOoF%2Fs1mCFsdXsVwkYQlYlTdPsa7lbW9N%2FiufI%3D=0
> [2]
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapacheroyaleci.westus2.cloudapp.azure.com%3A8080%2Fjob%2FRoyale-asjs_MXRoyale%2F2%2F=02%7C01%7Caharui%40adobe.com%7Cfa5d7c250e044b44823308d5cee1c966%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636642391522411350=t0mD7YDpEfb5IE5qraVC8Tc9%2FSsFI3q7sZybMRxM5vw%3D=0
>
> Thanks,
> --
>
> Piotr Zarzycki
>
> Patreon: *
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki=02%7C01%7Caharui%40adobe.com%7Cfa5d7c250e044b44823308d5cee1c966%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636642391522411350=wM7L9u46wUDVbtdJIh6nNAnPQP9locA83yy5KY3mDVg%3D=0
> <
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki=02%7C01%7Caharui%40adobe.com%7Cfa5d7c250e044b44823308d5cee1c966%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636642391522411350=wM7L9u46wUDVbtdJIh6nNAnPQP9locA83yy5KY3mDVg%3D=0
> >*
>
>
>

-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
*


Re: [royale-asjs] branch develop updated: Fixes #258. But is that a proper fix?

2018-06-11 Thread Alex Harui
The emulation Application is based on Container and thus creates a Div.  It may 
not stay that way, but we did it so that the SystemManager can parent the app 
like it does in Flex.

Feel free to commit the bead.  It won't hurt anything and some folks will be 
able to use it.  I'm still wondering what the right answer is going to be for 
the emulation component sets.  Or what to do if someone does have some part of 
the DOM that they do not want style.position set.  There is no CSS way to 
specify "set style on all parents", AFAIK, which is would help reduce 
side-effects.

Later,
-Alex

On 6/8/18, 9:02 AM, "Harbs"  wrote:

> Interesting idea, but I thought there was concern about the global 
selector affecting HTML around the app?

Currently, we don’t have an Application class that attaches to regular divs 
It always controls the body element. Since we control the whole page, it’s not 
a problem. If we do get to the point where a Royale app can be injected into a 
random div, then setting a global selector might be a problem if there’s other 
HTML which relies on static. We can have heavier-duty beads to deal with 
setting relative positioning in those cases.

Harbs



Re: New project for migration using Emulation

2018-06-11 Thread Alex Harui
Hi Piotr,

Chris and Scott should just subscribe to dev@ and/or users@ and ask their 
questions directly.

The compiler errors might be hiding some APIs from the report, plus we want the 
Royale Compiler to be able to compile existing Flex code, so we should see what 
the source code looks like for those errors.

My 2 cents,
-Alex

On 6/10/18, 7:52 AM, "Piotr Zarzycki"  wrote:

Hi Guys,

Chris and Scott from Flex community approach to me and ask for help and
guidance with porting his application to Royale. I think Emulation
components will be the best to start whole effort.

I will be probably super slow with that due to other tasks, but I will try
to share all the problems here.

My first step was to generate API report for the application. I got
something, but I feel that is not the full one, because I see some Null
Pointers and errors in the build. [1]. I've used following Royale build to
generate report. [2]

If I don't have to bother because of that errors let me know and I will
share report here.

[1] 
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FLPkY=02%7C01%7Caharui%40adobe.com%7Cfa5d7c250e044b44823308d5cee1c966%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636642391522411350=D%2FFw%2BaOoF%2Fs1mCFsdXsVwkYQlYlTdPsa7lbW9N%2FiufI%3D=0
[2]

https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapacheroyaleci.westus2.cloudapp.azure.com%3A8080%2Fjob%2FRoyale-asjs_MXRoyale%2F2%2F=02%7C01%7Caharui%40adobe.com%7Cfa5d7c250e044b44823308d5cee1c966%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636642391522411350=t0mD7YDpEfb5IE5qraVC8Tc9%2FSsFI3q7sZybMRxM5vw%3D=0

Thanks,
-- 

Piotr Zarzycki

Patreon: 
*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki=02%7C01%7Caharui%40adobe.com%7Cfa5d7c250e044b44823308d5cee1c966%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636642391522411350=wM7L9u46wUDVbtdJIh6nNAnPQP9locA83yy5KY3mDVg%3D=0

*