Re: User docs entry for strands and beads

2018-12-28 Thread Alex Harui
Answers/Opinions inline

On 12/28/18, 5:07 AM, "Andrew Wetmore"  wrote:

Hi, all:

I am working on the user doc page for strands and beads [1]. This is
intended for application developers using Royale; there is unfinished
material available for developers working on Royale itself in the wiki [2],
[3].

From the app developer point of view, I want to answer these questions:

1. There are three ways of adding beads to a component: baked in using
, through CSS, and dynamically using addBead(). Which method is
best to use for what purposes?

CSS sets up loosely-coupled defaults.  Almost all (probably all) Royale 
components that are strands pick up default beads from CSS.  CSS allows setting 
default beads for one or more instances of a component in a single CSS 
Selector, just like CSS lets you set values on one or more HTMLElements.  But 
if our SWCs specify a certain bead as a default, and the app dev's CSS 
specifies a different one, it should be possible for certain CSS tools to 
optimize away the original default bead so it isn't linked into the output.

 is the MXML way of calling addBead().  It allows the developer to 
override the defaults bead from CSS for a single instance.  But now that bead 
is not loosely coupled, so if someone later subclasses the class that used 
js:beads or addBead, and specify a different bead, both the original and the 
new bead will be in the output.  It isn't that much different from specifying 
the "style" property on an HTMLElement in HTML.  Js:Beads and addBead overrides 
the underlying CSS.



1a. I can see from the wiki clear examples for two methods of adding beads.
Can someone point to an example using CSS to add a bead to a component?

Almost every SWC has a defaults.css file in src/main/resources that specify the 
default beads.  Several examples have MXML files that override the defaults in 
CSS.  Search the mxml files for "ClassReference"


2. Is the order of beads on a strand significant?
  
