Re: [DISCUSS] fork/move Apache Flex BlazeDS to Royale?

2020-09-14 Thread Raúl Núñez
Hi:

I totally agree with this update. So +1 :) :)

Regards!!

El lun., 14 sept. 2020 a las 10:58, Carlos Rovira ()
escribió:

> Hi Chris,
>
> I'm all for it. We really need BladeDS in Royale, so we should keep it with
> the flow and also improve it for the actual needs. Spring Flex integration
> is now dead, so bringing that too to keep it alive would be very good.
>
> So it's ok for me to leave BladeDS in Flex in its current name and
> versioning (and if there's any need in flex in forthcoming years let others
> do the patches they could need), and bring BlazeDS in its current state as
> "RoyaleDS" here and start releasing new improvements for Royale with the
> new name.
>
> I think that also will make Royale stronger since we already support the
> main AMF implementation in this project.
>
> So +1
>
>
> El lun., 14 sept. 2020 a las 10:44, Christofer Dutz (<
> christofer.d...@c-ware.de>) escribió:
>
> > Hi all,
> >
> > currently I’m using Apache Flex BlazeDS as backend for my Royale
> > applications.
> >
> > This has somewhat become a little old and I do need to do quite some
> > tweaking to get it working with Royale and especially with new Spring,
> > Spring-Boot and Spring-Security.
> > So I guess doing some update of that and re-releasing does sound like a
> > good idea.
> >
> > But I think it would be better to do a clean cut and optimize it for
> usage
> > with Royale.
> >
> > I’d even like to call it something “RoyaleDS” to make the link Rolyale +
> > RoyaleDS a little more obvious than the old Flex + BlazeDS pair.
> >
> > What do you think?
> >
> > Right now the Flex project seems like we’re keeping the lights on in an
> > empty building and I doubt things will improve soon. Starting to move the
> > things we want to keep on maintaining to Royale sounds like a good thing
> to
> > to.
> > Perhaps even a stripped down version of the mavenizer.
> >
> > Chris
> >
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>


Re: Problem with standardization of the new Bead ComboBoxItemByField

2020-06-18 Thread Raúl Núñez
Perfect!

This is how it works

Thank you very much!!

El jue., 18 jun. 2020 a las 13:49, Yishay Weiss ()
escribió:

