That's right. We support static setters (attached properties) on includes because you don't necessarily know what container the included component might be placed in. But we don't support instance setters because we assume that you will simply set them within the include itself.
It is possible to change this behavior such that instance setters are supported on an include - but is there any reason you can't put the attributes on the root element of the include instead? Greg On Jul 1, 2010, at 5:47 PM, Michael Allman wrote: > Oh, yeah. I got confused with width and height. It's a flex thing. > > So I just tried > > <wtkx:include src="whatever.wtkx" preferredWidth="100" preferredHeight="100"/> > > and that doesn't work either. I get a message saying "Instance property > setters are not supported for wtkx:include tag." > > What do you think? > > Cheers, > > Michael > > On Thu, 1 Jul 2010, Greg Brown wrote: > >> Setting properties on an include should work fine. However, if you want to >> specify the size of a component, you should generally use preferredWidth and >> preferredHeight rather than width and height. It is up to the container to >> determine if/how the preferred values should be applied. >> >> On Jul 1, 2010, at 8:53 AM, Michael Allman wrote: >> >>> Hi, >>> >>> I'd like to set some properties on the root element of an included wtkx. A >>> classic case is setting width and height. How might I go about doing this? >>> >>> <wtkx:include src="whatever.wtkx" width="100" height="100"/> >>> >>> does not work. >>> >>> Cheers, >>> >>> Michael >>> >>
