Royale framework and Adobe Air

2022-04-06 Thread Spiros Aggelopoulos
Hi, 

 

I was already used  Royale with  Jewel  for a few projects and I am very
happy from the results.

 

As a question does anybody uses the framework to output an Adobe Air
application ( desktop or mobile) ? And if the answer is yes is it possible
to share some thoughts.  

 

 

Spiros

 

 

 

 



RE: Youtube Video embeding

2020-07-29 Thread spiros
Hi Carlos,

Yes with an extension to UIBase it was easy to create an Iframe element and 
pass the YouTube url.

When I finally have a stable component I will post it to this thread.


Thanks


Spiros 



-Original Message-
From: Carlos Rovira [mailto:carlosrov...@apache.org] 
Sent: Tuesday, July 28, 2020 4:19 PM
To: Apache Royale Development
Subject: Re: Youtube Video embeding

Hi Spiros,

Yes, Youtube should be easy to integrate in a Royale App. I think we don't
have a component right now for that but since Youtube used to be
embedded via iframe in a web page that should not be a problem. I think
there's already some components that allow you to use an iframe in royale
that you could try, or just try some basic example and try to use in Royale
meanwhile we add some official components.

To All, someone has the time to create some basic video component anc
contribute?

Thanks





El mar., 28 jul. 2020 a las 10:52, spiros () escribió:

> Hi,
>
> Is it possible to embed a youtube  video to royale application ?
>
>
>
>
>
>
>
> Best regards
>
>
>
>
>
> Spiros
>
>
>
>

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



Youtube Video embeding

2020-07-28 Thread spiros
Hi, 

Is it possible to embed a youtube  video to royale application ?   

 

 

 

Best regards

 

 

Spiros 

 



RE: Application Extend generate compile error in version 0.9.7

2020-05-28 Thread spiros
Hi Carlos 

Yes it works now.

Thanks 


-Original Message-
From: Carlos Rovira [mailto:carlosrov...@apache.org] 
Sent: Thursday, May 28, 2020 5:11 PM
To: Apache Royale Development
Subject: Re: Application Extend generate compile error in version 0.9.7

Hi Spiros,

there was a bug in 0.9.6 where childnodes could not have the same prefix
than the parent node.
You must ensure in fix your code, since as you can see you have "app" root
node and then "js" as prefix in child nodes

HTH

Carlos


El jue., 28 may. 2020 a las 15:48, Spiros Aggelopoulos (<
aggelopou...@novusnet.eu>) escribió:

> Hi ,
>
>
>
> I  paste a sampe code to demostrate an error message at compile with
> version
> 0.9.7 the code pass the compilation in version 9.0.6.
>
> The MXML code extend a custom class  instead of Standard Application Class
>
>
>
> The error message is:
>
>
> C:\Royale_SDK\royale_source\royale-asjs\examples\royale\testRoyale\src\testR
> oyale.mxml(7): col: 2 Error: This tag is unexpected. It will be ignored.
>
>
>
>
>
>^
>
>
>
>
> C:\Royale_SDK\royale_source\royale-asjs\examples\royale\testRoyale\src\testR
> oyale.mxml(10): col: 5 Error: This tag is unexpected. It will be ignored.
>
>
>
> 
>
> ^
>
>
>
>
>
> Thanks
>
>
>
>
>
> Spiros
>
>
>
>
>
> testRoyale.mxml
>
>
>
>
>
> 
>
>
>
> http://ns.adobe.com/mxml/2009";
>
>xmlns:js="library://ns.apache.org/royale/basic"
>
>   xmlns:app="org.royale.test.*"
>
>   >
>
>
>
> 
>
> 
>
> 
>
> 
>
>   
>
> 
>
> 
>
> 
>
>
>
>
>
> package org.royale.test
>
> {
>
>import org.apache.royale.core.Application;
>
>
>
>public class CustomApplication extends Application
>
>{
>
>   public function CustomApplication()
>
>   {
>
>  super();
>
>   }
>
>
>
>   private var counter:int=0;
>
>
>
>   public function CustomFunction():void
>
>   {
>
>  counter++;
>
>   }
>
>
>
>}
>
> }
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

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



Application Extend generate compile error in version 0.9.7

2020-05-28 Thread Spiros Aggelopoulos
Hi ,

 

I  paste a sampe code to demostrate an error message at compile with version
0.9.7 the code pass the compilation in version 9.0.6.

The MXML code extend a custom class  instead of Standard Application Class 

 

The error message is: 

C:\Royale_SDK\royale_source\royale-asjs\examples\royale\testRoyale\src\testR
oyale.mxml(7): col: 2 Error: This tag is unexpected. It will be ignored.

 

   

   ^

 

C:\Royale_SDK\royale_source\royale-asjs\examples\royale\testRoyale\src\testR
oyale.mxml(10): col: 5 Error: This tag is unexpected. It will be ignored.

 



^

 

 

Thanks 

 

 

Spiros 

 

 

testRoyale.mxml

 

 



 

http://ns.adobe.com/mxml/2009";

   xmlns:js="library://ns.apache.org/royale/basic" 

  xmlns:app="org.royale.test.*"

  >

   









  







 

 

package org.royale.test

{

   import org.apache.royale.core.Application;

   

   public class CustomApplication extends Application

   {

  public function CustomApplication()

  {

 super();

  }

  

  private var counter:int=0;

  

  public function CustomFunction():void

  {

 counter++;

  }

  

   }

}

 

 

 

 

 

 

 



RE: Trying to run a function on a class that is not instantiated

2019-06-26 Thread spiros
It is possible with static getter and seter.

Maybe will help you the code below 

Spiros.

public class Variable
{

private static var _textData:String;

public static function get textData():String
{
if( _textData ==null)
{
initailizeVariable();
}
return _textData;
}

public static function set textData(value:String):void
{
_textData = value;
}

public static function initailizeVariable():void
{
_textData = "The quick brown fox jump over the lazy 
dog.";
}


public function Variable()
{
}
}
   




-Original Message-
From: Carlos Rovira [mailto:carlosrov...@apache.org] 
Sent: Wednesday, June 26, 2019 5:49 PM
To: dev@royale.apache.org
Subject: Trying to run a function on a class that is not instantiated

Hi,

I need to run a function when I access a public static var in a class.
Trying to run the function in the constructor seems not to work since
there's no instance of that class. Do we have some way to do this?

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



RE: Js-release code not working for an object generated by RemoteObject

2019-06-26 Thread spiros
Thanks , 
I think this is the case .
Is it possible to change the closure compiler  ADVANCED_OPTIMIZATIONS to
SIMPLE_OPTIMIZATIONS? If yes how can I Do ?

Thanks again





Spiros




-Original Message-
From: Yishay Weiss [mailto:yishayj...@hotmail.com] 
Sent: Wednesday, June 26, 2019 4:26 PM
To: dev@royale.apache.org
Subject: RE: Js-release code not working for an object generated by
RemoteObject 

Maybe this [1] will help.



[1]
http://apache-royale-development.20373.n8.nabble.com/JSON-Objects-renaming-w
as-Re-ASDoc-Routing-Releases-td2304i20.html






From: spiros 
Sent: Wednesday, June 26, 2019 2:19:56 PM
To: dev@royale.apache.org
Subject: Js-release code not working for an object generated by RemoteObject

Hi ,



I create this piece of code to demonstrate the problem  I discovered
recently

This is an event listener from a RemoteObject call that return an
ArrayCollection with 2 entries of type Object .





private function getComplexStructResultHandler(event:ResultEvent):void

