RE: [EXTERNAL] CSS & JS file versioning

2021-01-22 Thread Brian Raymes
FYI, I have expanded upon this for my debug version as well:

This adds a timestamp to ever every js reference provided in the debug output 
to hopefully thwart the cache. I’ve been having to clear my cache a lot lately, 
and I’m hoping this removes the need.

  
com.google.code.maven-replacer-plugin
replacer
1.5.3

  
package

  replace

  


  false
  ${basedir}/target/javascript/bin/js-debug/index.html
  

  
  


  
  

  

  



From: Carlos Rovira 
Sent: Thursday, January 14, 2021 1:27 AM
To: users@royale.apache.org
Subject: Re: [EXTERNAL] CSS & JS file versioning

Thanks Brian,

very useful!

Not related, but as well useful, I use maven's build timestamp with defines to 
get it in AS3 in the following way:

https://github.com/codeoscopic/avant2-website/blob/b97c62fb583e850e7190b28396e75adb3e7bf22a/avant2-products-companies/pom.xml#L169

Best,

Carlos

El mar, 12 ene 2021 a las 19:01, Brian Raymes 
(mailto:brian.ray...@teotech.com>>) escribió:
As others have stated, there are other ways to do this. Here is how I’m doing 
it with maven:

In my case, I’m currently using a timestamp to try to avoid caching. Feel free 
to replace with a version, etc.

This will update the template and build time.

  
${maven.build.timestamp}
  


  
com.google.code.maven-replacer-plugin
replacer
1.5.3

  
package

  replace

  


  false
  ${basedir}/target/javascript/bin/js-debug/index.html
  

  
  


  
  

  

  

Brian

From: lol lol mailto:massc...@gmx.de>>
Sent: Tuesday, January 12, 2021 1:47 AM
To: users@royale.apache.org
Subject: [EXTERNAL] CSS & JS file versioning

Hi All,

Is there any possibility defined that lets me define my own placeholders in the 
html-template?
For example im using an html template with the following line



Is there anything helpful already existing in the compiler so I can add a 
version to my css like so:


href="${application}?v=12345678" />

Thank!


--
Carlos Rovira
Apache Member & Apache Royale PMC
Apache Software Foundation
http://about.me/carlosrovira



Showing Local HTML

2021-01-22 Thread Bilbosax
In my AIR app that I am converting to Royale, I have a Google Map html file
that I would display using an ANE by Distriqt called NativeWebView.  It
created a webView on the mobile device that you could upload your local html
file to, and it created an AirBridge that allowed actionscript to call
Javascript functions or vice versa.  A beautiful and useful piece of code.

How would I do something like this on Royale?  Is there a component that
allows you to load local html files and pass information back and forth with
Javascript (like the old stageWebView or htmlLoader)?



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


RE: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)

2021-01-22 Thread Maria Jose Esteve
Yes, it seemed to me too . I will clean the code and share it (maybe tomorrow).

Hiedra.

De: Carlos Rovira 
Enviado el: viernes, 22 de enero de 2021 20:09
Para: users@royale.apache.org
Asunto: Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and 
Databinding)

Cool, thanks Brian :)

Maybe we could create a bead for PopUp to make if you use Crux to streamline 
the use...
someone is encouraged to create this and contribute? :)

El vie, 22 ene 2021 a las 20:03, Maria Jose Esteve 
(mailto:mjest...@iest.com>>) escribió:
It works perfect for me.
I have another mxml that I dynamically load in with the same problem, I'm going 
to try it there too but it sure works.

Thanks for the help Brian.
Hiedra

De: Brian Raymes mailto:brian.ray...@teotech.com>>
Enviado el: viernes, 22 de enero de 2021 18:02
Para: users@royale.apache.org
Asunto: RE: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and 
Databinding)

Here is how I’m making that work. Dispatch an ADD_BEAN before adding the 
content to the PopUp. This wires it up for crux.

I’m also dispatching REMOVE_BEAN when the popup is closed to ensure it is 
removed when not needed.
var searchPopup:SearchPopup = new SearchPopup();
. . .
dispatchEvent(new BeanEvent(BeanEvent.ADD_BEAN, searchPopup));
. . .
popup = new PopUp();
popup.content = searchPopup;
addElement(popup);
popup.open = true;


Hope this helps.

Brian

From: Maria Jose Esteve mailto:mjest...@iest.com>>
Sent: Friday, January 22, 2021 2:40 AM
To: users@royale.apache.org
Subject: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)


Hi,

I am experiencing an error similar to wkoch, the Databinding in a Popup does 
not work, in my case using crux.

