I found the problem, the IDE didn't import :

import org.apache.royale.reflection.registerClassAlias;

Thank you all for your input!

David

On Wed, 10 Mar 2021 at 16:26, Maria Jose Esteve <[email protected]> wrote:

> I set them in the "initialize" but come on ...
>
> Did it already work for you? Do you still have the error?
>
>
>
> Hiedra
>
>
>
> *De:* David Slotemaker de Bruine <[email protected]>
> *Enviado el:* miércoles, 10 de marzo de 2021 13:39
> *Para:* [email protected]
> *Asunto:* Re: Register Class error
>
>
>
> Never too late with help! :)
>
>
>
> Yes I have the Bead in Application.mxml along with the call in the
> ApplicationComplete event handler:
>
>
>
> <fx:Script>
> <![CDATA[
> import org.apache.royale.collections.ArrayList;
>
> private function onApplicationComplete(event:Event):void {
>
> registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
>             }
> ]]>
> </fx:Script>
>
>
>
> Thats correct isn't it? Thats How I have it in other projects.
>
>
>
> D
>
>
>
> On Wed, 10 Mar 2021 at 12:33, Maria Jose Esteve <[email protected]> wrote:
>
> Hello, ... I don't know if I'm late ...
> Do you have the bead "<js: ClassAliasBead />" included?
>
> Hiedra
> -----Mensaje original-----
> De: David Slotemaker de Bruine <[email protected]>
> Enviado el: lunes, 8 de marzo de 2021 14:13
> Para: [email protected]
> Asunto: Register Class error
>
> Hi All,
>
> I am trying to register the Array class with
>
> registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
>
> But I am getting:
>
> Error: Call to a possibly undefined method registerClassAlias.
> :
>  registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
>
> I have it working in other projects just fine.
>
> The compiler options are:
>
> -theme=${royalelib}/themes/Jewel-Light-NoFlat-Primary-Red-Theme/src/main/resources/defaults.css
> -html-template=src/resources/jewel-index-template.html
> -js-default-initializers=true
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
> -keep-code-with-metadata=Inject
> -js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
> -compiler.exclude-defaults-css-files=MXRoyaleJS.swc:defaults.css
> +configname=flex   -js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
>
> Any ideas?
>
> David
>
>
>
>
> --
>
> *David Slotemaker de Bruïne*
> *Head of Educational Robotics*
>
>
>
> Av. Sarriá, 130 - 08017 Barcelona
> <https://maps.google.com/?q=Av.+Sarri%C3%A1,+130+-+08017+Barcelona&entry=gmail&source=g>
>
>
> T. +34 932 523 729 ext. 135
>
> [email protected]
>


-- 

*David Slotemaker de Bruïne*
*Head of Educational Robotics*



Av. Sarriá, 130 - 08017 Barcelona
<https://maps.google.com/?q=Av.+Sarri%C3%A1,+130+-+08017+Barcelona&entry=gmail&source=g>


T. +34 932 523 729 ext. 135

[email protected]

Reply via email to