Yes.  That’s one reason I proposed "strands and beads" instead of "peas and 
porridge" or some other analogy.  In real life the physical beads you put on a 
strand totally change the look of the necklace or bracelet.  That can be the 
case here as well.  I don't think there are any examples where order causes a 
significant difference that doesn't result in a thrown exception from a null 
pointer, but if you don't specify order, you can get indeterminate results 
which we definitely don't want.  Others have pointed out the common issues 
(model first, then view, or making sure event listeners fire in the right 
order.  Sadly, I just looked and noted that getBeadByType is probably written 
incorrectly.  It should probably return the last bead added so you can override 
other beads if needed.  Right now, first-in-wins. I'm not sure we want that.  
But in theory, nobody should ever add more than one bead of the same type to 
the strand.  The ways of overriding the defaults should prevent the need for 
late overriding of beads.

  
3. How much should I worry about bead cleanup when a bead is no longer
actively used? I presume this would relate to dynamically-added beads, not
the  or CSS ones.

I've been tempted to delete the removeBead API.  Beads should never be removed. 
 We are compositing beads to form a component instead of subclassing base 
classes.  Both build up functionality and should never "delete" it.  It might 
mask or block "base-class" functionality, but you can't remove code from a base 
class, and theoretically, beads should never be removed either.


4. Where do I find the existing beads? Is there a curated list for each
release of Royale? How do I know which ones would be useful for a text
entry field, a list, a button?

I added a few ASDoc tags like @toplevel and @viewbead to some of the ASDoc and 
there is a cheap checkbox filter for it.  More asdoc tags need to be added and 
you are encouraged to come up with other ASDoc tags and references to other 
components.  That's one reason why ASDoc is a Royale app, so we can add 
client-side logic to provide more sophisticated filtering someday that makes 
use of ASDoc tags.

Thanks for working on it,
-Alex


Thanks!

a


[1]

https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2FWelcome%2FFeatures%2FStrands%2520and%2520Beads.htmldata=02%7C01%7Caharui%40adobe.com%7Ca37e020467d645bd3c7908d66cc56537%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636815992401552214sdata=WFGjvg63MiYqXlEyTGEuv1qZmcL4QtzK2kLpUAb9dKo%3Dreserved=0
[2]


Re: Royale XML and QNames

2018-12-28 Thread Alex Harui
Well, I don't think we want to require folks to use XMLQName in their code.  
However, your idea of ClassQName made me think that maybe we can have the 
compiler set a flag on the QName whenever it is used in bracket syntax on 
non-XML.  I will try to remember to try that next week.

-Alex

On 12/28/18, 2:17 AM, "Harbs"  wrote:

Gotcha.

I think the simplest solution is to replace Name with XMLQName for XML. The 
other similar option is to create a ClassQName that the compiler would use 
instead of QName for namespaces in classes.

> On Dec 28, 2018, at 10:32 AM, Alex Harui  wrote:
> 
> Most URIs in QNames have something like: 
"library://ns.adobe.com/mx/core/internal".  That is not a legal JavaScript 
property name.  IOW, you can't run:
> 
>someObject.library://ns.adobe.com/mx/core/internal::foo = 1;
> 
> So, we used to output bracket syntax:
> 
>someObject["library://ns.adobe.com/mx/core/internal::foo"] = 1;
> 
> For getter/setters, this meant that the Object.defineProperties had 
entries like:
> 
>   { "library://ns.adobe.com/mx/core/internal::foo": {get: ... }}
> 
> And Closure started choking on it, so now we replace the "/", "." and ":" 
with "$" or "_" to make it a legal JavaScript property name so we don't have to 
use quotes and brackets.
> 
> But if you use a QName in property access outside of XML, the JavaScript 
runtime calls QName.toString(), so it also has to return a string with the same 
character replacements so it matches.  So what are the implications of doing 
that?  I think inside of XML, we could test for QName and use QName.match 
and/or use the unmodified URI.  Currently, the QName stores the original URI, 
only toString() does the character replacements.  But if someone has 
expectations on what QName.toString() returns, then that might cause issues.
> 
> -Alex
> 
> On 12/27/18, 11:28 PM, "Harbs"  wrote:
> 
>What are we modifying with the URI?
> 
>> On Dec 28, 2018, at 2:33 AM, Alex Harui  wrote:
>> 
>> Yeah, that's the sort of thing I was concerned about.  XML does call 
QName.toString() but it doesn't seem to actually care too much about what comes 
back.  In toXMLName it takes whatever name is and calls toString() on it.  The 
QName.toString() is different between SWF and JS.  It is only in JS that we 
modify the uri to be a valid JS property name.  We used to use bracket syntax, 
but that's what ClosureCompiler is choking on.
>> 
>> The question is what does someone do with myXML.name().toString()?  Are 
they matching it up against a URI?  They should be calling QName.match().
>> 
>> I couldn't immediately think of a way for QName to know it is being used 
for XML vs other properties.  We could create an XMLQName class for JS to 
return from name() that doesn't modify the URI.
>> 
>> -Alex
>> 
>> On 12/27/18, 1:04 PM, "Harbs"  wrote:
>> 
>>   I don’t think we’re using toString() anywhere ourselves, but what 
happens if someone has myXML.name().toString()? (Or an implicit cast) Will this 
break their Flash code?
>> 
>>> On Dec 27, 2018, at 7:36 PM, Alex Harui  
wrote:
>>> 
>>> Harbs,
>>> 
>>> I just changed QName.toString() to match the new namespace format the 
compiler is outputting in order to make Google Closure Compiler happy.  Now I'm 
wondering if QName.toString() is used in Royale XML.
>>> 
>>> Thoughts?
>>> -Alex
>>> 
>> 
>> 
>> 
> 
> 
> 





Re: [royale-asjs] branch develop updated: improve IActivable to not rely on ids and use new activableName property

2018-12-28 Thread Alex Harui
Hi,

In the code you posted, I agree you don't need to change the name of the "name" 
parameter.  I am more interested in every place I see "IActivable" and 
isActive.  I haven't looked at the code in detail, but it sounds like you are 
working on something like a Navigator and IIRC, Flex Navigators "select" an 
INavigatorContent.  They don't "activate" it.

Also note that for MXML, we try to avoid methods wherever possible in favor of 
properties.  So instead of having a "selectedContent()" method, selectedContent 
would be better in MXML as a property so you can set it declaratively.

My 2 cents,
-Alex

On 12/28/18, 10:45 AM, "Carlos Rovira"  wrote:

Hi,

while doing the refactor for "name" to "selectedContent", I saw that maybe
the discussion is not having the real code into account.

I think what we really want to change is the method in the components that
are responsible to select the content, not the property "name" itself.

In this case, we have in all this components is "showContent" method that
maybe should be renamed to "selectedContent".

Here's the code:


/**
 * shows a concrete content and hides the rest
 *
 * @param name, the name of the container to show
 *
 * @langversion 3.0
 * @playerversion Flash 10.2
 * @playerversion AIR 2.6
 * @productversion Royale 0.9.4
 */
public function showContent(name:String):void
{
try
{
for (var i:int = 0; i < numElements; i++)
{
var content:IActivable = getElementAt(i) as IActivable;

if(content.name == name)
{
content.isActive = true;
}
else
{
content.isActive = false;
}
}
}
catch (error:Error)
{
throw new Error ("One or more content in TabBarContent is
not implementing IActivable interface.");
}
}

Thoughts?


El vie., 28 dic. 2018 a las 7:52, Alex Harui ()
escribió:

> I'm not sure I care what comes after "selected".  I was just trying to
> point out that we already have precedent for using "selected" as
> "one-of-many".
>
> -Alex
>
> On 12/27/18, 11:06 AM, "Carlos Rovira"  wrote:
>
> ok, so I what you propose is to change current "name" to
> "selectedWhatever". I understand that we can't create "selectedIndex"
> for
> now since we are dealing with names and not with indexes. So this is
> what I
> guess for your suggestion:
>
> * ApplicationMainContent -> selectedContent or selectedMainContent
> * TabBarContent -> selectedContent or selectedTabContent
> * WizardContent -> selectedContent, selectedPage or selectedWizardPage
>
> it seems to me that "selectedContent" will be valid for all, to avoid
> different API names and be more user friendly and seems as well it
> conforms
> to the concept of "navigation content only" of that components.
>
> what you (and others) prefer?
>
> Thanks
>
>
> El jue., 27 dic. 2018 a las 18:34, Alex Harui
> ()
> escribió:
>
> > Hi Carlos,
> >
> > IMO, you don't have to have a dataProvider as a public API to also
> offer
> > selectedIndex/Item/Tab.  No refactoring is needed, just changing the
> name.
> >
> > Flex Navigators used selectedIndex as will other Royale Navigators
> and the
> > Royale emulation components.
> >
> > "active" and "activation" have other meanings (active Window is the
> window
> > getting input).  I'm not even sure "activable" is a word, my spell
> checker
> > doesn't like it.
> >
> > My 2 cents,
> > -Alex
> >
> > On 12/27/18, 1:22 AM, "Carlos Rovira" 
> wrote:
> >
> > Hi Alex,
> >
> > currently this components shows content based on the "name" of
> the
> > screen
> > (some days ago was "id" what I want to avoid due to id
> conflicts). They
> > don't have the concept of
> dataProvider/selectedItem/selectedIndex.
> > It could be refactor but don't have clear if we need this kind 
of
> > navigation components use the same paradigm like list component.
> In my
> > case
> > I didn't find the need while working with this, maybe others
> could
> > need it?
> >
> > The components in Jewel that are "navigation 

Build failed in Jenkins: royale-asjs_MXTests #306

2018-12-28 Thread apacheroyaleci
See 


--
[...truncated 2.36 MB...]
[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

Jenkins build is back to normal : royale-asjs_jsonly #2132

2018-12-28 Thread apacheroyaleci
See 




RE: User docs entry for strands and beads

2018-12-28 Thread Yishay Weiss

>> 2. Is the order of beads on a strand significant?

>good question, maybe this should be answered by other.

>I think usually not if each bead is an isolated funcionality. But maybe you
>can think on some bead that requiere other beads, in that case, I suppose
>the bead that require the other one should ensure to get its own code.

I can think of 2 reasons why order matters:


  1.  A bead requires a different bead (e.g. view requires model)
  2.  Event handler priorities. Usually, the beads added first are the first to 
listen to events dispatched from the strand.


Re: [royale-asjs] branch develop updated: improve IActivable to not rely on ids and use new activableName property

2018-12-28 Thread Carlos Rovira
Hi,

while doing the refactor for "name" to "selectedContent", I saw that maybe
the discussion is not having the real code into account.

I think what we really want to change is the method in the components that
are responsible to select the content, not the property "name" itself.

In this case, we have in all this components is "showContent" method that
maybe should be renamed to "selectedContent".

Here's the code:


/**
 * shows a concrete content and hides the rest
 *
 * @param name, the name of the container to show
 *
 * @langversion 3.0
 * @playerversion Flash 10.2
 * @playerversion AIR 2.6
 * @productversion Royale 0.9.4
 */
public function showContent(name:String):void
{
try
{
for (var i:int = 0; i < numElements; i++)
{
var content:IActivable = getElementAt(i) as IActivable;

if(content.name == name)
{
content.isActive = true;
}
else
{
content.isActive = false;
}
}
}
catch (error:Error)
{
throw new Error ("One or more content in TabBarContent is
not implementing IActivable interface.");
}
}

Thoughts?


El vie., 28 dic. 2018 a las 7:52, Alex Harui ()
escribió:

> I'm not sure I care what comes after "selected".  I was just trying to
> point out that we already have precedent for using "selected" as
> "one-of-many".
>
> -Alex
>
> On 12/27/18, 11:06 AM, "Carlos Rovira"  wrote:
>
> ok, so I what you propose is to change current "name" to
> "selectedWhatever". I understand that we can't create "selectedIndex"
> for
> now since we are dealing with names and not with indexes. So this is
> what I
> guess for your suggestion:
>
> * ApplicationMainContent -> selectedContent or selectedMainContent
> * TabBarContent -> selectedContent or selectedTabContent
> * WizardContent -> selectedContent, selectedPage or selectedWizardPage
>
> it seems to me that "selectedContent" will be valid for all, to avoid
> different API names and be more user friendly and seems as well it
> conforms
> to the concept of "navigation content only" of that components.
>
> what you (and others) prefer?
>
> Thanks
>
>
> El jue., 27 dic. 2018 a las 18:34, Alex Harui
> ()
> escribió:
>
> > Hi Carlos,
> >
> > IMO, you don't have to have a dataProvider as a public API to also
> offer
> > selectedIndex/Item/Tab.  No refactoring is needed, just changing the
> name.
> >
> > Flex Navigators used selectedIndex as will other Royale Navigators
> and the
> > Royale emulation components.
> >
> > "active" and "activation" have other meanings (active Window is the
> window
> > getting input).  I'm not even sure "activable" is a word, my spell
> checker
> > doesn't like it.
> >
> > My 2 cents,
> > -Alex
> >
> > On 12/27/18, 1:22 AM, "Carlos Rovira" 
> wrote:
> >
> > Hi Alex,
> >
> > currently this components shows content based on the "name" of
> the
> > screen
> > (some days ago was "id" what I want to avoid due to id
> conflicts). They
> > don't have the concept of
> dataProvider/selectedItem/selectedIndex.
> > It could be refactor but don't have clear if we need this kind of
> > navigation components use the same paradigm like list component.
> In my
> > case
> > I didn't find the need while working with this, maybe others
> could
> > need it?
> >
> > The components in Jewel that are "navigation components" are:
> >
> > * ApplicationMainContent
> > * TabBarContent
> > * WizardContent
> >
> > As well we could create new versions based on dataProvider API so
> > people
> > can choose between both depending on their needs and that will
> be more
> > PAYG.
> >
> > In the other hand, those components are only the content part,
> and for
> > example we have TabBar that is the list of tab buttons (with
> > dataProvider
> > API) that can be used with a TabBarContent to navigate it, but
> the
> > former
> > delegates the selection (based on name property) to the latter.
> >
> > Thoughts?
> >
> >
> >
> >
> > El jue., 27 dic. 2018 a las 2:44, Alex Harui
> ( > >)
> > escribió:
> >
> > > I'm wondering what "active" or "activatable" means and how it
> is
> > different
> > > from selectedIndex/Item/Tab used elsewhere.
> > >
> > > -Alex
> > >
> > > On 12/26/18, 5:13 AM, "Harbs"  wrote:
> > >
> > > I’m fine with any of those suggestions. I don’t 

Re: User docs entry for strands and beads

2018-12-28 Thread Carlos Rovira
Hi Andrew,

El vie., 28 dic. 2018 a las 14:07, Andrew Wetmore ()
escribió:

>
> 1. There are three ways of adding beads to a component: baked in using
> , through CSS, and dynamically using addBead(). Which method is
> best to use for what purposes?
>

Don't think one is better than other, adding a bead to the array of beads
should be best for users that want a concrete behavior in the current
component instance, so usually this will be done for a "special case".
CSS could be a more generalist behavior so all instance of the same
component will use the same beads.
And addBead is more programatic approach (while the first one is more
declarative through MXML).

Of course, all of this is dependent on the use case since you can create an
MXML with an instance that uses concrete beads in Js:beads, and then reuse
it over all application, and in the same way, you can create a concrete css
selector that define a bead and use it in just one instance of the
component.



> 1a. I can see from the wiki clear examples for two methods of adding beads.
> Can someone point to an example using CSS to add a bead to a component?
>

For example item renderers in Jewel:

https://royale.apache.org/tourdejewel/#

in List example search for : className="iconListItemRenderer"

then check CSS:


https://github.com/apache/royale-asjs/blob/develop/examples/royale/TourDeJewel/src/main/resources/jewel-example-styles.css

and search for :

.iconListItemRenderer
{
IItemRenderer: ClassReference("itemRenderers.IconListItemRenderer");
}



> 2. Is the order of beads on a strand significant?
>
>
good question, maybe this should be answered by other.

I think usually not if each bead is an isolated funcionality. But maybe you
can think on some bead that requiere other beads, in that case, I suppose
the bead that require the other one should ensure to get its own code.


> 3. How much should I worry about bead cleanup when a bead is no longer
> actively used? I presume this would relate to dynamically-added beads, not
> the  or CSS ones.
>

don't think you need to remove a bead as a listener. But would like to read
Alex's response and see if removing a UIBase component will loop through
the beads and make a removal before remove the component itself.


>
> 4. Where do I find the existing beads? Is there a curated list for each
> release of Royale?


No, and I think this could be a great addition to documentation. If you
could create this list, I think it will be very valuable. Maybe you could
improve asdocs in each bead that could be needed (not all, but I think some
of the beads doesn't have a minimum doc of what we should expect to do)


> How do I know which ones would be useful for a text
> entry field, a list, a button?
>

In Jewel, the beads are organized in packages and controls. I tried to keep
organized while developing. So for Jewel that should be easy to do that
work. In Basic there's no such organization and all is in the same package.
We talked about do some package organization before 1.0.

Thanks to you to work on this :)


> Thanks!
>
> a
>
>
> [1]
>
> https://apache.github.io/royale-docs/Welcome/Features/Strands%20and%20Beads.html
> [2]
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=71013028
> [3] https://cwiki.apache.org/confluence/display/FLEX/Creating+Components
>
> --
> Andrew Wetmore
>
> http://cottage14.blogspot.com/
>


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


User docs entry for strands and beads

2018-12-28 Thread Andrew Wetmore
Hi, all:

I am working on the user doc page for strands and beads [1]. This is
intended for application developers using Royale; there is unfinished
material available for developers working on Royale itself in the wiki [2],
[3].

>From the app developer point of view, I want to answer these questions:

1. There are three ways of adding beads to a component: baked in using
, through CSS, and dynamically using addBead(). Which method is
best to use for what purposes?

1a. I can see from the wiki clear examples for two methods of adding beads.
Can someone point to an example using CSS to add a bead to a component?

2. Is the order of beads on a strand significant?

3. How much should I worry about bead cleanup when a bead is no longer
actively used? I presume this would relate to dynamically-added beads, not
the  or CSS ones.

4. Where do I find the existing beads? Is there a curated list for each
release of Royale? How do I know which ones would be useful for a text
entry field, a list, a button?

Thanks!

a


[1]
https://apache.github.io/royale-docs/Welcome/Features/Strands%20and%20Beads.html
[2]
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=71013028
[3] https://cwiki.apache.org/confluence/display/FLEX/Creating+Components

-- 
Andrew Wetmore

http://cottage14.blogspot.com/


[GitHub] cottage14 opened a new pull request #13: Cottage14 patch 1

2018-12-28 Thread GitBox
cottage14 opened a new pull request #13: Cottage14 patch 1
URL: https://github.com/apache/royale-docs/pull/13
 
 
   Updating page on strands and beads


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] cottage14 closed pull request #13: Cottage14 patch 1

2018-12-28 Thread GitBox
cottage14 closed pull request #13: Cottage14 patch 1
URL: https://github.com/apache/royale-docs/pull/13
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Jenkins build is back to normal : royale-compiler #650

2018-12-28 Thread apacheroyaleci
See 




Re: Royale XML and QNames

2018-12-28 Thread Harbs
Gotcha.

I think the simplest solution is to replace Name with XMLQName for XML. The 
other similar option is to create a ClassQName that the compiler would use 
instead of QName for namespaces in classes.

> On Dec 28, 2018, at 10:32 AM, Alex Harui  wrote:
> 
> Most URIs in QNames have something like: 
> "library://ns.adobe.com/mx/core/internal".  That is not a legal JavaScript 
> property name.  IOW, you can't run:
> 
>someObject.library://ns.adobe.com/mx/core/internal::foo = 1;
> 
> So, we used to output bracket syntax:
> 
>someObject["library://ns.adobe.com/mx/core/internal::foo"] = 1;
> 
> For getter/setters, this meant that the Object.defineProperties had entries 
> like:
> 
>   { "library://ns.adobe.com/mx/core/internal::foo": {get: ... }}
> 
> And Closure started choking on it, so now we replace the "/", "." and ":" 
> with "$" or "_" to make it a legal JavaScript property name so we don't have 
> to use quotes and brackets.
> 
> But if you use a QName in property access outside of XML, the JavaScript 
> runtime calls QName.toString(), so it also has to return a string with the 
> same character replacements so it matches.  So what are the implications of 
> doing that?  I think inside of XML, we could test for QName and use 
> QName.match and/or use the unmodified URI.  Currently, the QName stores the 
> original URI, only toString() does the character replacements.  But if 
> someone has expectations on what QName.toString() returns, then that might 
> cause issues.
> 
> -Alex
> 
> On 12/27/18, 11:28 PM, "Harbs"  wrote:
> 
>What are we modifying with the URI?
> 
>> On Dec 28, 2018, at 2:33 AM, Alex Harui  wrote:
>> 
>> Yeah, that's the sort of thing I was concerned about.  XML does call 
>> QName.toString() but it doesn't seem to actually care too much about what 
>> comes back.  In toXMLName it takes whatever name is and calls toString() on 
>> it.  The QName.toString() is different between SWF and JS.  It is only in JS 
>> that we modify the uri to be a valid JS property name.  We used to use 
>> bracket syntax, but that's what ClosureCompiler is choking on.
>> 
>> The question is what does someone do with myXML.name().toString()?  Are they 
>> matching it up against a URI?  They should be calling QName.match().
>> 
>> I couldn't immediately think of a way for QName to know it is being used for 
>> XML vs other properties.  We could create an XMLQName class for JS to return 
>> from name() that doesn't modify the URI.
>> 
>> -Alex
>> 
>> On 12/27/18, 1:04 PM, "Harbs"  wrote:
>> 
>>   I don’t think we’re using toString() anywhere ourselves, but what happens 
>> if someone has myXML.name().toString()? (Or an implicit cast) Will this 
>> break their Flash code?
>> 
>>> On Dec 27, 2018, at 7:36 PM, Alex Harui  wrote:
>>> 
>>> Harbs,
>>> 
>>> I just changed QName.toString() to match the new namespace format the 
>>> compiler is outputting in order to make Google Closure Compiler happy.  Now 
>>> I'm wondering if QName.toString() is used in Royale XML.
>>> 
>>> Thoughts?
>>> -Alex
>>> 
>> 
>> 
>> 
> 
> 
> 



Build failed in Jenkins: royale-asjs_MXTests #305

2018-12-28 Thread apacheroyaleci
See 


Changes:

[noreply] Update TextInput.as

--
[...truncated 2.36 MB...]
[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

[mxmlc] using source file: 

Re: Build SDK with ANT fails in test

2018-12-28 Thread Carlos Rovira
Thanks Alex,

that worked :)

El vie., 28 dic. 2018 a las 9:24, Alex Harui ()
escribió:

> The CI servers are building successfully.
>
> Run "ant wipe-all" in royale-compiler, then "ant".
>
> -Alex
>
> On 12/28/18, 12:11 AM, "Carlos Rovira"  wrote:
>
> Hi
>
> latest changes are still causing some problems in build. Can you point
> me
> to some flag I can use to avoid this tests when building SDK with ANT
> while
> this problems are fixed?
> thanks
>
> main:
>
> [mkdir] Created dir:
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/junit-temp/externs
>
> [unjar] Expanding:
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-jx/lib/google/closure-compiler/compiler.jar
> into
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/junit-temp/externs
>
> [unzip] Expanding:
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/junit-temp/externs/externs.zip
> into
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/downloads
>
>
> compile.unit.tests:
>
>[delete] Deleting directory
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes
>
> [mkdir] Created dir:
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes
>
>  [copy] Copying 12 files to
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes
>
> [javac] Compiling 15 source files to
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes
>
> [javac]
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:33:
> error: cannot find symbol
>
> [javac] import
> com.google.javascript.rhino.jstype.JSType.Nullability;
>
> [javac] ^
>
> [javac]   symbol:   class Nullability
>
> [javac]   location: class JSType
>
> [javac]
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:87:
> error: cannot find symbol
>
> [javac]
>  evaluateParam(FooOptVarArgs.getConstructor(),
> "arg1").toAnnotationString(Nullability.EXPLICIT));
>
> [javac]
>   ^
>
> [javac]   symbol:   variable Nullability
>
> [javac]   location: class TestConstructor
>
> [javac]
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:90:
> error: cannot find symbol
>
> [javac]
>  evaluateParam(FooOptVarArgs.getConstructor(),
> "opt_arg2").toAnnotationString(Nullability.EXPLICIT));
>
> [javac]
>   ^
>
> [javac]   symbol:   variable Nullability
>
> [javac]   location: class TestConstructor
>
> [javac]
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:93:
> error: cannot find symbol
>
> [javac]
>  evaluateParam(FooOptVarArgs.getConstructor(),
> "var_args").toAnnotationString(Nullability.EXPLICIT));
>
> [javac]
>   ^
>
> [javac]   symbol:   variable Nullability
>
> [javac]   location: class TestConstructor
>
> [javac] 4 errors
>
>
> BUILD FAILED
>
> /Users/carlosrovira/Dev/Royale/Source/royale-asjs/build.xml:1942: The
> following error occurred while executing this line:
>
> /Users/carlosrovira/Dev/Royale/Source/royale-asjs/build.xml:2029: The
> following error occurred while executing this line:
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/build.xml:67: The
> following error occurred while executing this line:
>
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/build.xml:140:
> The following error occurred while executing this line:
>
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/build.xml:145:
> The following error occurred while executing this line:
>
>
> /Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/build.xml:60:
> Compile failed; see the compiler error output for details.
>
>
> Total time: 3 seconds
>
> Error:Build stopped - build SDK with ANT
>
> --
> Carlos Rovira
>
> 

