In Royale, only components which implement IMXMLDocument can be used as a base class for an MXML file. If this is something you are looking to do a lot, you have two options: 1. Subclass the components and implement IMXMLDocument. 2. Use an ActionScript class instead of an MXML file.
For things like this, I tend to use AS files anyway because they are lighter. HTH, Harbs P.S. I would advocate for a compiler error when using a class which doesn’t impelement IMXMLDocument as a base for MXML. > On Feb 25, 2019, at 2:33 PM, Olaf Krueger <[email protected]> wrote: > > Hi, > I am trying to create a custom component which should just wrap a Royale > component. > As soon as I set a property via MXML, I got a TypeError [1]. > > I this case it's a Jewel button, but I got the same error with a TextButton > when setting the "text" property. > > This is a screenshot of the entire scenario [2]. > > Couldn't we use MXML properties that way? > > Thanks, > Olaf > > [1] TypeError: this.generateMXMLAttributes is not a function > [2] https://snag.gy/4XcBhf.jpg > > > > > > -- > Sent from: http://apache-royale-development.20373.n8.nabble.com/
