You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by De Carli Gustavo <gu...@gmail.com> on 2020/01/12 06:33:13 UTC

Custom control

Hi, is posible generate one custom control mxml, Thanks

Show this mensage !
This tag could not be resolved to an ActionScript class. It will be ignored.

CustomButton.mxml

<?xml version="1.0" encoding="utf-8"?>
<mx:Button xmlns:fx="http://ns.adobe.com/mxml/2009"
mlns:mx="library://ns.adobe.com/flex/mx">

</mx:Button>


This yes it`s ok

package com{

import mx.controls.Button;
import flash.events.Event;
import mx.controls.Alert;

public class ButtonAS extends Button
{
public function ButtonAS()
{
super();
this.label = 'Button AS';
}

}
}

Re: Custom control

Posted by Alex Harui <ah...@adobe.com>.
Hi,

Looks like you are using xmlns:mx=”library://ns.adobe.com/flex/mx”
These need to be changed for Royale to be xmlns:mx=”library://ns.apache.org/royale/mx”

We can’t guarantee that all custom subclasses that worked in Flex will work in Royale.  Those that override lifecycle methods (commitProperties, measure, updateDisplayList) will probably need modification to work.  createChildren() overrides should be ok.

HTH,
-Alex

From: De Carli Gustavo <gu...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Saturday, January 11, 2020 at 10:33 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Custom control

Hi, is posible generate one custom control mxml, Thanks

Show this mensage !
This tag could not be resolved to an ActionScript class. It will be ignored.


CustomButton.mxml


<?xml version="1.0" encoding="utf-8"?>

<mx:Button
xmlns:fx="http://ns.adobe.com/mxml/2009<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Cb889d8b71e5942648fb908d797295905%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637144076154728476&sdata=pDFL93OssWvKcrGeUqWgQMdJFC0grVoLhS0JW5yX5%2Bs%3D&reserved=0>"

mlns:mx="library://ns.adobe.com/flex/mx<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fflex%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Cb889d8b71e5942648fb908d797295905%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637144076154738471&sdata=g3B2NLHskbUovI6ayUR19xQaysbxh3nPMwzYGiW%2FR08%3D&reserved=0>">



</mx:Button>



This yes it`s ok


package com{



import
mx.controls.Button;

import
flash.events.Event;

import
mx.controls.Alert;



public
class ButtonAS
extends Button

{

public
function ButtonAS()

{

super();

this.label =
'Button AS';

}




}

}