I have an mxml, TopesDetPerson, that shows the detail of a record. My mvc model 
is injected and binded and it works perfectly if we insert it into the main 
mxml (SectionContent) but stops working if I create it programmatically. This 
is an excerpt from the build and upload code:



private var popupLimitsDetail:PopUp;

public function viewLimitsDetail():void

{

var pp:TopesDetPerson;

if(!popupLimitsDetail)

{

popupLimitsDetail = new PopUp();

popupLimitsDetail.modal = true;

pp = new TopesDetPerson();

popupLimitsDetail.content = pp;

addElement(popupLimitsDetail);

}



if(!popupLimitsDetail.open)

popupLimitsDetail.open = true;

}



In TopesDetPerson.mxml:



[Bindable]

[Inject(source="personalModel", required="true")]

public var personalModel:PersonalModel;

...









The model is not injected, the [PostConstruct] is not received, does it not 
exist for crux if it is not on the canvas? Is there a way to "refresh crux" so 
that it recognizes the links that are added after its initial configuration?

I hope I have explained clearly 



Thx.

Hiedra



-Mensaje original-

De: wkoch mailto:warren.r.k...@boeing.com>>

Enviado el: lunes, 18 de enero de 2021 18:21

Para: users@royale.apache.org

Asunto: Re: Popup and Databinding



Sorry -- I wasn't clear -- both the ItemRendererDataBinding and 
ContainerDataBinding beads worked.  I went with ContainerDataBinding as Harbs 
is right.  It's a better fit.







--

Sent from: http://apache-royale-users.20374.n8.nabble.com/


--
Carlos Rovira
Apache Member & Apache Royale PMC
Apache Software Foundation
http://about.me/carlosrovira



Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)

2021-01-22 Thread Carlos Rovira
Cool, thanks Brian :)

Maybe we could create a bead for PopUp to make if you use Crux to
streamline the use...
someone is encouraged to create this and contribute? :)

El vie, 22 ene 2021 a las 20:03, Maria Jose Esteve ()
escribió:

> It works perfect for me.
>
> I have another mxml that I dynamically load in with the same problem, I'm
> going to try it there too but it sure works.
>
>
>
> Thanks for the help Brian.
>
> Hiedra
>
>
>
> *De:* Brian Raymes 
> *Enviado el:* viernes, 22 de enero de 2021 18:02
> *Para:* users@royale.apache.org
> *Asunto:* RE: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and
> Databinding)
>
>
>
> Here is how I’m making that work. Dispatch an ADD_BEAN before adding the
> content to the PopUp. This wires it up for crux.
>
>
>
> I’m also dispatching REMOVE_BEAN when the popup is closed to ensure it is
> removed when not needed.
>
> var searchPopup:SearchPopup = new SearchPopup();
>
> . . .
> dispatchEvent(new BeanEvent(BeanEvent.ADD_BEAN, searchPopup));
> . . .
> popup = new PopUp();
>
> popup.content = searchPopup;
>
> addElement(popup);
>
> popup.open = true;
>
>
>
>
>
> Hope this helps.
>
>
>
> Brian
>
>
>
> *From:* Maria Jose Esteve 
> *Sent:* Friday, January 22, 2021 2:40 AM
> *To:* users@royale.apache.org
> *Subject:* [EXTERNAL] Popup and Databinding with Crux (RE: Popup and
> Databinding)
>
>
>
> Hi,
>
> I am experiencing an error similar to wkoch, the Databinding in a Popup
> does not work, in my case using crux.
>
> I have an mxml, TopesDetPerson, that shows the detail of a record. My mvc
> model is injected and binded and it works perfectly if we insert it into
> the main mxml (SectionContent) but stops working if I create it
> programmatically. This is an excerpt from the build and upload code:
>
>
>
> private var popupLimitsDetail:PopUp;
>
> public function viewLimitsDetail():void
>
> {
>
> var pp:TopesDetPerson;
>
> if(!popupLimitsDetail)
>
> {
>
> popupLimitsDetail = new PopUp();
>
> popupLimitsDetail.modal = true;
>
> pp = new TopesDetPerson();
>
> popupLimitsDetail.content = pp;
>
> addElement(popupLimitsDetail);
>
> }
>
>
>
> if(!popupLimitsDetail.open)
>
> popupLimitsDetail.open = true;
>
> }
>
>
>
> In TopesDetPerson.mxml:
>
>
>
> [Bindable]
>
> [Inject(source="personalModel", required="true")]
>
> public var personalModel:PersonalModel;
>
> ...
>
> 
>
> 
>
> 
>
>
>
> The model is not injected, the [PostConstruct] is not received, does it
> not exist for crux if it is not on the canvas? Is there a way to "refresh
> crux" so that it recognizes the links that are added after its initial
> configuration?
>
> I hope I have explained clearly 
>
>
>
> Thx.
>
> Hiedra
>
>
>
> -Mensaje original-
>
> De: wkoch 
>
> Enviado el: lunes, 18 de enero de 2021 18:21
>
> Para: users@royale.apache.org
>
> Asunto: Re: Popup and Databinding
>
>
>
> Sorry -- I wasn't clear -- both the ItemRendererDataBinding and
> ContainerDataBinding beads worked.  I went with ContainerDataBinding as
> Harbs is right.  It's a better fit.
>
>
>
>
>
>
>
> --
>
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>


