You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/12/15 18:20:35 UTC

[GitHub] [royale-asjs] yishayw opened a new issue #1006: mx:TreeItemRenderer cannot be used as a base class in mxml

yishayw opened a new issue #1006:
URL: https://github.com/apache/royale-asjs/issues/1006


   In this app
   
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <s:Application 
   	xmlns:fx="http://ns.adobe.com/mxml/2009"
   	xmlns:s="library://ns.apache.org/royale/spark"
   	xmlns:mx="library://ns.apache.org/royale/mx"
   	creationComplete="init()"
   	xmlns:comp="components.*"
   	>
   	<fx:Script>
   		<![CDATA[
   
   			import components.MyComp;
   			
   			private function init():void
   			{
   				var myComp:MyComp = new MyComp();
   				addElement(myComp);
   				trace(myComp.nested);
   			}
   
   		]]>
   	</fx:Script>		
   </s:Application>
   ```
   
   with this component
   
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <mx:TreeItemRenderer
   	xmlns:fx="http://ns.adobe.com/mxml/2009"
   	xmlns:s="library://ns.apache.org/royale/spark"
   	xmlns:mx="library://ns.apache.org/royale/mx"
   	implements="org.apache.royale.core.IMXMLDocument"
   	>
   	<s:Group>
   		<s:Group id="nested"/>
   	</s:Group>
   </mx:TreeItemRenderer>
   
   ```
   
   trace says myComp.nested is undefined.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] aharui commented on issue #1006: mx:TreeItemRenderer cannot be used as a base class in mxml

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #1006:
URL: https://github.com/apache/royale-asjs/issues/1006#issuecomment-745800404


   Interesting...   Flex doesn't seem to specify a defaultProperty for TreeItemRenderer.  IMO, this might be an unsupported use.  TreeItemRenderer was used in MXML for setting properties, but AFAICT, there was no support for additional children.  Spark has an MXTreeItemRenderer that could be used as the top tag in MXML, IIRC.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] aharui commented on issue #1006: mx:TreeItemRenderer cannot be used as a base class in mxml

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #1006:
URL: https://github.com/apache/royale-asjs/issues/1006#issuecomment-745755721


   TreeItemRenderer seems to extend UIComponent which has all of the things needed to support MXML, so not obvious why it isn't working.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] yishayw commented on issue #1006: mx:TreeItemRenderer cannot be used as a base class in mxml

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #1006:
URL: https://github.com/apache/royale-asjs/issues/1006#issuecomment-745810971


   Ur right, legacy app was using spark one, sorry for the noise.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] yishayw edited a comment on issue #1006: mx:TreeItemRenderer cannot be used as a base class in mxml

Posted by GitBox <gi...@apache.org>.
yishayw edited a comment on issue #1006:
URL: https://github.com/apache/royale-asjs/issues/1006#issuecomment-745740748


   It looks like the mxmlDescriptor needs to be generated by the compiler. For that to happen we need to have TreeItemRenderer implement IMXMLDocument and a [DefaultProperty("mxmlContent")] needs to be added. TreeItemRenderer as it is implemented relies on there not being children for proper layout and sizing. So there might be a refactor needed. As a workaround I will simply create a custom TreeItemRenderer in my app.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] yishayw commented on issue #1006: mx:TreeItemRenderer cannot be used as a base class in mxml

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #1006:
URL: https://github.com/apache/royale-asjs/issues/1006#issuecomment-745788462


   >For that to happen we need to have TreeItemRenderer implement IMXMLDocument and a [DefaultProperty("mxmlContent")] needs to be added.
   
   I didn't notice UIComponent already implements IMXMLDocument , but adding [DefaultProperty("mxmlContent")]  does seem to be necessary.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] yishayw commented on issue #1006: mx:TreeItemRenderer cannot be used as a base class in mxml

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #1006:
URL: https://github.com/apache/royale-asjs/issues/1006#issuecomment-745740748


   It looks like the mxmlDescriptor needs to be generated by the server. For that to happen we need to have TreeItemRenderer implement IMXMLDocument and a [DefaultProperty("mxmlContent")] needs to be added. TreeItemRenderer as it is implemented relies on there not being children for proper layout and sizing. So there might be a refactor needed. As a workaround I will simply create a custom TreeItemRenderer in my app.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] yishayw closed issue #1006: mx:TreeItemRenderer cannot be used as a base class in mxml

Posted by GitBox <gi...@apache.org>.
yishayw closed issue #1006:
URL: https://github.com/apache/royale-asjs/issues/1006


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org