Re: Royale XML and QNames

2018-12-28 Thread Alex Harui
Most URIs in QNames have something like: 
"library://ns.adobe.com/mx/core/internal".  That is not a legal JavaScript 
property name.  IOW, you can't run:

someObject.library://ns.adobe.com/mx/core/internal::foo = 1;

So, we used to output bracket syntax:

someObject["library://ns.adobe.com/mx/core/internal::foo"] = 1;

For getter/setters, this meant that the Object.defineProperties had entries 
like:

   { "library://ns.adobe.com/mx/core/internal::foo": {get: ... }}

And Closure started choking on it, so now we replace the "/", "." and ":" with 
"$" or "_" to make it a legal JavaScript property name so we don't have to use 
quotes and brackets.

But if you use a QName in property access outside of XML, the JavaScript 
runtime calls QName.toString(), so it also has to return a string with the same 
character replacements so it matches.  So what are the implications of doing 
that?  I think inside of XML, we could test for QName and use QName.match 
and/or use the unmodified URI.  Currently, the QName stores the original URI, 
only toString() does the character replacements.  But if someone has 
expectations on what QName.toString() returns, then that might cause issues.

-Alex

On 12/27/18, 11:28 PM, "Harbs"  wrote:

What are we modifying with the URI?

> On Dec 28, 2018, at 2:33 AM, Alex Harui  wrote:
> 
> Yeah, that's the sort of thing I was concerned about.  XML does call 
QName.toString() but it doesn't seem to actually care too much about what comes 
back.  In toXMLName it takes whatever name is and calls toString() on it.  The 
QName.toString() is different between SWF and JS.  It is only in JS that we 
modify the uri to be a valid JS property name.  We used to use bracket syntax, 
but that's what ClosureCompiler is choking on.
> 
> The question is what does someone do with myXML.name().toString()?  Are 
they matching it up against a URI?  They should be calling QName.match().
> 
> I couldn't immediately think of a way for QName to know it is being used 
for XML vs other properties.  We could create an XMLQName class for JS to 
return from name() that doesn't modify the URI.
> 
> -Alex
> 
> On 12/27/18, 1:04 PM, "Harbs"  wrote:
> 
>I don’t think we’re using toString() anywhere ourselves, but what 
happens if someone has myXML.name().toString()? (Or an implicit cast) Will this 
break their Flash code?
> 
>> On Dec 27, 2018, at 7:36 PM, Alex Harui  wrote:
>> 
>> Harbs,
>> 
>> I just changed QName.toString() to match the new namespace format the 
compiler is outputting in order to make Google Closure Compiler happy.  Now I'm 
wondering if QName.toString() is used in Royale XML.
>> 
>> Thoughts?
>> -Alex
>> 
> 
> 
> 