{

   var result:ArrayCollection= event.result.data;

   display.text="BEGIN_DEBUG-->";

   for (var i:int=0 ;iEND_DEBUG";

}



The display  is a label on screen and I got this output  when I use the
js_debug version of code  :



BEGIN_DEBUG-->BEGIN_ENTRY:1011:Windows Apache and Webapi net (JSON)
:20:11.:END_ENRTYBEGIN_ENTRY:1012:Windows Apache and Webapi net
(JSON) :20 :1200.2200:END_ENRTY-->END_DEBUG



When I use the js_release output the output is :



BEGIN_DEBUG-->BEGIN_ENTRY:undefined:undefined:1011:undefined:END_ENRTYBE
GIN_ENTRY:undefined:undefined:1012:undefined:END_ENRTY-->END_DEBUG



As a result



data.ID is undefined

data.Description is undefined

data.Item_Category_Code has the data.ID field Data

data.Unit_Cost is undefined







the JavaScript code generated by compiler in debug is :

/**

* @private

* @param {mx.rpc.events.ResultEvent} event

*/

CFcommunication.prototype.CFcommunication_getComplexStructResultHandler =
function(event) {

  var /** @type {mx.collections.ArrayCollection} */ result =
event.result.data;

  this.display.text = "BEGIN_DEBUG-->";

  for (var /** @type {number} */ i = 0; i < result.length; i++) {

var /** @type {Object} */ data = result.getProperty(i);

org.apache.royale.utils.Language.trace(data);

this.display.text = this.display.text + "BEGIN_ENTRY:" + data.ID + ":" +
data.Description + ":" + data.Item_Category_Code + ":" + data.Unit_Cost +
":END_ENRTY";

  }

  this.display.text = this.display.text + "-->END_DEBUG";

};



In release the code is :



prototype.gr=function(a)

{

   a=a.result.data;

   this.display.text='BEGIN_DEBUG--\x3e';

   for(var b=0;b

Js-release code not working for an object generated by RemoteObject

2019-06-26 Thread spiros
Hi , 

 

I create this piece of code to demonstrate the problem  I discovered
recently

This is an event listener from a RemoteObject call that return an
ArrayCollection with 2 entries of type Object .

 

 

private function getComplexStructResultHandler(event:ResultEvent):void

{

   var result:ArrayCollection= event.result.data;

   display.text="BEGIN_DEBUG-->";

   for (var i:int=0 ;iEND_DEBUG";

}

 

The display  is a label on screen and I got this output  when I use the
js_debug version of code  :

 

BEGIN_DEBUG-->BEGIN_ENTRY:1011:Windows Apache and Webapi net (JSON)
:20:11.:END_ENRTYBEGIN_ENTRY:1012:Windows Apache and Webapi net
(JSON) :20 :1200.2200:END_ENRTY-->END_DEBUG

 

When I use the js_release output the output is :

 

BEGIN_DEBUG-->BEGIN_ENTRY:undefined:undefined:1011:undefined:END_ENRTYBE
GIN_ENTRY:undefined:undefined:1012:undefined:END_ENRTY-->END_DEBUG

 

As a result 

 

data.ID is undefined 

data.Description is undefined 

data.Item_Category_Code has the data.ID field Data

data.Unit_Cost is undefined

 

 

 

the JavaScript code generated by compiler in debug is :

/**

* @private

* @param {mx.rpc.events.ResultEvent} event

*/

CFcommunication.prototype.CFcommunication_getComplexStructResultHandler =
function(event) {

  var /** @type {mx.collections.ArrayCollection} */ result =
event.result.data;

  this.display.text = "BEGIN_DEBUG-->";

  for (var /** @type {number} */ i = 0; i < result.length; i++) {

var /** @type {Object} */ data = result.getProperty(i);

org.apache.royale.utils.Language.trace(data);

this.display.text = this.display.text + "BEGIN_ENTRY:" + data.ID + ":" +
data.Description + ":" + data.Item_Category_Code + ":" + data.Unit_Cost +
":END_ENRTY";

  }

  this.display.text = this.display.text + "-->END_DEBUG";

};

 

In release the code is : 

 

prototype.gr=function(a)

{

   a=a.result.data;

   this.display.text='BEGIN_DEBUG--\x3e';

   for(var b=0;b

bitmap and graphics classes.

2019-06-20 Thread spiros
Hi , 

 

I searching  for a way to capture a component to bitmap data . The flex use
the ImageSnapShot.captureBitmapData().

Is there a way to do this in royale ?

And Is there an alternative to flex Graphics class ? 

 

 

 

 

 

 

 

Best regards

 

 

Spiros 

 



RE: For each iteration in ArrayList and ArrayCollection

2019-04-12 Thread spiros
Hi Alex, 


#417

Spiros 




-Original Message-
From: Alex Harui [mailto:aha...@adobe.com.INVALID] 
Sent: Thursday, April 11, 2019 10:14 PM
To: dev@royale.apache.org
Subject: Re: For each iteration in ArrayList and ArrayCollection

Yes, it looks like ArrayCollection didn't implement propertyNames().  And 
Proxy.as may need to change as well.  Can you open an issue on Github so we 
don't forget?

Thanks,
-Alex

On 4/11/19, 2:17 AM, "spiros"  wrote:

Hi Alex ,
 
You have right the mx.collection.Arraylist and 
org.apache.flex.collections.ArrayList in flex didn’t iterate in flex. 
I already included the js code for the three cases ( it is on bottom of 
email). 
I don’t know if it helps but in one of my tests for the ArrayCollection I 
extend the class and add a method with name propertyNames (*1). 
in this case the iteration work fine.

(*1)
public function propertyNames():Array
{
var array:Array = new Array;
for (var i:int= 0 ; i< length;i++)
{
array.push(this[i]);
}
return array
}
 
  

Best regards


Spiros 





-Original Message-
From: Alex Harui [mailto:aha...@adobe.com.INVALID] 
Sent: Thursday, April 11, 2019 10:46 AM
To: dev@royale.apache.org
Subject: Re: For each iteration in ArrayList and ArrayCollection

Hi Spiros,

Could you use for-each on an ArrayList in Flex?  I didn't think it would 
work.  I thought it only worked on ArrayCollection in Flex.

What is the output JavaScript for your sample code when you use 
ArrayCollection?  In Royale if you interate on XML, or a Proxy like 
ArrayCollection you have to make sure the compiler knows it is XML or a Proxy 
subclass.  If it thinks items is an Object it will not generate the right code.

HTH,
-Alex
    
On 4/10/19, 6:01 AM, "spiros"  wrote:

Hi, 

 

I am trying to  make an iteration using the for each. The property 
class is
a simple class with two fields.  

I test the iteration with this classes :

 

 

1.   org.apache.royale.collections.ArrayList error message: 
TypeError:
propertyClass is undefined

2.   mx.collections.ArrayList error message TypeError: 
propertyClass is
undefined

3.  mx.collections.ArrayCollection error  message TypeError:
foreachiter0_target.propertyNames is not a function

 

 

 

 

the as3 code is:

  

private function iteration():void

{

var object:Object = new Object;

   for each (var propertyClass:PropertyClass in items)

   {

  object[propertyClass.name] = propertyClass.index;

   }

}

 

Thanks in advanced 

 

 

Spiros 

 

 

 

 

 

ps: The js generated code for this 3 classes 

 

(1)

/**

* @private

*/


com.novusnet.jsTests.ArrayCollectionIteration.prototype.com_novusnet_jsTests
_ArrayCollectionIteration_iteration = function() {

  var /** @type {Object} */ object = new Object();

  var foreachiter0_target =
this.com_novusnet_jsTests_ArrayCollectionIteration_items;

  for (var foreachiter0 in foreachiter0_target) 

  {

  var propertyClass = foreachiter0_target[foreachiter0];

  {

object[propertyClass.name] = propertyClass.index;

  }}

  

};

(2)

 

/**

* @private

*/


com.novusnet.jsTests.ArrayCollectionIteration.prototype.com_novusnet_jsTests
_ArrayCollectionIteration_iteration = function() {

  var /** @type {Object} */ object = new Object();

  var foreachiter0_target =
this.com_novusnet_jsTests_ArrayCollectionIteration_items;

  for (var foreachiter0 in foreachiter0_target) 

  {

  var propertyClass = foreachiter0_target[foreachiter0];

  {

object[pro

RE: Create and build a library project

2019-04-11 Thread spiros
I am not sure , but  I have in my mind the standard flex lib concept.
Include the .swf file to project at compile time.


Spiros 

-Original Message-
From: Yishay Weiss [mailto:yishayj...@hotmail.com] 
Sent: Thursday, April 11, 2019 4:31 PM
To: dev@royale.apache.org
Subject: RE: Create and build a library project 



>witch then  I can include to  RoyaleJS Project ?

Do you want to include it in run-time or when compiling?



Create and build a library project

2019-04-11 Thread spiros
Hi again, 

 

Is it possible to create a library project in FB 4.7  and build a  .swf file
witch then  I can include to  RoyaleJS Project ?

 

I search around but I don't find any info.

 

 

 

 

 

Best regards

 

 

Spiros 

 



RemoteObject and Listeners on Opretion level - workaround

2019-04-11 Thread spiros
Hi, 

 

For RemoteObject  with more  than One Methods in server side (Operations )
it is possible to define event Listeners per Operation.

For example the  two lines (*1) defines two listeners (result and fault )
for the Operation getText() .

In the (*2)the  code  remove of the listeners.

In RoyaleJS the (*1) generate  the error code : "TypeError:
this.com_novusnet_jsTests_RemoteObjectOperation_remoteObject.getProperty(...
).callProperty is not a function " , the JS line the compiler produce is
(*3). 

For the (*2)  the JS code is (*4) and there is no error but stop the
execution of function , - probably because of try - catch block- .

A workaround for the problem is to use  the getOperation method :

 

remoteObject.getOperation("getText").removeEventListener(ResultEvent.RESULT,
getdataResultHandler);

  

 

I hope the above is useful.

 

 

Best

 

 

 

Spiros 

 

 

 

 

 

(*1)

remoteObject.getText.addEventListener(ResultEvent.RESULT,
getdataResultHandler);

remoteObject.getText.addEventListener(FaultEvent.FAULT,
getTextFaultHandler); 

 

 

(*2)

remoteObject.getText.removeEventListener(ResultEvent.RESULT,
getdataResultHandler);

remoteObject.getText.removeEventListener(FaultEvent.FAULT,
getTextFaultHandler);  

 

(*3)

this.com_novusnet_jsTests_RemoteObjectOperation_remoteObject.getProperty('ge
tText').callProperty('addEventListener', mx.rpc.events.ResultEvent.RESULT,
org.apache.royale.utils.Language.closure(this.com_novusnet_jsTests_RemoteObj
ectOperation_getdataResultHandler, this, 'getdataResultHandler'));

 
this.com_novusnet_jsTests_RemoteObjectOperation_remoteObject.getProperty('ge
tText').callProperty('addEventListener', mx.rpc.events.FaultEvent.FAULT,
org.apache.royale.utils.Language.closure(this.com_novusnet_jsTests_RemoteObj
ectOperation_getTextFaultHandler, this, 'getTextFaultHandler'));

 

(*4)

this.com_novusnet_jsTests_RemoteObjectOperation_remoteObject.getProperty('ge
tText').callProperty('removeEventListener',
mx.rpc.events.ResultEvent.RESULT,
org.apache.royale.utils.Language.closure(this.com_novusnet_jsTests_RemoteObj
ectOperation_getdataResultHandler, this, 'getdataResultHandler'));

 
this.com_novusnet_jsTests_RemoteObjectOperation_remoteObject.getProperty('ge
tText').callProperty('removeEventListener', mx.rpc.events.FaultEvent.FAULT,
org.apache.royale.utils.Language.closure(this.com_novusnet_jsTests_RemoteObj
ectOperation_getTextFaultHandler, this, 'getTextFaultHandler'));



RE: For each iteration in ArrayList and ArrayCollection

2019-04-11 Thread spiros
Hi Alex ,
 
You have right the mx.collection.Arraylist and 
org.apache.flex.collections.ArrayList in flex didn’t iterate in flex. 
I already included the js code for the three cases ( it is on bottom of email). 
I don’t know if it helps but in one of my tests for the ArrayCollection I 
extend the class and add a method with name propertyNames (*1). 
in this case the iteration work fine.

(*1)
public function propertyNames():Array
{
var array:Array = new Array;
for (var i:int= 0 ; i< length;i++)
{
array.push(this[i]);
}
return array
}
 
  

Best regards


Spiros 





-Original Message-
From: Alex Harui [mailto:aha...@adobe.com.INVALID] 
Sent: Thursday, April 11, 2019 10:46 AM
To: dev@royale.apache.org
Subject: Re: For each iteration in ArrayList and ArrayCollection

Hi Spiros,

Could you use for-each on an ArrayList in Flex?  I didn't think it would work.  
I thought it only worked on ArrayCollection in Flex.

What is the output JavaScript for your sample code when you use 
ArrayCollection?  In Royale if you interate on XML, or a Proxy like 
ArrayCollection you have to make sure the compiler knows it is XML or a Proxy 
subclass.  If it thinks items is an Object it will not generate the right code.

HTH,
-Alex

On 4/10/19, 6:01 AM, "spiros"  wrote:

Hi, 

 

I am trying to  make an iteration using the for each. The property class is
a simple class with two fields.  

I test the iteration with this classes :

 

 

1.   org.apache.royale.collections.ArrayList error message: TypeError:
propertyClass is undefined

2.   mx.collections.ArrayList error message TypeError: propertyClass is
undefined

3.  mx.collections.ArrayCollection error  message TypeError:
foreachiter0_target.propertyNames is not a function

 

 

 

 

the as3 code is:

  

private function iteration():void

{

var object:Object = new Object;

   for each (var propertyClass:PropertyClass in items)

   {

  object[propertyClass.name] = propertyClass.index;

   }

}

 

Thanks in advanced 

 
    
     

Spiros 

 

 

 

 

 

ps: The js generated code for this 3 classes 

 

(1)

/**

* @private

*/

com.novusnet.jsTests.ArrayCollectionIteration.prototype.com_novusnet_jsTests
_ArrayCollectionIteration_iteration = function() {

  var /** @type {Object} */ object = new Object();

  var foreachiter0_target =
this.com_novusnet_jsTests_ArrayCollectionIteration_items;

  for (var foreachiter0 in foreachiter0_target) 

  {

  var propertyClass = foreachiter0_target[foreachiter0];

  {

object[propertyClass.name] = propertyClass.index;

  }}

  

};

(2)

 

/**

* @private

*/

com.novusnet.jsTests.ArrayCollectionIteration.prototype.com_novusnet_jsTests
_ArrayCollectionIteration_iteration = function() {

  var /** @type {Object} */ object = new Object();

  var foreachiter0_target =
this.com_novusnet_jsTests_ArrayCollectionIteration_items;

  for (var foreachiter0 in foreachiter0_target) 

  {

  var propertyClass = foreachiter0_target[foreachiter0];

  {

object[propertyClass.name] = propertyClass.index;

  }}

  

};

 

(3)

 

 

/**

* @private

*/

com.novusnet.jsTests.ArrayCollectionIteration.prototype.com_novusnet_jsTests
_ArrayCollectionIteration_iteration = function() {

  var /** @type {Object} */ object = new Object();

  var foreachiter0_target =
this.com_novusnet_jsTests_ArrayCollectionIteration_items;

  for (var foreachiter0 in foreachiter0_target.propertyNames()) 

  {

  var propertyClass = foreachiter0_target.getProperty(foreachiter0);

  {

object[propertyClass.name] = propertyClass.index;

  }}

  

};

 

  






RE: For each iteration in ArrayList and ArrayCollection

2019-04-11 Thread spiros
Hi Carlos,

Next time I’ll check the bug base before post a message.

Thanks



Spiros  




-Original Message-
From: Carlos Rovira [mailto:carlosrov...@apache.org] 
Sent: Wednesday, April 10, 2019 5:35 PM
To: dev@royale.apache.org
Subject: Re: For each iteration in ArrayList and ArrayCollection

Hi Spiros,

there's currently a bug, and for each is not working for collections :

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

Greg said that he'll want to work on it soon

In the mean while you can use other structure like a while for example.





El mié., 10 abr. 2019 a las 15:01, spiros () escribió:

> Hi,
>
>
>
> I am trying to  make an iteration using the for each. The property class is
> a simple class with two fields.
>
> I test the iteration with this classes :
>
>
>
>
>
> 1.   org.apache.royale.collections.ArrayList error message: TypeError:
> propertyClass is undefined
>
> 2.   mx.collections.ArrayList error message TypeError: propertyClass is
> undefined
>
> 3.  mx.collections.ArrayCollection error  message TypeError:
> foreachiter0_target.propertyNames is not a function
>
>
>
>
>
>
>
>
>
> the as3 code is:
>
>
>
> private function iteration():void
>
> {
>
> var object:Object = new Object;
>
>for each (var propertyClass:PropertyClass in items)
>
>    {
>
>   object[propertyClass.name] = propertyClass.index;
>
>}
>
> }
>
>
>
> Thanks in advanced
>
>
>
>
>
> Spiros
>
>
>
>
>
>
>
>
>
>
>
> ps: The js generated code for this 3 classes
>
>
>
> (1)
>
> /**
>
> * @private
>
> */
>
>
> com.novusnet.jsTests.ArrayCollectionIteration.prototype.com_novusnet_jsTests
> _ArrayCollectionIteration_iteration = function() {
>
>   var /** @type {Object} */ object = new Object();
>
>   var foreachiter0_target =
> this.com_novusnet_jsTests_ArrayCollectionIteration_items;
>
>   for (var foreachiter0 in foreachiter0_target)
>
>   {
>
>   var propertyClass = foreachiter0_target[foreachiter0];
>
>   {
>
> object[propertyClass.name] = propertyClass.index;
>
>   }}
>
>
>
> };
>
> (2)
>
>
>
> /**
>
> * @private
>
> */
>
>
> com.novusnet.jsTests.ArrayCollectionIteration.prototype.com_novusnet_jsTests
> _ArrayCollectionIteration_iteration = function() {
>
>   var /** @type {Object} */ object = new Object();
>
>   var foreachiter0_target =
> this.com_novusnet_jsTests_ArrayCollectionIteration_items;
>
>   for (var foreachiter0 in foreachiter0_target)
>
>   {
>
>   var propertyClass = foreachiter0_target[foreachiter0];
>
>   {
>
> object[propertyClass.name] = propertyClass.index;
>
>   }}
>
>
>
> };
>
>
>
> (3)
>
>
>
>
>
> /**
>
> * @private
>
> */
>
>
> com.novusnet.jsTests.ArrayCollectionIteration.prototype.com_novusnet_jsTests
> _ArrayCollectionIteration_iteration = function() {
>
>   var /** @type {Object} */ object = new Object();
>
>   var foreachiter0_target =
> this.com_novusnet_jsTests_ArrayCollectionIteration_items;
>
>   for (var foreachiter0 in foreachiter0_target.propertyNames())
>
>   {
>
>   var propertyClass = foreachiter0_target.getProperty(foreachiter0);
>
>   {
>
> object[propertyClass.name] = propertyClass.index;
>
>   }}
>
>
>
> };
>
>
>
>
>
>

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



For each iteration in ArrayList and ArrayCollection

2019-04-10 Thread spiros
Hi, 

 

I am trying to  make an iteration using the for each. The property class is
a simple class with two fields.  

I test the iteration with this classes :

 

 

1.   org.apache.royale.collections.ArrayList error message: TypeError:
propertyClass is undefined

2.   mx.collections.ArrayList error message TypeError: propertyClass is
undefined

3.  mx.collections.ArrayCollection error  message TypeError:
foreachiter0_target.propertyNames is not a function

 

 

 

 

the as3 code is:

  

private function iteration():void

{

var object:Object = new Object;

   for each (var propertyClass:PropertyClass in items)

   {

  object[propertyClass.name] = propertyClass.index;

   }

}

 

Thanks in advanced 

 

 

Spiros 

 

 

 

 

 

ps: The js generated code for this 3 classes 

 

(1)

/**

* @private

*/

com.novusnet.jsTests.ArrayCollectionIteration.prototype.com_novusnet_jsTests
_ArrayCollectionIteration_iteration = function() {

  var /** @type {Object} */ object = new Object();

  var foreachiter0_target =
this.com_novusnet_jsTests_ArrayCollectionIteration_items;

  for (var foreachiter0 in foreachiter0_target) 

  {

  var propertyClass = foreachiter0_target[foreachiter0];

  {

object[propertyClass.name] = propertyClass.index;

  }}

  

};

(2)

 

/**

* @private

*/

com.novusnet.jsTests.ArrayCollectionIteration.prototype.com_novusnet_jsTests
_ArrayCollectionIteration_iteration = function() {

  var /** @type {Object} */ object = new Object();

  var foreachiter0_target =
this.com_novusnet_jsTests_ArrayCollectionIteration_items;

  for (var foreachiter0 in foreachiter0_target) 

  {

  var propertyClass = foreachiter0_target[foreachiter0];

  {

object[propertyClass.name] = propertyClass.index;

  }}

  

};

 

(3)

 

 

/**

* @private

*/

com.novusnet.jsTests.ArrayCollectionIteration.prototype.com_novusnet_jsTests
_ArrayCollectionIteration_iteration = function() {

  var /** @type {Object} */ object = new Object();

  var foreachiter0_target =
this.com_novusnet_jsTests_ArrayCollectionIteration_items;

  for (var foreachiter0 in foreachiter0_target.propertyNames()) 

  {

  var propertyClass = foreachiter0_target.getProperty(foreachiter0);

  {

object[propertyClass.name] = propertyClass.index;

  }}

  

};

 

  



RE: String escape seq \x and \u not working

2019-04-10 Thread spiros
Hi Alex , 

Because  of FB I put the -Dfile.encoding=UTF8 in asjsc.bat. 


Thanks 

Spiros

-Original Message-
From: Alex Harui [mailto:aha...@adobe.com.INVALID] 
Sent: Wednesday, April 10, 2019 7:26 AM
To: dev@royale.apache.org
Subject: Re: String escape seq \x and \u not working

Are you running on Windows?  If so, you may need to set JAVA_TOOL_OPTIONS for 
utf8.  There are some past threads on that.

-Alex

On 4/9/19, 6:39 PM, "spiros"  wrote:

Hi everyone 

 

I trying to convert a as3 string with with escape seq ro js equivalent .

For example for  the as3 code :

   var str:String = "\xc9\u80FF\u00C9";

I get in Js this;

  

  var /** @type {string} */ str = "???";

 

Is there a way to get the correct representation in js (compiler flag or a
different use of string 

 
    
     

 

Spiros 

 

 

 

 

 






String escape seq \x and \u not working

2019-04-08 Thread spiros
Hi everyone 

 

I trying to convert a as3 string with with escape seq ro js equivalent .

For example for  the as3 code :

   var str:String = "\xc9\u80FF\u00C9";

I get in Js this;

  

  var /** @type {string} */ str = "???";

 

Is there a way to get the correct representation in js (compiler flag or a
different use of string 

 

 

 

Spiros 

 

 

 

 

 



RE: Remote Object and Coldfusion

2019-04-07 Thread spiros
Hi carlos , 

No both of 1 and 2  are  point to MXRoyale  I know because the source property 
is here and working .( I was started this thread because the source property is 
not working in network).
The namespace in sa:application tag is 
xmlns:ns="library://ns.apache.org/royale/mx" 
and in second case there is the import 
import mx.messaging.messages.RemotingMessage;
  



Spiros 




-Original Message-
From: Carlos Rovira [mailto:carlosrov...@apache.org] 
Sent: Saturday, April 6, 2019 2:50 PM
To: dev@royale.apache.org
Subject: Re: Remote Object and Coldfusion

Hi Spiros,

1.- this one as a bead is the RO from Network that I think you don't want
to use right? You want the RO from MXRoyale that is not a bead
2.- is RO from MXRoyale since it has "source" property that is not in the
Network bead version.

The extra classes are only added to MXRoyale




El vie., 5 abr. 2019 a las 16:54, spiros () escribió:

> Hi again,
>
> I found what was the problem
>
> They are two ways to define a remote Object.
> 1. MXMX Tag eg:
> 
> 
>
>  id="ro" result="resultHandler(event)"
> fault="faultFault(event)"
> endpoint= "http://localhost:80/flex2gateway/";
> destination = "ColdFusion"
> source="a service"
> />
> 
>
> 2. As3 eg:
>
> ro = new RemoteObject;
> ro.endpoint = "http://localhost:80/flex2gateway/";;
> ro.destination="ColdFusion";
> ro.source= "a service ";
> ro.addEventListener(ResultEvent.RESULT ,resultHandler);
> ro.addEventListener(FaultEvent.FAULT , faultFault);
>
>
> The first method is fine and no need of extra classes to register.
> The second method produce communication error  at runtime and need the
> extra classes .
>
> I think this is not work even if the server is BlazeDS.
>
>
>
>
>
>
>
> Spiros
>
>
>
>
> -Original Message-
> From: Carlos Rovira [mailto:carlosrov...@apache.org]
> Sent: Friday, April 5, 2019 12:03 PM
> To: dev@royale.apache.org
> Subject: Re: Remote Object and Coldfusion
>
> Great! thanks for report back! :)
>
> El vie., 5 abr. 2019 a las 10:40, spiros () escribió:
>
> > Hi Carlos,
> >
> > I test the last build with this lines as comments and works fine.
> >
> >
> >
> > Thanks again
> >
> >
> > Spiros
> >
> >
> > -Original Message-
> > From: Carlos Rovira [mailto:carlosrov...@apache.org]
> > Sent: Thursday, April 4, 2019 11:57 AM
> > To: dev@royale.apache.org
> > Subject: Re: Remote Object and Coldfusion
> >
> > Hi Spiros,
> >
> > I check that those register class aliases was not in MXRoyale,
> > I added just a moment ago.
> > Is a mistery to me why this works with BlazeDS but not with ColdFusion
> > until now...maybe others can figure it
> > if you can try with latest code and remove yours let me know if that
> works
> > for you with just this Royale code
> >
> > thanks for testing and reporting! :)
> >
> >
> >
> > El mié., 3 abr. 2019 a las 17:39, spiros ()
> escribió:
> >
> > > Hi Carlos,
> > >
> > > The main class of mxRoyale contains three lines for class registration,
> > >
> > > //registerClassAlias("DSC", CommandMessageExt);
> > > //registerClassAlias("DSK", AcknowledgeMessageExt);
> > > //registerClassAlias("DSA", AsyncMessageExt);
> > >
> > > Only with lines below I got result from server
> > >
> > > registerClassAlias("flex.messaging.messages.CommandMessage",
> > > CommandMessage);
> > > registerClassAlias("flex.messaging.messages.AcknowledgeMessage",
> > > AcknowledgeMessage);
> > > registerClassAlias("flex.messaging.messages.AsyncMessage",
> AsyncMessage);
> > > registerClassAlias("flex.messaging.messages.RemotingMessage",
> > > RemotingMessage);
> > >
> > > In any other case I got a fault event.
> > >
> > > The best think is that any kind of CF object is return correctly
> (struct
> > ,
> > > query , Binary , date, string and numeric) to my test application.
> > >
> > >
> > >
> > > Thanks again
> > >
> > >
> > > Spiros
> > >
> > >
> > >
> > >
> > >
> > >
> > > -O

RE: Remote Object and Coldfusion

2019-04-05 Thread spiros
Hi again,  

I found what was the problem 

They are two ways to define a remote Object.
1. MXMX Tag eg:



http://localhost:80/flex2gateway/";
destination = "ColdFusion"
source="a service"
/>

 
2. As3 eg:

ro = new RemoteObject;
ro.endpoint = "http://localhost:80/flex2gateway/";;
ro.destination="ColdFusion";
ro.source= "a service ";
ro.addEventListener(ResultEvent.RESULT ,resultHandler);
ro.addEventListener(FaultEvent.FAULT , faultFault);


The first method is fine and no need of extra classes to register.
The second method produce communication error  at runtime and need the extra 
classes .

I think this is not work even if the server is BlazeDS.


 

 


Spiros
 



-Original Message-
From: Carlos Rovira [mailto:carlosrov...@apache.org] 
Sent: Friday, April 5, 2019 12:03 PM
To: dev@royale.apache.org
Subject: Re: Remote Object and Coldfusion

Great! thanks for report back! :)

El vie., 5 abr. 2019 a las 10:40, spiros () escribió:

> Hi Carlos,
>
> I test the last build with this lines as comments and works fine.
>
>
>
> Thanks again
>
>
> Spiros
>
>
> -Original Message-
> From: Carlos Rovira [mailto:carlosrov...@apache.org]
> Sent: Thursday, April 4, 2019 11:57 AM
> To: dev@royale.apache.org
> Subject: Re: Remote Object and Coldfusion
>
> Hi Spiros,
>
> I check that those register class aliases was not in MXRoyale,
> I added just a moment ago.
> Is a mistery to me why this works with BlazeDS but not with ColdFusion
> until now...maybe others can figure it
> if you can try with latest code and remove yours let me know if that works
> for you with just this Royale code
>
> thanks for testing and reporting! :)
>
>
>
> El mié., 3 abr. 2019 a las 17:39, spiros () escribió:
>
> > Hi Carlos,
> >
> > The main class of mxRoyale contains three lines for class registration,
> >
> > //registerClassAlias("DSC", CommandMessageExt);
> > //registerClassAlias("DSK", AcknowledgeMessageExt);
> > //registerClassAlias("DSA", AsyncMessageExt);
> >
> > Only with lines below I got result from server
> >
> > registerClassAlias("flex.messaging.messages.CommandMessage",
> > CommandMessage);
> > registerClassAlias("flex.messaging.messages.AcknowledgeMessage",
> > AcknowledgeMessage);
> > registerClassAlias("flex.messaging.messages.AsyncMessage", AsyncMessage);
> > registerClassAlias("flex.messaging.messages.RemotingMessage",
> > RemotingMessage);
> >
> > In any other case I got a fault event.
> >
> > The best think is that any kind of CF object is return correctly (struct
> ,
> > query , Binary , date, string and numeric) to my test application.
> >
> >
> >
> > Thanks again
> >
> >
> > Spiros
> >
> >
> >
> >
> >
> >
> > -Original Message-
> > From: Carlos Rovira [mailto:carlosrov...@apache.org]
> > Sent: Wednesday, April 3, 2019 5:34 PM
> > To: dev@royale.apache.org
> > Subject: Re: Remote Object and Coldfusion
> >
> > Hi Spiro,
> >
> > great you get it! :)
> > and starting with a simple string is the most intelligent way to do it,
> so
> > you progress as you see things working
> >
> > about register classes. All that is already done in MXRoyale (check the
> > main class in that SWC)
> >
> > I think the problem is that Royale RPC can work with ArrayCollection and
> > ArrayList. In Flex there was only ArrayList.
> > If you use MX or SPARK emulation, you want AC. If you use Basic, Jewel or
> > Express, you want AL instead
> >
> > For example in my own real app that uses Jewel  I have this:
> >
> > import org.apache.royale.collections.ArrayList;
> >
> > then in my Application initialize event handler (or in other part you
> > prefer);
> >
> > //register ArrayCollection alias to map to ArrayList in local project
> > registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
> >
> > try to remove all your code and just put this, and that should work for
> you
> >
> > best
> >
> > Carlos
> >
> >
> >
> > El mié., 3 abr. 2019 a las 14:07, spiros ()
> escribió:
> >
> > > Hi Carlos
> > >
> > > You are right  about the wrong class I used.
> > > After a few modifications I get a  response from CF server. (  a simple
> > > 

RE: Flash builder error when compile royale project

2019-04-05 Thread spiros
Hi Alex,
I follow the steps in doc again to make sure that there is no any error.

1. download the last NB SDK 
2. Extract in a folder and run the ant -f antscripts.xml setup
3. point flashBuilder --> windows preferences -->installed Flex SDK to new 
SDK/royale-asjs
4. from flash builder --> file-->inport -->run/debug --Launch Configution point 
to SDK/royale-asjs/ide/flashbuilder import the external tools 
5. create a flex project 
6. Try to Convert New Project to Royale Project. This Step produce Error in FB 
console. 
The problem is this line

In the file  Convert New Flex Project to Royale Project.launch  under the 
royale-asjs/ide/flashbuilder folder. This point to a default location instead 
of $ROYALE_HOME
7. the compilation work fine for me when I change this parameters in the file 
asjsc.bat under the folder SDK\royale-asjs\js\bin 

-js-output-type=RSRoyale for this parameter when I set to from external tools 
configuration --> arguments I get the message : 
command line Error: configuration variable 'js-output-type' must only be set 
once.

And 
+configname=flex
This parameters works if I set to from from external tools configuration --> 
arguments and override this in the batch file 


For my config  I set the tho params to asjsc.bat and the scripts run fine.


Spiros.




-Original Message-
From: Alex Harui [mailto:aha...@adobe.com.INVALID] 
Sent: Thursday, April 4, 2019 7:36 PM
To: dev@royale.apache.org
Subject: Re: Flash builder error when compile royale project

Hi,

Did you follow these instructions?  
https://github.com/apache/royale-asjs/wiki/Flash-Builder-4.7

It looks like you are trying to compile an MXML file as a low-level 
ActionScript project.  You will want to start with a Flex Project, and convert 
it.  The js-output-type should be "JSRoyale" if you get it configured 
correctly.  If you plan to use the MXRoyale components you may need to set 
+configname=flex in the project's additional compiler options.

HTH,
-Alex

On 4/4/19, 5:13 AM, "spiros"  wrote:

I use the flash builder 4.7 to test  a basic royale js project.

When compile the project  with ASJSC   an error appear to console but the
project seens to be compiled.

The console log is  :

 

 

using FlashBuilder Project Files

FlashBuilder settings:

 
-source-path+=C:\DevelopmentWorkspace\FlashBuilder_Royale\CFcommunication/sr
c

-compiler.accessible=true

 
-output=C:\DevelopmentWorkspace\FlashBuilder_Royale\CFcommunication/bin-debu
g/CFcommunication.swf

 
-library-path+=C:\DevelopmentWorkspace\FlashBuilder_Royale\CFcommunication/l
ibs

-locale

en_US

-js-output-type=jsc

+configname=js

-debug=true

-fb

 
C:\DevelopmentWorkspace\FlashBuilder_Royale\CFcommunication/src/CFcommunicat
ion.mxml

C:\DevelopmentWorkspace\FlashBuilder_Royale\CFcommunication\src\CFcommunicat
ion.mxml(2): col: 1 Error: This tag could not be resolved to an ActionScript
class. It will be ignored.

 

https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C199b0066604a48eae16708d6b8f6fa6a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636899768244118864&sdata=hVKmn2YKJJjAZ3DyrjWA2fLe%2BJ43BXJUV9DdgVnX4mw%3D&reserved=0";

^

 

 

Spiros

 

 

 






RE: Remote Object and Coldfusion

2019-04-05 Thread spiros
Hi Carlos, 

I test the last build with this lines as comments and works fine.



Thanks again 


Spiros  


-Original Message-
From: Carlos Rovira [mailto:carlosrov...@apache.org] 
Sent: Thursday, April 4, 2019 11:57 AM
To: dev@royale.apache.org
Subject: Re: Remote Object and Coldfusion

Hi Spiros,

I check that those register class aliases was not in MXRoyale,
I added just a moment ago.
Is a mistery to me why this works with BlazeDS but not with ColdFusion
until now...maybe others can figure it
if you can try with latest code and remove yours let me know if that works
for you with just this Royale code

thanks for testing and reporting! :)



El mié., 3 abr. 2019 a las 17:39, spiros () escribió:

> Hi Carlos,
>
> The main class of mxRoyale contains three lines for class registration,
>
> //registerClassAlias("DSC", CommandMessageExt);
> //registerClassAlias("DSK", AcknowledgeMessageExt);
> //registerClassAlias("DSA", AsyncMessageExt);
>
> Only with lines below I got result from server
>
> registerClassAlias("flex.messaging.messages.CommandMessage",
> CommandMessage);
> registerClassAlias("flex.messaging.messages.AcknowledgeMessage",
> AcknowledgeMessage);
> registerClassAlias("flex.messaging.messages.AsyncMessage", AsyncMessage);
> registerClassAlias("flex.messaging.messages.RemotingMessage",
> RemotingMessage);
>
> In any other case I got a fault event.
>
> The best think is that any kind of CF object is return correctly (struct ,
> query , Binary , date, string and numeric) to my test application.
>
>
>
> Thanks again
>
>
> Spiros
>
>
>
>
>
>
> -Original Message-
> From: Carlos Rovira [mailto:carlosrov...@apache.org]
> Sent: Wednesday, April 3, 2019 5:34 PM
> To: dev@royale.apache.org
> Subject: Re: Remote Object and Coldfusion
>
> Hi Spiro,
>
> great you get it! :)
> and starting with a simple string is the most intelligent way to do it, so
> you progress as you see things working
>
> about register classes. All that is already done in MXRoyale (check the
> main class in that SWC)
>
> I think the problem is that Royale RPC can work with ArrayCollection and
> ArrayList. In Flex there was only ArrayList.
> If you use MX or SPARK emulation, you want AC. If you use Basic, Jewel or
> Express, you want AL instead
>
> For example in my own real app that uses Jewel  I have this:
>
> import org.apache.royale.collections.ArrayList;
>
> then in my Application initialize event handler (or in other part you
> prefer);
>
> //register ArrayCollection alias to map to ArrayList in local project
> registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
>
> try to remove all your code and just put this, and that should work for you
>
> best
>
> Carlos
>
>
>
> El mié., 3 abr. 2019 a las 14:07, spiros () escribió:
>
> > Hi Carlos
> >
> > You are right  about the wrong class I used.
> > After a few modifications I get a  response from CF server. (  a simple
> > string for now )
> >
> > I register the below classes before receive a complete answer from CF.
> >
> > // Flex classes
> > registerClassAlias("flex.messaging.io.ArrayCollection", ArrayCollection);
> > registerClassAlias("flex.messaging.io.ArrayList", ArrayList);
> > registerClassAlias("flex.messaging.io.ObjectProxy", ObjectProxy);
> > // rpc classes
> > registerClassAlias("flex.messaging.messages.AcknowledgeMessage",
> > AcknowledgeMessage);
> > registerClassAlias("DSK", AcknowledgeMessageExt);
> > registerClassAlias("flex.messaging.messages.AsyncMessage", AsyncMessage);
> > registerClassAlias("DSA", AsyncMessageExt);
> > registerClassAlias("flex.messaging.messages.CommandMessage",
> > CommandMessage);
> > registerClassAlias("DSC", CommandMessageExt);
> > registerClassAlias("flex.messaging.config.ConfigMap", ConfigMap);
> > registerClassAlias("flex.messaging.messages.ErrorMessage", ErrorMessage);
> > registerClassAlias("flex.messaging.messages.HTTPMessage",
> > HTTPRequestMessage);
> > registerClassAlias("flex.messaging.messages.MessagePerformanceInfo",
> > MessagePerformanceInfo);
> > registerClassAlias("flex.messaging.messages.RemotingMessage",
> > RemotingMessage);
> >
> >
> > * I copy from flex SDK -->class mx.utils.RpcClassAliasInitializer
> >
> >
> >
> >
> > Thanks
> >
> >
> > Spiros
> >
> >
> >
> > -Original Message-
&g

Flash builder error when compile royale project

2019-04-04 Thread spiros
I use the flash builder 4.7 to test  a basic royale js project.

When compile the project  with ASJSC   an error appear to console but the
project seens to be compiled.

The console log is  :

 

 

using FlashBuilder Project Files

FlashBuilder settings:

 
-source-path+=C:\DevelopmentWorkspace\FlashBuilder_Royale\CFcommunication/sr
c

-compiler.accessible=true

 
-output=C:\DevelopmentWorkspace\FlashBuilder_Royale\CFcommunication/bin-debu
g/CFcommunication.swf

 
-library-path+=C:\DevelopmentWorkspace\FlashBuilder_Royale\CFcommunication/l
ibs

-locale

en_US

-js-output-type=jsc

+configname=js

-debug=true

-fb

 
C:\DevelopmentWorkspace\FlashBuilder_Royale\CFcommunication/src/CFcommunicat
ion.mxml

C:\DevelopmentWorkspace\FlashBuilder_Royale\CFcommunication\src\CFcommunicat
ion.mxml(2): col: 1 Error: This tag could not be resolved to an ActionScript
class. It will be ignored.

 

http://ns.adobe.com/mxml/2009";

^

 

 

Spiros

 

 

 



RE: Remote Object and Coldfusion

2019-04-04 Thread spiros
Hi Carlos , 

How can I test this ? Is a way to replace this class and rebuild the sdk , or I 
wait for tomorrow NB release ?


Spiros  



-Original Message-
From: Carlos Rovira [mailto:carlosrov...@apache.org] 
Sent: Thursday, April 4, 2019 11:57 AM
To: dev@royale.apache.org
Subject: Re: Remote Object and Coldfusion

Hi Spiros,

I check that those register class aliases was not in MXRoyale,
I added just a moment ago.
Is a mistery to me why this works with BlazeDS but not with ColdFusion
until now...maybe others can figure it
if you can try with latest code and remove yours let me know if that works
for you with just this Royale code

thanks for testing and reporting! :)



El mié., 3 abr. 2019 a las 17:39, spiros () escribió:

> Hi Carlos,
>
> The main class of mxRoyale contains three lines for class registration,
>
> //registerClassAlias("DSC", CommandMessageExt);
> //registerClassAlias("DSK", AcknowledgeMessageExt);
> //registerClassAlias("DSA", AsyncMessageExt);
>
> Only with lines below I got result from server
>
> registerClassAlias("flex.messaging.messages.CommandMessage",
> CommandMessage);
> registerClassAlias("flex.messaging.messages.AcknowledgeMessage",
> AcknowledgeMessage);
> registerClassAlias("flex.messaging.messages.AsyncMessage", AsyncMessage);
> registerClassAlias("flex.messaging.messages.RemotingMessage",
> RemotingMessage);
>
> In any other case I got a fault event.
>
> The best think is that any kind of CF object is return correctly (struct ,
> query , Binary , date, string and numeric) to my test application.
>
>
>
> Thanks again
>
>
> Spiros
>
>
>
>
>
>
> -Original Message-
> From: Carlos Rovira [mailto:carlosrov...@apache.org]
> Sent: Wednesday, April 3, 2019 5:34 PM
> To: dev@royale.apache.org
> Subject: Re: Remote Object and Coldfusion
>
> Hi Spiro,
>
> great you get it! :)
> and starting with a simple string is the most intelligent way to do it, so
> you progress as you see things working
>
> about register classes. All that is already done in MXRoyale (check the
> main class in that SWC)
>
> I think the problem is that Royale RPC can work with ArrayCollection and
> ArrayList. In Flex there was only ArrayList.
> If you use MX or SPARK emulation, you want AC. If you use Basic, Jewel or
> Express, you want AL instead
>
> For example in my own real app that uses Jewel  I have this:
>
> import org.apache.royale.collections.ArrayList;
>
> then in my Application initialize event handler (or in other part you
> prefer);
>
> //register ArrayCollection alias to map to ArrayList in local project
> registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
>
> try to remove all your code and just put this, and that should work for you
>
> best
>
> Carlos
>
>
>
> El mié., 3 abr. 2019 a las 14:07, spiros () escribió:
>
> > Hi Carlos
> >
> > You are right  about the wrong class I used.
> > After a few modifications I get a  response from CF server. (  a simple
> > string for now )
> >
> > I register the below classes before receive a complete answer from CF.
> >
> > // Flex classes
> > registerClassAlias("flex.messaging.io.ArrayCollection", ArrayCollection);
> > registerClassAlias("flex.messaging.io.ArrayList", ArrayList);
> > registerClassAlias("flex.messaging.io.ObjectProxy", ObjectProxy);
> > // rpc classes
> > registerClassAlias("flex.messaging.messages.AcknowledgeMessage",
> > AcknowledgeMessage);
> > registerClassAlias("DSK", AcknowledgeMessageExt);
> > registerClassAlias("flex.messaging.messages.AsyncMessage", AsyncMessage);
> > registerClassAlias("DSA", AsyncMessageExt);
> > registerClassAlias("flex.messaging.messages.CommandMessage",
> > CommandMessage);
> > registerClassAlias("DSC", CommandMessageExt);
> > registerClassAlias("flex.messaging.config.ConfigMap", ConfigMap);
> > registerClassAlias("flex.messaging.messages.ErrorMessage", ErrorMessage);
> > registerClassAlias("flex.messaging.messages.HTTPMessage",
> > HTTPRequestMessage);
> > registerClassAlias("flex.messaging.messages.MessagePerformanceInfo",
> > MessagePerformanceInfo);
> > registerClassAlias("flex.messaging.messages.RemotingMessage",
> > RemotingMessage);
> >
> >
> > * I copy from flex SDK -->class mx.utils.RpcClassAliasInitializer
> >
> >
> >
> >
> > Thanks
> >
> >
> > Spiros
> >
> >
> >
&g

RE: Remote Object and Coldfusion

2019-04-03 Thread spiros
Hi Carlos,

The main class of mxRoyale contains three lines for class registration, 

//registerClassAlias("DSC", CommandMessageExt);
//registerClassAlias("DSK", AcknowledgeMessageExt);
//registerClassAlias("DSA", AsyncMessageExt);

Only with lines below I got result from server   

registerClassAlias("flex.messaging.messages.CommandMessage", CommandMessage);
registerClassAlias("flex.messaging.messages.AcknowledgeMessage", 
AcknowledgeMessage);
registerClassAlias("flex.messaging.messages.AsyncMessage", AsyncMessage);
registerClassAlias("flex.messaging.messages.RemotingMessage", RemotingMessage); 
 

In any other case I got a fault event.

The best think is that any kind of CF object is return correctly (struct , 
query , Binary , date, string and numeric) to my test application.



Thanks again 


Spiros  






-Original Message-
From: Carlos Rovira [mailto:carlosrov...@apache.org] 
Sent: Wednesday, April 3, 2019 5:34 PM
To: dev@royale.apache.org
Subject: Re: Remote Object and Coldfusion

Hi Spiro,

great you get it! :)
and starting with a simple string is the most intelligent way to do it, so
you progress as you see things working

about register classes. All that is already done in MXRoyale (check the
main class in that SWC)

I think the problem is that Royale RPC can work with ArrayCollection and
ArrayList. In Flex there was only ArrayList.
If you use MX or SPARK emulation, you want AC. If you use Basic, Jewel or
Express, you want AL instead

For example in my own real app that uses Jewel  I have this:

import org.apache.royale.collections.ArrayList;

then in my Application initialize event handler (or in other part you
prefer);

//register ArrayCollection alias to map to ArrayList in local project
registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);

try to remove all your code and just put this, and that should work for you

best

Carlos



El mié., 3 abr. 2019 a las 14:07, spiros () escribió:

> Hi Carlos
>
> You are right  about the wrong class I used.
> After a few modifications I get a  response from CF server. (  a simple
> string for now )
>
> I register the below classes before receive a complete answer from CF.
>
> // Flex classes
> registerClassAlias("flex.messaging.io.ArrayCollection", ArrayCollection);
> registerClassAlias("flex.messaging.io.ArrayList", ArrayList);
> registerClassAlias("flex.messaging.io.ObjectProxy", ObjectProxy);
> // rpc classes
> registerClassAlias("flex.messaging.messages.AcknowledgeMessage",
> AcknowledgeMessage);
> registerClassAlias("DSK", AcknowledgeMessageExt);
> registerClassAlias("flex.messaging.messages.AsyncMessage", AsyncMessage);
> registerClassAlias("DSA", AsyncMessageExt);
> registerClassAlias("flex.messaging.messages.CommandMessage",
> CommandMessage);
> registerClassAlias("DSC", CommandMessageExt);
> registerClassAlias("flex.messaging.config.ConfigMap", ConfigMap);
> registerClassAlias("flex.messaging.messages.ErrorMessage", ErrorMessage);
> registerClassAlias("flex.messaging.messages.HTTPMessage",
> HTTPRequestMessage);
> registerClassAlias("flex.messaging.messages.MessagePerformanceInfo",
> MessagePerformanceInfo);
> registerClassAlias("flex.messaging.messages.RemotingMessage",
> RemotingMessage);
>
>
> * I copy from flex SDK -->class mx.utils.RpcClassAliasInitializer
>
>
>
>
> Thanks
>
>
> Spiros
>
>
>
> -Original Message-
> From: Carlos Rovira [mailto:carlosrov...@apache.org]
> Sent: Wednesday, April 3, 2019 11:11 AM
> To: dev@royale.apache.org
> Subject: Re: Remote Object and Coldfusion
>
> Hi,
>
> MXRoyale is almost 1:1 port of RPC flex code, so if you used that before
> you have the same (even source property that is not in network remote
> object bead version).
>
> I can see the setRemoteCredentials in the code as well
>
> So my bet is that you are using the Network RO class instead of the
> MRRoyale one as I told you. That version probably don't work for you, or to
> make it work will need more work for people interested in it.
>
> try MXRoyale RemoteObject and let us know if that solve your problem
>
> best
>
> Carlos
>
>
>
> El mié., 3 abr. 2019 a las 9:03, spiros () escribió:
>
> > Hi Carlos,
> >
> > I understand what you say but this means that there is no way to use the
> > royale sdk to connect to coldfusion backend.
> >
> > In this configuration always the destination property set to "ColdFusion"
> > , the source property set to actual coldfusion component
> > and the name -in royale is the first parame

RE: Remote Object and Coldfusion

2019-04-03 Thread spiros
Hi Carlos 

You are right  about the wrong class I used.
After a few modifications I get a  response from CF server. (  a simple string 
for now )

I register the below classes before receive a complete answer from CF.

// Flex classes
registerClassAlias("flex.messaging.io.ArrayCollection", ArrayCollection);
registerClassAlias("flex.messaging.io.ArrayList", ArrayList);
registerClassAlias("flex.messaging.io.ObjectProxy", ObjectProxy);
// rpc classes
registerClassAlias("flex.messaging.messages.AcknowledgeMessage", 
AcknowledgeMessage);
registerClassAlias("DSK", AcknowledgeMessageExt);
registerClassAlias("flex.messaging.messages.AsyncMessage", AsyncMessage);
registerClassAlias("DSA", AsyncMessageExt);
registerClassAlias("flex.messaging.messages.CommandMessage", CommandMessage);
registerClassAlias("DSC", CommandMessageExt);
registerClassAlias("flex.messaging.config.ConfigMap", ConfigMap);
registerClassAlias("flex.messaging.messages.ErrorMessage", ErrorMessage);
registerClassAlias("flex.messaging.messages.HTTPMessage", HTTPRequestMessage);
registerClassAlias("flex.messaging.messages.MessagePerformanceInfo", 
MessagePerformanceInfo);
registerClassAlias("flex.messaging.messages.RemotingMessage", RemotingMessage);


* I copy from flex SDK -->class mx.utils.RpcClassAliasInitializer  




Thanks 


Spiros 



-Original Message-
From: Carlos Rovira [mailto:carlosrov...@apache.org] 
Sent: Wednesday, April 3, 2019 11:11 AM
To: dev@royale.apache.org
Subject: Re: Remote Object and Coldfusion

Hi,

MXRoyale is almost 1:1 port of RPC flex code, so if you used that before
you have the same (even source property that is not in network remote
object bead version).

I can see the setRemoteCredentials in the code as well

So my bet is that you are using the Network RO class instead of the
MRRoyale one as I told you. That version probably don't work for you, or to
make it work will need more work for people interested in it.

try MXRoyale RemoteObject and let us know if that solve your problem

best

Carlos



El mié., 3 abr. 2019 a las 9:03, spiros () escribió:

> Hi Carlos,
>
> I understand what you say but this means that there is no way to use the
> royale sdk to connect to coldfusion backend.
>
> In this configuration always the destination property set to "ColdFusion"
> , the source property set to actual coldfusion component
> and the name -in royale is the first parameter of send method- is the
> method inside the coldfusion component.
>
> Another problem is the missing of method "setRemoteCredentials" and
> "setRemoteCredentials".
> This methods send a username and password the remote destrination
> (coldfusion) .
>
>
> Thanks in advanced
>
> Spiros
>
> ps: I will change the source localy to see if I connect to CF source .
>
>
>
>
>
>
> -Original Message-
> From: Carlos Rovira [mailto:carlosrov...@apache.org]
> Sent: Tuesday, April 2, 2019 5:30 PM
> To: dev@royale.apache.org
> Subject: Re: Remote Object and Coldfusion
>
> Hi,
>
> yes, in theory RemoteObject in MXRoyale (use this instead the one in
> Network swc is what you need. It replicates flex remote object and has now
> almost all functionality. Dictionary and Vector are the only types still
> not supported. But you have even small messages and all functionality
> tested in a BlazeDS project migration.
>
> About "source" property: was a deprecated property in AMF0 (IIRC), so you
> should not use it, and just use destination
> using source was deprecated since you exposed in the client code the exact
> backend source code class you're using, so making this a serious security
> hole
>
> code from our example in "examples/mxroyale"
>
>  endpoint="http://localhost:8080/messagebroker/websocket-amf";
> destination="exampleService"/>
>
> HTH
>
> Carlos
>
>
> El mar., 2 abr. 2019 a las 13:44, spiros () escribió:
>
> > Hi ,
> >
> > is there a way to use royale remote object to connect to coldfuison
> > resources.
> >
> > I am not sure but I think there was a property "source" but I can't find
> > anymore.
> >
> >
> >
> >
> >
> >> fault="onFault(event)"
> >
> >  endPoint =
> > "http://localhost:80/flex2gateway";
> >
> >  destination = "ColdFusion"
> >
> >  source = "any cf source"/>
> >
> >
> >
> >
> >
> > I user the last js version 9.6.0
> >
> >
> >
> >
> >
> > Thanks
> >
> >
> >
> >
> >
> > Spiros
> >
> >
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

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



RE: Remote Object and Coldfusion

2019-04-03 Thread spiros
Hi Carlos, 

I understand what you say but this means that there is no way to use the royale 
sdk to connect to coldfusion backend.

In this configuration always the destination property set to "ColdFusion" , the 
source property set to actual coldfusion component
and the name -in royale is the first parameter of send method- is the method 
inside the coldfusion component.

Another problem is the missing of method "setRemoteCredentials" and 
"setRemoteCredentials". 
This methods send a username and password the remote destrination (coldfusion) .


Thanks in advanced

Spiros

ps: I will change the source localy to see if I connect to CF source .
 


 


-Original Message-
From: Carlos Rovira [mailto:carlosrov...@apache.org] 
Sent: Tuesday, April 2, 2019 5:30 PM
To: dev@royale.apache.org
Subject: Re: Remote Object and Coldfusion

Hi,

yes, in theory RemoteObject in MXRoyale (use this instead the one in
Network swc is what you need. It replicates flex remote object and has now
almost all functionality. Dictionary and Vector are the only types still
not supported. But you have even small messages and all functionality
tested in a BlazeDS project migration.

About "source" property: was a deprecated property in AMF0 (IIRC), so you
should not use it, and just use destination
using source was deprecated since you exposed in the client code the exact
backend source code class you're using, so making this a serious security
hole

code from our example in "examples/mxroyale"

http://localhost:8080/messagebroker/websocket-amf";
destination="exampleService"/>

HTH

Carlos


El mar., 2 abr. 2019 a las 13:44, spiros () escribió:

> Hi ,
>
> is there a way to use royale remote object to connect to coldfuison
> resources.
>
> I am not sure but I think there was a property "source" but I can't find
> anymore.
>
>
>
>
>
>fault="onFault(event)"
>
>  endPoint =
> "http://localhost:80/flex2gateway";
>
>  destination = "ColdFusion"
>
>  source = "any cf source"/>
>
>
>
>
>
> I user the last js version 9.6.0
>
>
>
>
>
> Thanks
>
>
>
>
>
> Spiros
>
>

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



Remote Object and Coldfusion

2019-04-02 Thread spiros
Hi , 

is there a way to use royale remote object to connect to coldfuison
resources. 

I am not sure but I think there was a property "source" but I can't find
anymore.

 

 

  http://localhost:80/flex2gateway";

 destination = "ColdFusion"

 source = "any cf source"/>

 

 

I user the last js version 9.6.0 

 

 

Thanks 

 

 

Spiros 



RE: Compiler error using static function toString

2018-05-04 Thread spiros aggelopoulos
Yes,
 if I rename the static function to "toStringSome" the compiler stop to 
complain about that.
 
-Spiros

-Original Message-
From: Alex Harui [mailto:aha...@adobe.com.INVALID] 
Sent: Friday, May 4, 2018 7:48 PM
To: dev@royale.apache.org
Subject: Re: Compiler error using static function toString

Hmm.  I agree that doesn't make sense.  Try changing the name of the function 
just to see if there is sensitivity to the "toString".  "toString" is handled 
in a strange way in AS.

-Alex

On 5/4/18, 6:13 AM, "Spiros Aggelopoulos"  wrote:

Hi , 
there is a compiler error on the code bellow, 
is any reason to avoid this type of code? Or it is a bug ?



package org.comp
{
public class ToStringImp
{
public static function toString(str:String):String
{
return str;
}
}
}


package org.comp
{
import org.apache.royale.events.EventDispatcher;
import org.apache.royale.events.IEventDispatcher;

public class CompError extends EventDispatcher
{
public function CompError(target:IEventDispatcher=null)
{
super(target);
}

override public function toString():String
{

//compiler message : 
//1137: Incorrect number of arguments.  Expected no
more than 0 
return ToStringImp.toString("some string value");
        }
}
}

Thanks , 

Spiros 
















Compiler error using static function toString

2018-05-04 Thread Spiros Aggelopoulos
Hi , 
there is a compiler error on the code bellow, 
is any reason to avoid this type of code? Or it is a bug ?



package org.comp
{
public class ToStringImp
{
public static function toString(str:String):String
{
return str;
}
}
}


package org.comp
{
import org.apache.royale.events.EventDispatcher;
import org.apache.royale.events.IEventDispatcher;

public class CompError extends EventDispatcher
{
public function CompError(target:IEventDispatcher=null)
{
super(target);
}

override public function toString():String
{

//compiler message : 
//1137: Incorrect number of arguments.  Expected no
more than 0 
return ToStringImp.toString("some string value");
}
}
}

Thanks , 

Spiros