Custom control

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom control

De Carli Gustavo
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';
}

}
}
Reply | Threaded
Open this post in threaded view
|

Re: Custom control

Alex Harui-2

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 <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Saturday, January 11, 2020 at 10:33 PM
To: "[hidden email]" <[hidden email]>
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"

 

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';

 

}

 



 

}

 

}