Re: Build SDK with ANT fails in test

2018-12-28 Thread Alex Harui
The CI servers are building successfully.

Run "ant wipe-all" in royale-compiler, then "ant".

-Alex

On 12/28/18, 12:11 AM, "Carlos Rovira"  wrote:

Hi

latest changes are still causing some problems in build. Can you point me
to some flag I can use to avoid this tests when building SDK with ANT while
this problems are fixed?
thanks

main:

[mkdir] Created dir:

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/junit-temp/externs

[unjar] Expanding:

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-jx/lib/google/closure-compiler/compiler.jar
into

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/junit-temp/externs

[unzip] Expanding:

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/junit-temp/externs/externs.zip
into

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/downloads


compile.unit.tests:

   [delete] Deleting directory

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes

[mkdir] Created dir:

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes

 [copy] Copying 12 files to

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes

[javac] Compiling 15 source files to

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes

[javac]

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:33:
error: cannot find symbol

[javac] import com.google.javascript.rhino.jstype.JSType.Nullability;

[javac] ^

[javac]   symbol:   class Nullability

[javac]   location: class JSType

[javac]

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:87:
error: cannot find symbol

[javac] evaluateParam(FooOptVarArgs.getConstructor(),
"arg1").toAnnotationString(Nullability.EXPLICIT));

