Re: Displaying text in MXML

2022-05-18 Thread Edward Stangler

Yes, CDATA should work.  The following works in Flex:



http://ns.adobe.com/mxml/2009;
xmlns:mx="library://ns.adobe.com/flex/mx">









The only thing you have to escape in CDATA is "]]>".  (You would replace
it with 

Re: compiler issue or not ?

2022-05-18 Thread contact

Done :

https://github.com/apache/royale-compiler/issues/212

Le 2022-05-18 23:26, Greg Dove a écrit :


Please report that as an issue. For the first one, I assume it is
generating something like 
d1.setHours(d1.setMinutes(d1.setMillseconds(0)))
? That is going to cause problems, because each of those methods 
returns

the 'getTime()' value, and not the value that was set.

On Thu, May 19, 2022 at 9:12 AM  wrote:


Hi All,

I notice something strange  (using sdk 0.9.9), take this code :

var d1:Date = new Date();
d1.hours = d1.minutes = d1.milliseconds = 0;
trace ("d1->" + d1.getTime());

var d2:Date = new Date();
d2.hours = 0;
d2.minutes = 0;
d2.milliseconds = 0;
trace ("d2->" + d2.getTime());

It will show this result :

d1->NaN
d2->1652824822000

Do I need to report this as an issue ? or X = Y = Z = 0 is a bad
practice in as3 (or I'm wrong using Date ?) ?

Regards
Fred


--
Frédéric Gilli

mob.0668542622

http://www.cristallium.com

 [1]



Links:
--
[1] http://www.cristallium.com

Re: compiler issue or not ?

2022-05-18 Thread contact

You are totally right :

var /** @type {Date} */ d1 = new Date();
d1.setHours(d1.setMinutes(d1.setMilliseconds(0)));
org.apache.royale.utils.Language.trace("d1->" + d1.getTime());

Le 2022-05-18 23:26, Greg Dove a écrit :


Please report that as an issue. For the first one, I assume it is
generating something like 
d1.setHours(d1.setMinutes(d1.setMillseconds(0)))
? That is going to cause problems, because each of those methods 
returns

the 'getTime()' value, and not the value that was set.

On Thu, May 19, 2022 at 9:12 AM  wrote:


Hi All,

I notice something strange  (using sdk 0.9.9), take this code :

var d1:Date = new Date();
d1.hours = d1.minutes = d1.milliseconds = 0;
trace ("d1->" + d1.getTime());

var d2:Date = new Date();
d2.hours = 0;
d2.minutes = 0;
d2.milliseconds = 0;
trace ("d2->" + d2.getTime());

It will show this result :

d1->NaN
d2->1652824822000

Do I need to report this as an issue ? or X = Y = Z = 0 is a bad
practice in as3 (or I'm wrong using Date ?) ?

Regards
Fred

Re: compiler issue or not ?

2022-05-18 Thread Greg Dove
Please report that as an issue. For the first one, I assume it is
generating something like d1.setHours(d1.setMinutes(d1.setMillseconds(0)))
? That is going to cause problems, because each of those methods returns
the 'getTime()' value, and not the value that was set.



On Thu, May 19, 2022 at 9:12 AM  wrote:

> Hi All,
>
> I notice something strange  (using sdk 0.9.9), take this code :
>
> var d1:Date = new Date();
> d1.hours = d1.minutes = d1.milliseconds = 0;
> trace ("d1->" + d1.getTime());
>
> var d2:Date = new Date();
> d2.hours = 0;
> d2.minutes = 0;
> d2.milliseconds = 0;
> trace ("d2->" + d2.getTime());
>
> It will show this result :
>
> d1->NaN
> d2->1652824822000
>
> Do I need to report this as an issue ? or X = Y = Z = 0 is a bad
> practice in as3 (or I'm wrong using Date ?) ?
>
> Regards
> Fred
>
>
>


compiler issue or not ?

2022-05-18 Thread contact

Hi All,

I notice something strange  (using sdk 0.9.9), take this code :

var d1:Date = new Date();
d1.hours = d1.minutes = d1.milliseconds = 0;
trace ("d1->" + d1.getTime());

var d2:Date = new Date();
d2.hours = 0;
d2.minutes = 0;
d2.milliseconds = 0;
trace ("d2->" + d2.getTime());

It will show this result :

d1->NaN
d2->1652824822000

Do I need to report this as an issue ? or X = Y = Z = 0 is a bad 
practice in as3 (or I'm wrong using Date ?) ?


Regards
Fred




Re: Quick check on Linting tools for Apache Royale

2022-05-18 Thread Greg Dove
Hi Josh,

That does sound like a great idea to me.
I'm not sure to what degree I could help, but if you do get to the point
where you want to work on such a thing, and assuming I can find the time,
I'd be happy to help.

-Greg


On Thu, May 19, 2022 at 6:29 AM Josh Tynjala 
wrote:

> I wonder if it makes sense to create a new linter for Royale. Similar to
> the new formatter that I recently created, where there could be a command
> line interface and a Java API for integration into tooling.
>
> --
> Josh Tynjala
> Bowler Hat LLC 
>
>
> On Tue, May 17, 2022 at 9:51 PM Greg Dove  wrote:
>
> > Hi everyone,
> >
> > It's been a while since I used any code quality tools with Apache Royale.
> > I'm keen for some updated suggestions if you have any... to be clear:
> this
> > is about the actionscript/css/mxml, not about the generated javascript.
> >
> > I worked on a project some years ago (when it was still FlexJS) where we
> > used SonarQube, and that was working at the time (as part of a maven
> build)
> > and was useful (although I think it may have been limited to actionscript
> > code blocks inside mxml and not working with mxml itself...).
> >
> > Has anyone used SonarQube or perhaps tried to use Flex PMD or anything
> else
> > recently, with Apache Royale? Would be keen to hear your thoughts and/or
> > recommendations!
> >
> > Thanks,
> > Greg
> >
>


Re: [Non-DoD Source] Quick check on Linting tools for Apache Royale

2022-05-18 Thread Greg Dove
Hi Mark,

I appreciate you sharing your more recent experience - it sounds like
SonarQube remains the most viable option for now...

Thanks,
Greg


On Thu, May 19, 2022 at 5:20 AM Kessler CTR Mark J
 wrote:

> Greg,
> We actually still use SonarQube for AS file scanning as AS3 does not
> have a lot of actively developed utilities in this area. You do have to
> customize their rules list to be more appropriate, but it does give you a
> 70% solution. You are correct about it not working on any code structure
> inside of the MXML files themselves. Run the MXML files lean on code and
> rely on controllers/VO/utility in pure AS files to give you the most
> benefit from it.
>
> -Mark K
>
> -Original Message-
> From: Greg Dove 
> Sent: Wednesday, May 18, 2022 00:51
> To: us...@royale.apache.org
> Cc: Apache Royale Development 
> Subject: [Non-DoD Source] Quick check on Linting tools for Apache Royale
>
>
> Hi everyone,
>
> It's been a while since I used any code quality tools with Apache Royale.
> I'm keen for some updated suggestions if you have any... to be clear: this
> is about the actionscript/css/mxml, not about the generated javascript.
>
> I worked on a project some years ago (when it was still FlexJS) where we
> used SonarQube, and that was working at the time (as part of a maven build)
> and was useful (although I think it may have been limited to actionscript
> code blocks inside mxml and not working with mxml itself...).
>
> Has anyone used SonarQube or perhaps tried to use Flex PMD or anything
> else recently, with Apache Royale? Would be keen to hear your thoughts
> and/or recommendations!
>
> Thanks,
> Greg
>
>
>


Re: Quick check on Linting tools for Apache Royale

2022-05-18 Thread Josh Tynjala
I wonder if it makes sense to create a new linter for Royale. Similar to
the new formatter that I recently created, where there could be a command
line interface and a Java API for integration into tooling.

--
Josh Tynjala
Bowler Hat LLC 


On Tue, May 17, 2022 at 9:51 PM Greg Dove  wrote:

> Hi everyone,
>
> It's been a while since I used any code quality tools with Apache Royale.
> I'm keen for some updated suggestions if you have any... to be clear: this
> is about the actionscript/css/mxml, not about the generated javascript.
>
> I worked on a project some years ago (when it was still FlexJS) where we
> used SonarQube, and that was working at the time (as part of a maven build)
> and was useful (although I think it may have been limited to actionscript
> code blocks inside mxml and not working with mxml itself...).
>
> Has anyone used SonarQube or perhaps tried to use Flex PMD or anything else
> recently, with Apache Royale? Would be keen to hear your thoughts and/or
> recommendations!
>
> Thanks,
> Greg
>


RE: [Non-DoD Source] Quick check on Linting tools for Apache Royale

2022-05-18 Thread Kessler CTR Mark J
Greg,
We actually still use SonarQube for AS file scanning as AS3 does not have a 
lot of actively developed utilities in this area. You do have to customize 
their rules list to be more appropriate, but it does give you a 70% solution. 
You are correct about it not working on any code structure inside of the MXML 
files themselves. Run the MXML files lean on code and rely on 
controllers/VO/utility in pure AS files to give you the most benefit from it.

-Mark K

-Original Message-
From: Greg Dove 
Sent: Wednesday, May 18, 2022 00:51
To: us...@royale.apache.org
Cc: Apache Royale Development 
Subject: [Non-DoD Source] Quick check on Linting tools for Apache Royale


Hi everyone,

It's been a while since I used any code quality tools with Apache Royale. I'm 
keen for some updated suggestions if you have any... to be clear: this is about 
the actionscript/css/mxml, not about the generated javascript.

I worked on a project some years ago (when it was still FlexJS) where we used 
SonarQube, and that was working at the time (as part of a maven build) and was 
useful (although I think it may have been limited to actionscript code blocks 
inside mxml and not working with mxml itself...).

Has anyone used SonarQube or perhaps tried to use Flex PMD or anything else 
recently, with Apache Royale? Would be keen to hear your thoughts and/or 
recommendations!

Thanks,
Greg




RE: TileHorizontalLayout compute wrong margin-right in case of scroller (ignoring scrollbar width) (Issue #1193)

2022-05-18 Thread Maria Jose Esteve
Hi, cristallium, I have uploaded the proposed changes [bae2b99]
It works for me, try it yourself and if you have any problem let me know.

[bae2b99] 
https://github.com/apache/royale-asjs/commit/bae2b992fc13cd365b5a0148f5828fe68256a1e0

Hiedra

De: cont...@cristallium.com 
Enviado el: lunes, 9 de mayo de 2022 10:04
Para: dev@royale.apache.org
Asunto: Re: TileHorizontalLayout compute wrong margin-right in case of scroller 
(ignoring scrollbar width) (Issue #1193)


Yes, this is perfect ! I tested on PC with Chrome and Firefox

Le 2022-05-09 04:20, Maria Jose Esteve a écrit :
I have obtained satisfactory results by adding observeElementSize to 
hostComponent.element (for Windows).

This could be an initial version:
https://github.com/mjesteve/royale-asjs/commit/ce3fc686073b44b75b25d4ef13ed4332e3a364e0

What do you think?

Hiedra

-Mensaje original-
De: Maria Jose Esteve mailto:mjest...@iest.com>>
Enviado el: sábado, 30 de abril de 2022 12:01
Para: dev@royale.apache.org; 
cont...@cristallium.com
Asunto: RE: TileHorizontalLayout compute wrong margin-right in case of scroller 
(ignoring scrollbar width) (Issue #1193)

Yes, it will be necessary to put some "Observer". It occurs to me to look at 
the existing solution in Grid/GridCell.
Hiedra

-Mensaje original-
De: cont...@cristallium.com 
mailto:cont...@cristallium.com>> Enviado el: sábado, 
30 de abril de 2022 10:42
Para: dev@royale.apache.org
Asunto: RE: TileHorizontalLayout compute wrong margin-right in case of scroller 
(ignoring scrollbar width) (Issue #1193)

Hi,

Sorry, I misunderstood your previous message. I belived that 
hostComponent.element.scrollWidth doesn't work properly on Mac.

If that's working properly then this piece of code will solve the issue
:

 var adjustedHostWidth:Number = Math.floor(host.width - 
borderMetrics.left - borderMetrics.right);
 if (hostComponent.containsClass("scroll") ==  true){
 //Reserve some room for VScrollbar
 adjustedHostWidth -= hostComponent.element.scrollWidth ;
 }

But this need another fix to be totaly fonctional : layout() must be called 
again to update margin-right value if browser is redimensioned

What's your opinion ?

Fred



On 2022/04/29 08:39:23 Maria Jose Esteve wrote:


Hi, I would like to get your opinion about the Cristallium PR:


For THL to correctly calculate the internal width of the container you
need to know if the vertical scroll bar is visible and if so deduct
its width.



It seems that obtaining this value, the scroll width, depends on the
environment:


- Satisfactory tests have been obtained on Windows, with
hostComponent.element.scrollWidth.


- On Mac, the scroll has a different behavior but it seems that the
tests are also satisfactory.



Several questions:


With your experience, would using hostComponent.element.scrollWidth be
reliable enough?


And for those of you who work with Mac, any particularities to
consider?



As a temporary solution, Cristallium proposes to create a property
"vscrollBarWidthReserve" where we would indicate, in each case, the
width we know the scroll will have, but I think we should focus on
getting the correct scroll width... What is your opinion?



Thx.



Hiedra



De: Cristallium 


Enviado el: jueves, 28 de abril de 2022 20:39


Para: apache/royale-asjs 


CC: Maria Jose Esteve ; Mention



Asunto: Re: [apache/royale-asjs] TileHorizontalLayout compute wrong
margin-right in case of scroller (ignoring scrollbar width) (Issue
#1193)




Hi Maria,



I share the same thought from you : if there was a way to get,
truthfully or acceptably, the width of the scroll it would be better.
When you said "mac" are you talking of "safari" web browser ? If yes I
search a little on Internet, but found nothing interessing to get
safari scrollbar width.


Do you think other Apache Royale team would have an advice on it ?


Actually I didn't see any solution except adding a new property ( or
bead but my level isn't hight enought to know what's better).


Can we for now add property (or bead) and when all browsers will
propose to have a real way to get scroll width we could remove this
property ?



-


Reply to this email directly, view it on
GitHub,
or
unsubscribe.


You are receiving this because you were mentioned.Message ID:




--

Frédéric Gilli

mob.0668542622

http://www.cristallium.com

[cid:image001.png@01D86ABA.71C72ED0]




RE: New Interface Jewel

2022-05-18 Thread Maria Jose Esteve
Hi, I have made the changes. [#1197]
I don't think it will cause errors in current user implementations, I have 
tried to make it compatible (both for usage and extension). I have compiled TDJ 
and the operation of the ComboBox and DateField controls is as expected.
If anyone sees any problems with the implementation or thinks something should 
be changed let me know.

I think this compatibility should be temporary (I have marked as /* deprecated 
*/ the code) but you'll have to tell me how you deal with these situations

[#1197] https://github.com/apache/royale-asjs/pull/1197
- New Jewel IInputAndButtonView interface for the views of controls composed by 
a textinput and a button.
Implemented in Jewel ComboBox and Jewel DateField.
- New generic "Disabled" and "ReadOnly" beads for controls implementing the 
IInputAndButtonView interface.
For compatibility, temporarily, they have been kept:
 * ComboBoxDisabled, ComboBoxReadOnly and DateFieldDisabled beads.
 * The previous properties "textInput" ('I' uppercase) and menuButton in 
the DateFieldView bead.

Hiedra

-Mensaje original-
De: Maria Jose Esteve  
Enviado el: martes, 17 de mayo de 2022 12:37
Para: dev@royale.apache.org
Asunto: RE: New Interface Jewel

That is another option, yes, I had not thought about it, I imagine because of 
the name. 
If we do it this way, to DateField we would have to change the variables to 
lowercase and menubutton to button. This change would only affect users who 
have extended DateFieldView.

Does anyone see any other considerations?

@yishay, What if we were to rename the interface to ... IInputAndButtonView (to 
make it more generic)?

Hiedra

-Mensaje original-
De: Yishay Weiss  Enviado el: martes, 17 de mayo de 
2022 12:13
Para: dev@royale.apache.org
Asunto: RE: New Interface Jewel

Looks like textInput and button are all the bead requires and both are defined 
in IComboBoxView. Personally, I think it's ok for DateFieldView to implement 
IComboBoxView.

From: Maria Jose Esteve
Sent: Monday, May 16, 2022 11:36 AM
To: dev@royale.apache.org
Subject: RE: New Interface Jewel

I stand by my question...

> What name would you give to an iBeadView that defines a TextInput and 
a Button (ComboBoxView, DateFieldView,...)?
> ¿IViewTextButton?

My purpose is to unify beads of type "ComboBoxDisabled", "DateFieldDisabled", 
..., into one (they share all the code except for the reference to the view)

Hiedra

-Mensaje original-
De: Maria Jose Esteve  Enviado el: lunes, 16 de mayo de 2022 
9:51
Para: dev@royale.apache.org
Asunto: RE: New Interface Jewel

There is a similar "IComboBoxView". Sorry

Hiedra

-Mensaje original-
De: Maria Jose Esteve  Enviado el: lunes, 16 de mayo de 2022 
9:38
Para: dev@royale.apache.org
Asunto: New Interface Jewel

Hi guys, What name would you give to an iBeadView that defines a TextInput and 
a Button (ComboBoxView, DateFieldView,...)?
¿IViewTextButton?

Hiedra