> Hi Raul,
>
> I noticed you’re now listening to the model bead and not the strand. I’m
> not sure now why that’s not working (we should check), but if the old way
> was working, you can simply replace:
>
> _model.addEventListener("selectionChanged", selectionChangedHandler);
>
> With
>
> (_strand as IEventDispatcher).addEventListener("selectionChanged",
> selectionChangedHandler);
>
> Thanks,
> Yishay
>
> From: Raúl Núñez<mailto:raudjch...@gmail.com>
> Sent: Thursday, June 18, 2020 2:29 PM
> To: dev@royale.apache.org<mailto:dev@royale.apache.org>
> Subject: Problem with standardization of the new Bead ComboBoxItemByField
>
> Hi:
>
> I commited a PR (869) with a new Bead for ComboBox: ComboBoxItemByField.
>
> Yishay said me that it could be very interesting to make some changes in
> order to use the bead in a more generic way.
>
> I've tried apply those changes but I haven't got it to work.
>
> My problem is selectionChangedHandler never launches. I have checked with
> another events as selectedItemChanged and selectedIndexChanged. Since the
> handler is never launched, the selectedValue variable is not updated.
>
>
> ComboBoxItemByField changes:
>
>
> 
> //
> //  Licensed to the Apache Software Foundation (ASF) under one or more
> //  contributor license agreements.  See the NOTICE file distributed with
> //  this work for additional information regarding copyright ownership.
> //  The ASF licenses this file to You under the Apache License, Version 2.0
> //  (the "License"); you may not use this file except in compliance with
> //  the License.  You may obtain a copy of the License at
> //
> //  http://www.apache.org/licenses/LICENSE-2.0
> //
> //  Unless required by applicable law or agreed to in writing, software
> //  distributed under the License is distributed on an "AS IS" BASIS,
> //  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> //  See the License for the specific language governing permissions and
> //  limitations under the License.
> //
>
> 
> package org.apache.royale.jewel.beads.controls.combobox
> {
>   import org.apache.royale.core.IBead;
>   import org.apache.royale.core.IStrand;
>   import org.apache.royale.collections.CollectionUtils;
>   import org.apache.royale.events.Event;
>   import org.apache.royale.collections.ICollectionView;
>   import org.apache.royale.core.ISelectionModel;
>
>   /**
>  *  The _modelItemByField class is a specialty bead that can be used
> with
>  *  any _model control. This bead allows to select an item by field
>  *
>  *  @langversion 3.0
>  *  @playerversion Flash 10.2
>  *  @playerversion AIR 2.6
>  *  @productversion Royale 0.9.4
>  */
>
>   public class ComboBoxItemByField implements IBead{
>
>   protected var _model:ISelectionModel;
>   protected var _strand:IStrand;
>
>
> /**
>  *  constructor.
>  *
>  *  @langversion 3.0
>  *  @playerversion Flash 10.2
>  *  @playerversion AIR 2.6
>  *  @productversion Royale 0.9.4
>  */
>   public function ComboBoxItemByField()
> {
> }
>
> /**
>  *  @copy org.apache.royale.core.IBead#strand
>  *
>  *  @langversion 3.0
>  *  @playerversion Flash 10.2
>  *  @playerversion AIR 2.6
>  *  @productversion Royale 0.9.7
>  */
> public function set strand(value:IStrand):void
> {
> _strand = value;
> _model = _strand.getBeadByType(ISelectionModel) as
> ISelectionModel;
> _model.addEventListener("selectionChanged"
> , selectionChangedHandler);
> updateHost();
> }
>
> private var _valueField:String;
> /**
>  *  The string that will be used for comparison field name
>  *
>  *  @langversion 3.0
>  *  @playerversion Flash 10.2
>  *  @playerversion AIR 2.6
>  *  @productversion Royale 0.9.4
>  */
> public function get valueField():String
> {
> return _valueField;
> }
> public function set valueField(value:String):void
> {
> _valueField = value;
> updateHost();

Problem with standardization of the new Bead ComboBoxItemByField

2020-06-18 Thread Raúl Núñez
Hi:

I commited a PR (869) with a new Bead for ComboBox: ComboBoxItemByField.

Yishay said me that it could be very interesting to make some changes in
order to use the bead in a more generic way.

I've tried apply those changes but I haven't got it to work.

My problem is selectionChangedHandler never launches. I have checked with
another events as selectedItemChanged and selectedIndexChanged. Since the
handler is never launched, the selectedValue variable is not updated.


ComboBoxItemByField changes:


//
//  Licensed to the Apache Software Foundation (ASF) under one or more
//  contributor license agreements.  See the NOTICE file distributed with
//  this work for additional information regarding copyright ownership.
//  The ASF licenses this file to You under the Apache License, Version 2.0
//  (the "License"); you may not use this file except in compliance with
//  the License.  You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//

package org.apache.royale.jewel.beads.controls.combobox
{
  import org.apache.royale.core.IBead;
  import org.apache.royale.core.IStrand;
  import org.apache.royale.collections.CollectionUtils;
  import org.apache.royale.events.Event;
  import org.apache.royale.collections.ICollectionView;
  import org.apache.royale.core.ISelectionModel;

  /**
 *  The _modelItemByField class is a specialty bead that can be used with
 *  any _model control. This bead allows to select an item by field
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 */

  public class ComboBoxItemByField implements IBead{

  protected var _model:ISelectionModel;
  protected var _strand:IStrand;


/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 */
  public function ComboBoxItemByField()
{
}

/**
 *  @copy org.apache.royale.core.IBead#strand
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.7
 */
public function set strand(value:IStrand):void
{
_strand = value;
_model = _strand.getBeadByType(ISelectionModel) as
ISelectionModel;
_model.addEventListener("selectionChanged"
, selectionChangedHandler);
updateHost();
}

private var _valueField:String;
/**
 *  The string that will be used for comparison field name
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 */
public function get valueField():String
{
return _valueField;
}
public function set valueField(value:String):void
{
_valueField = value;
updateHost();
}

private var _selectedValue:*;

/**
 *  Any kind of object to perform the comparison or select
 *  the item with this value in the field.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 */
public function get selectedValue():*{
return _selectedValue;
}

public function set selectedValue(value:*):void{
_selectedValue = value;
updateHost();
}

/**
 *  This bead allows update the selected item of the _model
through the entered field
 */
protected function updateHost():void
{
if(_model && valueField != "" && selectedValue != null){
var aux:* = CollectionUtils
.getItemByField(_model.dataProvider as ICollectionView
,valueField,selectedValue);
if(aux == null){
_model.selectedItem = null;
_model.selectedIndex = -1;
} else if (aux!==_model.selectedItem){
_model.selectedItem = aux;
}
}
}

/**
 *  Select the right item for the _model.
 *
 *  @param event
 */
protected function selectionChangedHandler(event:Event):void{
if(valueField != "" && 

Re: Performance in lists

2020-05-05 Thread Raúl Núñez
Hi:

Yishay -> debug mode
Alex: Virtual List Jewel

Anyway, my problem was in the height of Virtual List. With 100% height, all
items in the list are displayed. If I use a fixed height, performance is
good.

Thanks!!

El lun., 4 may. 2020 a las 21:27, Alex Harui ()
escribió:

> Which list? Mx, spark, jewel, basic?
>
> Get Outlook for Android<https://aka.ms/ghei36>
>
> 
> From: Yishay Weiss 
> Sent: Monday, May 4, 2020 11:38:02 AM
> To: dev@royale.apache.org 
> Subject: RE: Performance in lists
>
> Out of curiosity, are you running the debug or the release version?
>
> From: Raúl Núñez<mailto:raudjch...@gmail.com>
> Sent: Monday, May 4, 2020 9:28 PM
> To: dev@royale.apache.org<mailto:dev@royale.apache.org>
> Subject: Performance in lists
>
> Hi all,
> we are setting a List with virtual layout and we're getting bad
> performance.We have around 109 rows. And each item renderer has 18 labels
> with bindings (so around 1900-2000 labels in screen). Doesn't seems many
> labels to experience a bad performance (we'll reduce as we develop, this is
> just a test).
>
> To show this list first time Royale needs 4sec, what seems many time. If I
> remove the bindings and set up on dataChange in goes to 3sec.
>
> Couldn't check if new render initializers has something to do with this
> problem, since are parte of the component. Maybe someone could give us a
> clue or check if there's something that can generate such bad performance.
>
> I think Flex was not having that problem (I can't ensure since didn't try a
> similar example in Flex).
>
> Thanks.
>
>


Performance in lists

2020-05-04 Thread Raúl Núñez
Hi all,
we are setting a List with virtual layout and we're getting bad
performance.We have around 109 rows. And each item renderer has 18 labels
with bindings (so around 1900-2000 labels in screen). Doesn't seems many
labels to experience a bad performance (we'll reduce as we develop, this is
just a test).

To show this list first time Royale needs 4sec, what seems many time. If I
remove the bindings and set up on dataChange in goes to 3sec.

Couldn't check if new render initializers has something to do with this
problem, since are parte of the component. Maybe someone could give us a
clue or check if there's something that can generate such bad performance.

I think Flex was not having that problem (I can't ensure since didn't try a
similar example in Flex).

Thanks.


Fwd: Performance in lists

2020-05-04 Thread Raúl Núñez
Hi all,

We are setting a List with virtual layout and we're getting bad
performance.We have around 109 rows. And each item renderer has 18 labels
with bindings (so around 1900-2000 labels in screen). Doesn't seems many
labels to experience a bad performance (we'll reduce as we develop, this is
just a test).

To show this list first time Royale needs 4sec, what seems many time. If I
remove the bindings and set up on dataChange in goes to 3sec.

Couldn't check if new render initializers has something to do with this
problem, since are parte of the component. Maybe someone could give us a
clue or check if there's something that can generate such bad performance.

I think Flex was not having that problem (I can't ensure since didn't try a
similar example in Flex).

Thanks.


addAll in ArrayList

2020-02-12 Thread Raúl Núñez
Hi:

Why is not implemented addAll method in ArrayList class??

Best Regards!!


Re: URLRequest

2019-01-30 Thread Raúl Núñez
Hi:

Thank you very much for the help.

Finally I am using this:

BrowserWindow.open(" www.[my-domain].com?parameter=" + key;

The only downside is that I'm passing the parameters by GET.

Regards!!

El mié., 30 ene. 2019 a las 12:45, Frost, Andrew ()
escribió:

> Hi
>
> I'd proposed a change for URLLoader to allow you to post binary data [1],
> but actually there's already a class "URLBinaryLoader" which had this
> functionality already... so probably we need to create a similar class,
> "URLVariablesLoader" perhaps.
>
> For the URLVariables class, it looks like this isn't implemented yet, but
> it should be fairly straightforward as all you need to do is url-encode the
> string and then the 'data' in your URL request can be set via the
> 'toString()' method, which I guess will need casting to an Object.
>
> Worth looking at the documentation for the Flash version of URLVariables
> [2]; basically, you pass it your string (in the constructor or in the
> 'decode' method) and then the "toString()" method should return the
> URL-encoded string per the example in [2]. That string can just be used in
> the parameter that's passed in to the XMLHttpRequest 'send()' call - see
> the "post" example in [3].
>
> Hope that helps!
>
> thanks
>
> Andrew
>
>
> [1] https://github.com/apache/royale-asjs/pull/345
> [2]
> https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLVariables.html
> [3] https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send
>
>
> -Original Message-
> From: Olaf Krueger [mailto:m...@olafkrueger.net]
> Sent: 30 January 2019 08:23
> To: dev@royale.apache.org
> Subject: [EXTERNAL] Re: URLRequest
>
> Hi,
> unfortunately, I am not sure about URLLoader.
> But you may want to give HTTPService a try, something like this [1].
> You should find some examples here anywhere [2].
>
> Maybe this helps,
> Olaf
>
> [1]
> var service:HTTPService = new HTTPService(); service.url = "...";
> service.method = "POST";
>
> //var header:HTTPHeader = new HTTPHeader(...); //service.contentType =
> "..."; //service.headers = new Array(header);
>
> service.contentData = "...";
> service.addEventListener("complete", onComplete);
> service.addEventListener("ioError", onFault); service.send();
>
> [2]
>
> https://clicktime.symantec.com/3XDYEYEvRP6yiHaXvjgdzx77Vc?u=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Ftree%2Fdevelop%2Fexamples%2Froyale
>
>
>
> --
> Sent from:
> https://clicktime.symantec.com/37Ro7ZbXBwWL17uhQUQPE6v7Vc?u=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2F
>


URLRequest

2019-01-29 Thread Raúl Núñez
Hi:

I am using URLRequest to send information to a web. But I do not know how
to fill the property: data.

This is my code:

var urlRequest: URLRequest = new URLRequest("www.[my-domain].com");
var urlLoader: URLLoader = new  URLLoader();
var urlVariables: URLVariables = new URLVariables("parameter=" + key);
urlRequest.method = HTTPConstants.POST;
urlRequest.data = urlVariables;
urlLoader.load(urlRequest);

I can't set data with urlVariables.

Error: Implicit coercion of a value of type URLVariables to an unrelated
type Object.

Best regards!!