[javac]
  ^

[javac]   symbol:   variable Nullability

[javac]   location: class TestConstructor

[javac]

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:90:
error: cannot find symbol

[javac] evaluateParam(FooOptVarArgs.getConstructor(),
"opt_arg2").toAnnotationString(Nullability.EXPLICIT));

[javac]
  ^

[javac]   symbol:   variable Nullability

[javac]   location: class TestConstructor

[javac]

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:93:
error: cannot find symbol

[javac] evaluateParam(FooOptVarArgs.getConstructor(),
"var_args").toAnnotationString(Nullability.EXPLICIT));

[javac]
  ^

[javac]   symbol:   variable Nullability

[javac]   location: class TestConstructor

[javac] 4 errors


BUILD FAILED

/Users/carlosrovira/Dev/Royale/Source/royale-asjs/build.xml:1942: The
following error occurred while executing this line:

/Users/carlosrovira/Dev/Royale/Source/royale-asjs/build.xml:2029: The
following error occurred while executing this line:

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/build.xml:67: The
following error occurred while executing this line:


/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/build.xml:140:
The following error occurred while executing this line:


/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/build.xml:145:
The following error occurred while executing this line:


/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/build.xml:60:
Compile failed; see the compiler error output for details.


Total time: 3 seconds

Error:Build stopped - build SDK with ANT