-- 
Carlos Rovira
Apache Member & Apache Royale PMC
*Apache Software Foundation*
http://about.me/carlosrovira


RE: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)

2021-01-22 Thread Maria Jose Esteve
It works perfect for me.
I have another mxml that I dynamically load in with the same problem, I'm going 
to try it there too but it sure works.

Thanks for the help Brian.
Hiedra

De: Brian Raymes 
Enviado el: viernes, 22 de enero de 2021 18:02
Para: users@royale.apache.org
Asunto: RE: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and 
Databinding)

Here is how I’m making that work. Dispatch an ADD_BEAN before adding the 
content to the PopUp. This wires it up for crux.

I’m also dispatching REMOVE_BEAN when the popup is closed to ensure it is 
removed when not needed.

var searchPopup:SearchPopup = new SearchPopup();
. . .
dispatchEvent(new BeanEvent(BeanEvent.ADD_BEAN, searchPopup));
. . .
popup = new PopUp();
popup.content = searchPopup;
addElement(popup);
popup.open = true;


Hope this helps.

Brian

From: Maria Jose Esteve mailto:mjest...@iest.com>>
Sent: Friday, January 22, 2021 2:40 AM
To: users@royale.apache.org
Subject: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)


Hi,

I am experiencing an error similar to wkoch, the Databinding in a Popup does 
not work, in my case using crux.

I have an mxml, TopesDetPerson, that shows the detail of a record. My mvc model 
is injected and binded and it works perfectly if we insert it into the main 
mxml (SectionContent) but stops working if I create it programmatically. This 
is an excerpt from the build and upload code:



private var popupLimitsDetail:PopUp;

public function viewLimitsDetail():void

{

var pp:TopesDetPerson;

if(!popupLimitsDetail)

{

popupLimitsDetail = new PopUp();

popupLimitsDetail.modal = true;

pp = new TopesDetPerson();

popupLimitsDetail.content = pp;

addElement(popupLimitsDetail);

}



if(!popupLimitsDetail.open)

popupLimitsDetail.open = true;

}



In TopesDetPerson.mxml:



[Bindable]

[Inject(source="personalModel", required="true")]

public var personalModel:PersonalModel;

...









The model is not injected, the [PostConstruct] is not received, does it not 
exist for crux if it is not on the canvas? Is there a way to "refresh crux" so 
that it recognizes the links that are added after its initial configuration?

I hope I have explained clearly 



Thx.

Hiedra



-Mensaje original-

De: wkoch mailto:warren.r.k...@boeing.com>>

Enviado el: lunes, 18 de enero de 2021 18:21

Para: users@royale.apache.org

Asunto: Re: Popup and Databinding



Sorry -- I wasn't clear -- both the ItemRendererDataBinding and 
ContainerDataBinding beads worked.  I went with ContainerDataBinding as Harbs 
is right.  It's a better fit.







--

Sent from: http://apache-royale-users.20374.n8.nabble.com/


RE: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)

2021-01-22 Thread Brian Raymes
Here is how I’m making that work. Dispatch an ADD_BEAN before adding the 
content to the PopUp. This wires it up for crux.

I’m also dispatching REMOVE_BEAN when the popup is closed to ensure it is 
removed when not needed.


var searchPopup:SearchPopup = new SearchPopup();
. . .
dispatchEvent(new BeanEvent(BeanEvent.ADD_BEAN, searchPopup));
. . .
popup = new PopUp();
popup.content = searchPopup;
addElement(popup);
popup.open = true;


Hope this helps.

Brian

From: Maria Jose Esteve 
Sent: Friday, January 22, 2021 2:40 AM
To: users@royale.apache.org
Subject: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)


Hi,

I am experiencing an error similar to wkoch, the Databinding in a Popup does 
not work, in my case using crux.

I have an mxml, TopesDetPerson, that shows the detail of a record. My mvc model 
is injected and binded and it works perfectly if we insert it into the main 
mxml (SectionContent) but stops working if I create it programmatically. This 
is an excerpt from the build and upload code:



private var popupLimitsDetail:PopUp;

