Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

2018-10-25 Thread Alex Harui
Hi Ulrich,

I think I understand your workflow.  Since you are generating your own html 
file, you can make it pass the flashvars to the Application.  I just pushed a 
change to make the Application’s parameters writable and allow you to pass 
parameters in through the SystemManager.

Currently, the body of the html of a Royale app using the emulation components 
looks something like:



new MyApp_mx_managers_SystemManager().start();



If your JSP generates a variable called flashvars, then you can pass it into 
the “start” method.



new 
MyApp_mx_managers_SystemManager().start(flashvars);



There might be a few other bugs to work out once you get to the point of 
actually trying this code.

HTH,
-Alex

From: "ulrich.muel...@carnet-gmbh.de" 
Reply-To: "users@royale.apache.org" 
Date: Thursday, October 25, 2018 at 10:26 PM
To: "users@royale.apache.org" 
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? 
Alternatives?

Hello,

the current workflow for some applications for our customers:


https://some-tomcat.local/blazeds/App/App.jsp


· The .jsp file is practically the .html template (from Flash Builder)

· We employ flashvars to configure the applications without using URL 
parameters that can be seen by users

· The Tomcat is used to call Waffle to find out the current Windows 
Domain User (https://github.com/Waffle/waffle)

· The user information is passed to the SWF


// For version detection, set to min. required Flash Player 
version, or 0 (or 0.0.0), for no version detection.
var swfVersionStr = "11.1.0";
// To use express install, set to playerProductInstall.swf, 
otherwise the empty string.
var xiSwfUrlStr = "playerProductInstall.swf";
var flashvars = {};

flashvars.user = '<%=request.getAttribute("ntuser")%>';  // created 
by Waffle filter and some processing

var params = {};
params.quality = "high";
params.bgcolor = "#ff";
params.allowscriptaccess = "sameDomain";
params.allowfullscreen = "true";
var attributes = {};
attributes.id = "MyApp";
attributes.name = "MyApp";
attributes.align = "middle";
swfobject.embedSWF(
"MyApp.swf", "flashContent",
"100%", "100%",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes);
// JavaScript enabled so display the flashContent div in case it is 
not replaced with a swf object.
swfobject.createCSS("#flashContent", 
"display:block;text-align:left;");



App.mxml

var user:String = FlexGlobals.topLevelApplication.parameters.user as String;
// Show user specific data …




Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.

CARNET GmbH
Chemnitz, Germany
www.carnet-gmbh.de



Von: Alex Harui 
Gesendet: Donnerstag, 25. Oktober 2018 19:47
An: users@royale.apache.org
Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? 
Alternatives?

Those beads or their equivalent are baked in to the emulation components.

FlexGlobals.topLevelApplication.parameters exists in the emulation components.  
It may not be wired up correctly yet, but if not, it will be.  However, it will 
be wired by default to the URL parameters for the hosting webpage.  I don’t 
think we’ve dealt with flashvars yet.  If your hosting web page has set up your 
flashvars to be different from the URL parameters then you may tweak some code 
in the hosting web page.  If this is the case, can you share more about how you 
determine your flashvars?  I couldn’t quite get it from the snippets you 
provided.  It wasn’t clear if the JSP was putting the flashvars into a global 
or local variable and when it got passed to the SWFObject.  There won’t be a 
SWFObject in Royale.  Maybe we’ll make it so the parameters first look for a 
global flashvars variable or something like that.

Let us know,
-Alex

From: Carlos Rovira mailto:carlosrov...@apache.org>>
Reply-To: "users@royale.apache.org" 
mailto:users@royale.apache.org>>
Date: Thursday, October 25, 2018 at 9:46 AM
To: "users@royale.apache.org" 
mailto:users@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? 
Alternatives?

Hi Ulrich,

please check ApplicationParametersBead and
ApplicationParametersCaseInsensitiveBead

and
https://github.com/apache/royale-asjs/issues/129

Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

2018-10-25 Thread ulrich . mueller
Hello,

 

the current workflow for some applications for our customers:

 

 

https://some-tomcat.local/blazeds/App/App.jsp 

 

*   The .jsp file is practically the .html template (from Flash Builder)
*   We employ flashvars to configure the applications without using URL 
parameters that can be seen by users
*   The Tomcat is used to call Waffle to find out the current Windows 
Domain User (https://github.com/Waffle/waffle)
*   The user information is passed to the SWF

 



// For version detection, set to min. required Flash Player 
version, or 0 (or 0.0.0), for no version detection. 

var swfVersionStr = "11.1.0";

// To use express install, set to playerProductInstall.swf, 
otherwise the empty string. 

var xiSwfUrlStr = "playerProductInstall.swf";

var flashvars = {};

 

flashvars.user = '<%=request.getAttribute("ntuser")%>';  // created 
by Waffle filter and some processing

 

var params = {};

params.quality = "high";

params.bgcolor = "#ff";

params.allowscriptaccess = "sameDomain";

params.allowfullscreen = "true";

var attributes = {};

attributes.id = "MyApp";

attributes.name = "MyApp";

attributes.align = "middle";

swfobject.embedSWF(

"MyApp.swf", "flashContent", 

"100%", "100%", 

swfVersionStr, xiSwfUrlStr, 

flashvars, params, attributes);

// JavaScript enabled so display the flashContent div in case it is 
not replaced with a swf object.

swfobject.createCSS("#flashContent", 
"display:block;text-align:left;");



 

 

App.mxml

 

var user:String = FlexGlobals.topLevelApplication.parameters.user as String;

// Show user specific data …

 

 

 

 

Mit freundlichen Grüßen / Best regards

 

Ulrich Müller

Dipl. Inf.

 

CARNET GmbH

Chemnitz, Germany

  www.carnet-gmbh.de

 

 

 

Von: Alex Harui  
Gesendet: Donnerstag, 25. Oktober 2018 19:47
An: users@royale.apache.org
Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? 
Alternatives?

 

Those beads or their equivalent are baked in to the emulation components.

 

FlexGlobals.topLevelApplication.parameters exists in the emulation components.  
It may not be wired up correctly yet, but if not, it will be.  However, it will 
be wired by default to the URL parameters for the hosting webpage.  I don’t 
think we’ve dealt with flashvars yet.  If your hosting web page has set up your 
flashvars to be different from the URL parameters then you may tweak some code 
in the hosting web page.  If this is the case, can you share more about how you 
determine your flashvars?  I couldn’t quite get it from the snippets you 
provided.  It wasn’t clear if the JSP was putting the flashvars into a global 
or local variable and when it got passed to the SWFObject.  There won’t be a 
SWFObject in Royale.  Maybe we’ll make it so the parameters first look for a 
global flashvars variable or something like that.

 

Let us know,

-Alex

 

From: Carlos Rovira <  carlosrov...@apache.org>
Reply-To: "  users@royale.apache.org" < 
 users@royale.apache.org>
Date: Thursday, October 25, 2018 at 9:46 AM
To: "  users@royale.apache.org" < 
 users@royale.apache.org>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? 
Alternatives?

 

Hi Ulrich, 

 

please check ApplicationParametersBead and

ApplicationParametersCaseInsensitiveBead

 

and

 

 https://github.com/apache/royale-asjs/issues/129

 

I still didn't use it so others could hopefully give more detail

 

Best

 

Carlos

 

 

 

 

El jue., 25 oct. 2018 a las 17:36, <  
ulrich.muel...@carnet-gmbh.de> escribió:

Hello,

 

first of all: Many thanks to all contributers of Apache Royale. It looks very 
promising.  Thanks.

 

We have a large set of customer specific Flex applications targeted to Flash 
output. We are currently evaluating if we can use Royale/JS to replace them 
without must redevelopment.

 

Is there an infrastructure to use FlexGlobals.topLevelApplication.parameters 
and the flashvar within the template? We have some variables filled there (by 
an Tomcat Server via an JSP page).

 

 

App.jsp

 

var flashvars = {};

flashvars.myvar= '<%=request.getAttribute("someindex")%>';

 

 

App.mxml

 

var myvar:String = FlexGlobal

Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

2018-10-25 Thread Alex Harui
Those beads or their equivalent are baked in to the emulation components.

FlexGlobals.topLevelApplication.parameters exists in the emulation components.  
It may not be wired up correctly yet, but if not, it will be.  However, it will 
be wired by default to the URL parameters for the hosting webpage.  I don’t 
think we’ve dealt with flashvars yet.  If your hosting web page has set up your 
flashvars to be different from the URL parameters then you may tweak some code 
in the hosting web page.  If this is the case, can you share more about how you 
determine your flashvars?  I couldn’t quite get it from the snippets you 
provided.  It wasn’t clear if the JSP was putting the flashvars into a global 
or local variable and when it got passed to the SWFObject.  There won’t be a 
SWFObject in Royale.  Maybe we’ll make it so the parameters first look for a 
global flashvars variable or something like that.

Let us know,
-Alex

From: Carlos Rovira 
Reply-To: "users@royale.apache.org" 
Date: Thursday, October 25, 2018 at 9:46 AM
To: "users@royale.apache.org" 
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? 
Alternatives?

Hi Ulrich,

please check ApplicationParametersBead and
ApplicationParametersCaseInsensitiveBead


and
https://github.com/apache/royale-asjs/issues/129

I still didn't use it so others could hopefully give more detail

Best

Carlos




El jue., 25 oct. 2018 a las 17:36, 
mailto:ulrich.muel...@carnet-gmbh.de>> escribió:
Hello,

first of all: Many thanks to all contributers of Apache Royale. It looks very 
promising.  Thanks.

We have a large set of customer specific Flex applications targeted to Flash 
output. We are currently evaluating if we can use Royale/JS to replace them 
without must redevelopment.

Is there an infrastructure to use FlexGlobals.topLevelApplication.parameters 
and the flashvar within the template? We have some variables filled there (by 
an Tomcat Server via an JSP page).


App.jsp

var flashvars = {};
flashvars.myvar= '<%=request.getAttribute("someindex")%>';


App.mxml

var myvar:String = FlexGlobals.topLevelApplication.parameters.myvar as String;



Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.


CARNET GmbH
Chemnitz, Germany





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



Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

2018-10-25 Thread Carlos Rovira
Hi Ulrich,

please check ApplicationParametersBead and
ApplicationParametersCaseInsensitiveBead

and https://github.com/apache/royale-asjs/issues/129

I still didn't use it so others could hopefully give more detail

Best

Carlos




El jue., 25 oct. 2018 a las 17:36,  escribió:

> Hello,
>
>
>
> first of all: Many thanks to all contributers of Apache Royale. It looks
> very promising.  Thanks.
>
>
>
> We have a large set of customer specific Flex applications targeted to
> Flash output. We are currently evaluating if we can use Royale/JS to
> replace them without must redevelopment.
>
>
>
> Is there an infrastructure to use
> FlexGlobals.topLevelApplication.parameters and the flashvar within the
> template? We have some variables filled there (by an Tomcat Server via an
> JSP page).
>
>
>
>
>
> App.jsp
>
>
>
> var flashvars = {};
>
> flashvars.myvar= '<%=request.getAttribute("someindex")%>';
>
>
>
>
>
> App.mxml
>
>
>
> var myvar:String = FlexGlobals.topLevelApplication.parameters.myvar as
> String;
>
>
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
>
>
>
>
>
>


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


How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

2018-10-25 Thread ulrich . mueller
Hello,

 

first of all: Many thanks to all contributers of Apache Royale. It looks
very promising.  Thanks.

 

We have a large set of customer specific Flex applications targeted to Flash
output. We are currently evaluating if we can use Royale/JS to replace them
without must redevelopment.

 

Is there an infrastructure to use FlexGlobals.topLevelApplication.parameters
and the flashvar within the template? We have some variables filled there
(by an Tomcat Server via an JSP page).

 

 

App.jsp

 

var flashvars = {};

flashvars.myvar= '<%=request.getAttribute("someindex")%>';

 

 

App.mxml

 

var myvar:String = FlexGlobals.topLevelApplication.parameters.myvar as
String;

 

 

 

Mit freundlichen Grüßen / Best regards

 

Ulrich Müller

Dipl. Inf.

 

 

CARNET GmbH

Chemnitz, Germany

 

 

 



Re: Apache Royale Debugging news

2018-10-25 Thread Carlos Rovira
Hi Piotr,

Josh worked on fixing the issues. Until now we was able to debug AS3, but
MXML had some issues. Josh worked to fix those :)
As you said, to get this fix people must use nightly build or build
directly from develop.

Thanks

El jue., 25 oct. 2018 a las 12:42, Piotr Zarzycki (<
piotrzarzyck...@gmail.com>) escribió:

> Hi Carlos,
>
> It won't work with Royale until we release it yes ? What you did in order
> to make it work ?
>
> Piotr
>
> czw., 25 paź 2018 o 12:38 Carlos Rovira 
> napisał(a):
>
>> Hi,
>>
>> just let you know that debugging with source maps are working thanks to
>> Josh Tynjala compiler fixes done yesterday.
>>
>> Here's a link of the tweet about it with animated gif showing how
>> debugging is working both in #MXML and #AS3
>>
>> https://twitter.com/ApacheRoyale/status/1055406278518980609
>>
>> Enjoy!
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>>
>
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> *
>


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


Re: Apache Royale Debugging news

2018-10-25 Thread Piotr Zarzycki
Hi Carlos,

It won't work with Royale until we release it yes ? What you did in order
to make it work ?

Piotr

czw., 25 paź 2018 o 12:38 Carlos Rovira 
napisał(a):

> Hi,
>
> just let you know that debugging with source maps are working thanks to
> Josh Tynjala compiler fixes done yesterday.
>
> Here's a link of the tweet about it with animated gif showing how
> debugging is working both in #MXML and #AS3
>
> https://twitter.com/ApacheRoyale/status/1055406278518980609
>
> Enjoy!
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

-- 

Piotr Zarzycki

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


Apache Royale Debugging news

2018-10-25 Thread Carlos Rovira
Hi,

just let you know that debugging with source maps are working thanks to
Josh Tynjala compiler fixes done yesterday.

Here's a link of the tweet about it with animated gif showing how debugging
is working both in #MXML and #AS3

https://twitter.com/ApacheRoyale/status/1055406278518980609

Enjoy!

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