-- 
Carlos Rovira

https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosroviradata=02%7C01%7Caharui%40adobe.com%7Cbda1726615804210c09b08d66c9c1c02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636815815117460506sdata=%2BF782JxseaB1dky2SKaiV58nXkz%2FBZfbhDu6HiLUwM8%3Dreserved=0




Build SDK with ANT fails in test

2018-12-28 Thread Carlos Rovira
Hi

latest changes are still causing some problems in build. Can you point me
to some flag I can use to avoid this tests when building SDK with ANT while
this problems are fixed?
thanks

main:

[mkdir] Created dir:
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/junit-temp/externs

[unjar] Expanding:
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-jx/lib/google/closure-compiler/compiler.jar
into
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/junit-temp/externs

[unzip] Expanding:
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/junit-temp/externs/externs.zip
into
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/downloads


compile.unit.tests:

   [delete] Deleting directory
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes

[mkdir] Created dir:
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes

 [copy] Copying 12 files to
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes

[javac] Compiling 15 source files to
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/target/test-classes

[javac]
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:33:
error: cannot find symbol

[javac] import com.google.javascript.rhino.jstype.JSType.Nullability;

[javac] ^

[javac]   symbol:   class Nullability

[javac]   location: class JSType

[javac]
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:87:
error: cannot find symbol