public function viewLimitsDetail():void

{

var pp:TopesDetPerson;

if(!popupLimitsDetail)

{

popupLimitsDetail = new PopUp();

popupLimitsDetail.modal = true;

pp = new TopesDetPerson();

popupLimitsDetail.content = pp;

addElement(popupLimitsDetail);

}



if(!popupLimitsDetail.open)

popupLimitsDetail.open = true;

}



In TopesDetPerson.mxml:



[Bindable]

[Inject(source="personalModel", required="true")]

public var personalModel:PersonalModel;

...









The model is not injected, the [PostConstruct] is not received, does it not 
exist for crux if it is not on the canvas? Is there a way to "refresh crux" so 
that it recognizes the links that are added after its initial configuration?

I hope I have explained clearly 



Thx.

Hiedra



-Mensaje original-

De: wkoch mailto:warren.r.k...@boeing.com>>

Enviado el: lunes, 18 de enero de 2021 18:21

Para: users@royale.apache.org

Asunto: Re: Popup and Databinding



Sorry -- I wasn't clear -- both the ItemRendererDataBinding and 
ContainerDataBinding beads worked.  I went with ContainerDataBinding as Harbs 
is right.  It's a better fit.







--

Sent from: http://apache-royale-users.20374.n8.nabble.com/


Popup and Databinding with Crux (RE: Popup and Databinding)

2021-01-22 Thread Maria Jose Esteve
Hi,

I am experiencing an error similar to wkoch, the Databinding in a Popup does 
not work, in my case using crux.

I have an mxml, TopesDetPerson, that shows the detail of a record. My mvc model 
is injected and binded and it works perfectly if we insert it into the main 
mxml (SectionContent) but stops working if I create it programmatically. This 
is an excerpt from the build and upload code:



private var popupLimitsDetail:PopUp;

public function viewLimitsDetail():void

{

var pp:TopesDetPerson;

if(!popupLimitsDetail)

{

popupLimitsDetail = new PopUp();

popupLimitsDetail.modal = true;

pp = new TopesDetPerson();

popupLimitsDetail.content = pp;

addElement(popupLimitsDetail);

}



if(!popupLimitsDetail.open)

popupLimitsDetail.open = true;

}



In TopesDetPerson.mxml:



[Bindable]

[Inject(source="personalModel", required="true")]

public var personalModel:PersonalModel;

...









The model is not injected, the [PostConstruct] is not received, does it not 
exist for crux if it is not on the canvas? Is there a way to "refresh crux" so 
that it recognizes the links that are added after its initial configuration?

I hope I have explained clearly 



Thx.

Hiedra



-Mensaje original-

De: wkoch 

Enviado el: lunes, 18 de enero de 2021 18:21

Para: users@royale.apache.org

Asunto: Re: Popup and Databinding



Sorry -- I wasn't clear -- both the ItemRendererDataBinding and 
ContainerDataBinding beads worked.  I went with ContainerDataBinding as Harbs 
is right.  It's a better fit.







--

Sent from: http://apache-royale-users.20374.n8.nabble.com/


Re: Screen Layout

2021-01-22 Thread Carlos Rovira
H Bilbo,

try this:











the slide will change btn height and the style will "bind" to the height
doing the operation.
We are using the style to override the jewel theme default setup to change
that particular button instance

remember that you need to add data binding (in Royale we "compose" almost
all instead of having it by default like in flex, the PAYG principe is key).





Anyway, while you can do things like this in Royale as you use to do in
Flex, I don't recommend it.
Since we are adding code and listeners for something that CSS is capable to
do itself: You can create a CSS class style that uses the css calc()
function and apply via "className" property.

HTH

Carlos

El jue, 21 ene 2021 a las 21:21, Bilbosax ()
escribió:

> Thanks for the insight Carlos. I have been studying your Tour De Jewel
> app, a
> beautiful piece of demonstration.
>
> So I have a deeper question about CSS.  Let's say I have a Jewel button
> that
> I need to style on the fly and cannot hardwire it into CSS code.  Let's say
> I have a button that I am going to create at runtime that I won't know it's
> dimensions until I know the size of the container it is in, but I want it
> to
> be a "pill" button so I need to style the "border-radius" in CSS to half
> the
> height of the button once the button is created.  I don't see a way to do
> this with Jewel.  I don't see a bead like SimpleCSSStyles for Jewel that
> will allow me to style in Actionscript during execution.
>
> Is there a way to make a rounded corner button in Jewel using Actionscript
> at runtime to change CSS of a component??
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>


-- 
Carlos Rovira
Apache Member & Apache Royale PMC
*Apache Software Foundation*
http://about.me/carlosrovira