[javac] evaluateParam(FooOptVarArgs.getConstructor(),
"arg1").toAnnotationString(Nullability.EXPLICIT));

[javac]
  ^

[javac]   symbol:   variable Nullability

[javac]   location: class TestConstructor

[javac]
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:90:
error: cannot find symbol

[javac] evaluateParam(FooOptVarArgs.getConstructor(),
"opt_arg2").toAnnotationString(Nullability.EXPLICIT));

[javac]
  ^

[javac]   symbol:   variable Nullability

[javac]   location: class TestConstructor

[javac]
/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/java/org/apache/royale/compiler/internal/codegen/typedefs/TestConstructor.java:93:
error: cannot find symbol

[javac] evaluateParam(FooOptVarArgs.getConstructor(),
"var_args").toAnnotationString(Nullability.EXPLICIT));

[javac]
  ^

[javac]   symbol:   variable Nullability

[javac]   location: class TestConstructor

[javac] 4 errors


BUILD FAILED

/Users/carlosrovira/Dev/Royale/Source/royale-asjs/build.xml:1942: The
following error occurred while executing this line:

/Users/carlosrovira/Dev/Royale/Source/royale-asjs/build.xml:2029: The
following error occurred while executing this line:

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/build.xml:67: The
following error occurred while executing this line:

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/build.xml:140:
The following error occurred while executing this line:

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/build.xml:145:
The following error occurred while executing this line:

/Users/carlosrovira/Dev/Royale/Source/royale-compiler/compiler-externc/src/test/build.xml:60:
Compile failed; see the compiler error output for details.


Total time: 3 seconds

Error:Build stopped - build SDK with ANT

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


Jenkins build is back to normal : royale-asjs_jsonly #2129

2018-12-28 Thread apacheroyaleci
See