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/05/01 13:28:25 UTC

[GitHub] [royale-asjs] nihavend opened a new issue #819: ADG inner components can not inherit data object and tooltip is not displayed

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


   There are two bugs in here.
   1. data is not passed to inner component
   2. button tooltip is not displayed
   
   Here is the source code for test case : 
   
   > FindBug.mxm
   
   ```
   <?xml version="1.0" encoding="latin5" ?>
   
   <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"
   			   height="100" width="200"
   			   currentState="anaSayfaState"
   			   xmlns:mtest="main.mtest.*" 
   			   creationComplete="group1_creationCompleteHandler(event)">
   
   	
   	<fx:Script>
   		<![CDATA[
   			import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
   			import mx.collections.ArrayCollection;
   			import mx.events.FlexEvent;
   			import mx.collections.XMLListCollection;
   			import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
   
   			
   			[Bindable]
   			public var jobListXmlCollection:XMLListCollection = new XMLListCollection();
   			
   			public var jobListXml:XML = 
   				<jobList netTreeEnablable="false" netTreeDisablable="false" >
   				  <genericJob  Id="1" groupId="iot-insights">
   					<baseJobInfos>
   	  					<jsName>SENSORDATA_HOURLY</jsName>
   					</baseJobInfos>
   				  </genericJob>
   				</jobList>;
   			
   			protected function group1_creationCompleteHandler(event:FlexEvent):void {
   				jobListXmlCollection.source = jobListXml.children();
   			}
   
   			public function getJsName(item:XML, column:AdvancedDataGridColumn):String {
   				return item.baseJobInfos.jsName;
   			}
   
   		]]>
   	</fx:Script>
   	
   	<mx:Panel title="AdvancedDataGrid Control Example"
   			  paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
   			  height="200" width="350">
   		
   		<mx:AdvancedDataGrid id="pinaraJobList" width="100%" height="100%" dataProvider="{jobListXmlCollection}">        
     
   			<mx:columns>
   				
   				<mx:AdvancedDataGridColumn labelFunction="getJsName" headerText="Job Name" width="150"/>
   				
   				<mx:AdvancedDataGridColumn headerText="Manage" width="150">
   					<mx:itemRenderer>
   						<fx:Component>
   							<mtest:adg_custom selectedGroupId="1" /> <!--RO: {outerDocument.selectedGroupId} -->
   						</fx:Component>
   					</mx:itemRenderer>
   				</mx:AdvancedDataGridColumn>
   			
   			</mx:columns>
   			
   		</mx:AdvancedDataGrid>
   		
   	</mx:Panel>
   	
   </s:Application>
   
   ```
   
   > adg_custom.mxml
   
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
   					xmlns:s="library://ns.apache.org/royale/spark" 
   					clipAndEnableScrolling="true"
   					xmlns:mx="library://ns.apache.org/royale/mx" 
   					>
   	<fx:Declarations>
   		<!-- Place non-visual elements (e.g., services, value objects) here -->
   	</fx:Declarations>
   	
   	<fx:Script>
   		<![CDATA[
   			
   			
   			[Bindable]
   			public var selectedGroupId:String;
   			
   			protected function getLabel():String {
   				return data.baseJobInfos.jsName;
   			}
   			
   		]]>
   	</fx:Script>
   	
   		
   	<s:layout>
   		<s:HorizontalLayout />
   	</s:layout>
   	
   	<mx:Button label="{getLabel()}" toolTip="{getLabel()}"/>
   	
   	<s:Button label="{getLabel()}" toolTip="{getLabel()}"/>
   	
   	
   </s:MXAdvancedDataGridItemRenderer>
   
   ```


----------------------------------------------------------------
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 #819: ADG inner components can not inherit data object and tooltip is not displayed

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


   I didn't actually run this example, but the first thing I looked for was the use of the data property.  In Royale, the JS runtime does not know about fancy types like XML and Proxy so they must be explicitly cast/typed.   So try something like:
   
   ``` (data as XML).baseJobInfos.jsName; ```
   


----------------------------------------------------------------
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] nihavend commented on issue #819: ADG inner components can not inherit data object and tooltip is not displayed

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


   @aharui 
   I am changing the test case source code to make it more clear and similar to original application. Tooltip has still bugs but I leave it for another thread and it is working for this case.
   
   Currently the two images are displayed in grid but only one has the value true for visibility which is "Enable"
   
   Note : I can share the flex original source on demand which is working as expected.
   
   ![image](https://user-images.githubusercontent.com/5983818/80911893-dbe79780-8d41-11ea-9934-1df2072438a8.png)
   
   > FindBug.mxm
   
   ```
   <?xml version="1.0" encoding="latin5" ?>
   
   <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"
   			   height="100%" width="100%"
   			   currentState="anaSayfaState"
   			   xmlns:mtest="main.mtest.*" 
   			   creationComplete="group1_creationCompleteHandler(event)">
   
   	
   	<fx:Script>
   		<![CDATA[
   			import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
   			import mx.collections.ArrayCollection;
   			import mx.events.FlexEvent;
   			import mx.collections.XMLListCollection;
   			import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
   
   			
   			[Bindable]
   			public var jobListXmlCollection:XMLListCollection = new XMLListCollection();
   			
   			public var jobListXml:XML = 
   				<jobList netTreeEnablable="false" netTreeDisablable="false" >
   				  <genericJob  Id="1" groupId="iot-insights">
   					<baseJobInfos>
   	  					<jsName>SENSORDATA_HOURLY</jsName>
   					</baseJobInfos>
   					<visualParams>
   						<statu>0</statu>
   						<commandabilityParams>
   							<isPausable>true</isPausable>
   						  	<isResumable>false</isResumable>
   						  	<isRetryable>false</isRetryable>
   						  	<isSkipable>false</isSkipable>
   						  	<isStartable>true</isStartable>
   						  	<isStopable>false</isStopable>
   						  	<isSuccessable>false</isSuccessable>
   						  	<isDisablable>false</isDisablable>
   						  	<isEnablable>true</isEnablable>
   						</commandabilityParams>					
   					</visualParams>
   				  </genericJob>
   				</jobList>;
   			
   			protected function group1_creationCompleteHandler(event:FlexEvent):void {
   				jobListXmlCollection.source = jobListXml.children();
   			}
   
   			public function getJsName(item:XML, column:AdvancedDataGridColumn):String {
   				return item.baseJobInfos.jsName;
   			}
   
   		]]>
   	</fx:Script>
   	
   	<mx:Panel title="AdvancedDataGrid Control Example"
   			  paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
   			  height="200" width="350">
   		
   		<mx:AdvancedDataGrid id="pinaraJobList" width="100%" height="100%" dataProvider="{jobListXmlCollection}">        
     
   			<mx:columns>
   				
   				<mx:AdvancedDataGridColumn labelFunction="getJsName" headerText="Job Name" width="150"/>
   				
   				<mx:AdvancedDataGridColumn headerText="Manage" width="150">
   					<mx:itemRenderer>
   						<fx:Component>
   							<mtest:adg_custom selectedGroupId="1" /> <!--RO: {outerDocument.selectedGroupId} -->
   						</fx:Component>
   					</mx:itemRenderer>
   				</mx:AdvancedDataGridColumn>
   			
   			</mx:columns>
   			
   		</mx:AdvancedDataGrid>
   		
   	</mx:Panel>
   	
   </s:Application>
   ```
   
   
   > adg_custom.mxml
   
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
   					xmlns:s="library://ns.apache.org/royale/spark" 
   					clipAndEnableScrolling="true"
   					xmlns:mx="library://ns.apache.org/royale/mx" 
   					xmlns:mtest="main.mtest.*" 
   					>
   	<fx:Declarations>
   		<!-- Place non-visual elements (e.g., services, value objects) here -->
   	</fx:Declarations>
   	
   	<fx:Script>
   		<![CDATA[
   			
   			
   			[Bindable]
   			public var selectedGroupId:String;
   			
   			
   		]]>
   	</fx:Script>
   	
   	<mtest:adg_image id="manageButtonGroup" data="{data}" selectedGroupId="{selectedGroupId}" />
   	
   </s:MXAdvancedDataGridItemRenderer>
   ```
   
   > adg_image.mxml
   
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
   		  xmlns:s="library://ns.apache.org/royale/spark" 
   		  xmlns:mx="library://ns.apache.org/royale/mx">
   	<fx:Declarations>
   		<!-- Place non-visual elements (e.g., services, value objects) here -->
   	</fx:Declarations>
   	
   	<fx:Script>
   		<![CDATA[
   			
   			[Bindable]
   			public var data:XML;
   			
   			[Bindable]
   			public var selectedGroupId:String;	
   
   			public function executeJobCommand(event:MouseEvent, jobId:String, tlosName:String):void {
   				trace(jobId);
   				trace(tlosName);
   			}
   			
   			// {trace('XML : ' + XMLList(XML(data.stateInfos.LiveStateInfos).children())[0].StateName)}
   		]]>
   	</fx:Script>
   	
   	<s:layout>
   		<s:HorizontalLayout />
   	</s:layout>
   	
   	<s:Image id="disableJob" source="images/disableJob.jpg" toolTip="Disable" width="23" height="23" 
   			 includeInLayout="{data.visualParams.commandabilityParams.isDisablable == true}" buttonMode="true"
   			 visible="{data.visualParams.commandabilityParams.isDisablable == true}"
   			 click="executeJobCommand(event, data.@Id, data.Id)" />
   	
   	<s:Image id="enableJob" source="images/enableJob.jpg" toolTip="Enable" width="23" height="23"
   			 includeInLayout="{data.visualParams.commandabilityParams.isEnablable == true}" buttonMode="true"
   			 visible="{data.visualParams.commandabilityParams.isEnablable == true}"
   			 click="executeJobCommand(event, data.@Id, data.Id)" />
   	
   </s:Group>
   ```
   
   


----------------------------------------------------------------
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] nihavend commented on issue #819: ADG inner components can not inherit data object and tooltip is not displayed

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


   How do I know ? Maybe I am compiling and debugging the code ?


----------------------------------------------------------------
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] nihavend edited a comment on issue #819: ADG inner components can not inherit data object and tooltip is not displayed

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


   @aharui 
   I am changing the test case source code to make it more clear and similar to original application. Tooltip has still bugs but I leave it for another thread and it is working for this case.
   
   Currently the two images are displayed in grid but only one has the value true for visibility which is "Enable"
   
   Note : I can share the flex original source on demand which is working as expected.
   
   live test [click](http://www.tlos.com.tr/royale_bugs/819/js-debug/)
   
   ![image](https://user-images.githubusercontent.com/5983818/80911893-dbe79780-8d41-11ea-9934-1df2072438a8.png)
   
   > FindBug.mxm
   
   ```
   <?xml version="1.0" encoding="latin5" ?>
   
   <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"
   			   height="100%" width="100%"
   			   currentState="anaSayfaState"
   			   xmlns:mtest="main.mtest.*" 
   			   creationComplete="group1_creationCompleteHandler(event)">
   
   	
   	<fx:Script>
   		<![CDATA[
   			import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
   			import mx.collections.ArrayCollection;
   			import mx.events.FlexEvent;
   			import mx.collections.XMLListCollection;
   			import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
   
   			
   			[Bindable]
   			public var jobListXmlCollection:XMLListCollection = new XMLListCollection();
   			
   			public var jobListXml:XML = 
   				<jobList netTreeEnablable="false" netTreeDisablable="false" >
   				  <genericJob  Id="1" groupId="iot-insights">
   					<baseJobInfos>
   	  					<jsName>SENSORDATA_HOURLY</jsName>
   					</baseJobInfos>
   					<visualParams>
   						<statu>0</statu>
   						<commandabilityParams>
   							<isPausable>true</isPausable>
   						  	<isResumable>false</isResumable>
   						  	<isRetryable>false</isRetryable>
   						  	<isSkipable>false</isSkipable>
   						  	<isStartable>true</isStartable>
   						  	<isStopable>false</isStopable>
   						  	<isSuccessable>false</isSuccessable>
   						  	<isDisablable>false</isDisablable>
   						  	<isEnablable>true</isEnablable>
   						</commandabilityParams>					
   					</visualParams>
   				  </genericJob>
   				</jobList>;
   			
   			protected function group1_creationCompleteHandler(event:FlexEvent):void {
   				jobListXmlCollection.source = jobListXml.children();
   			}
   
   			public function getJsName(item:XML, column:AdvancedDataGridColumn):String {
   				return item.baseJobInfos.jsName;
   			}
   
   		]]>
   	</fx:Script>
   	
   	<mx:Panel title="AdvancedDataGrid Control Example"
   			  paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10"
   			  height="200" width="350">
   		
   		<mx:AdvancedDataGrid id="pinaraJobList" width="100%" height="100%" dataProvider="{jobListXmlCollection}">        
     
   			<mx:columns>
   				
   				<mx:AdvancedDataGridColumn labelFunction="getJsName" headerText="Job Name" width="150"/>
   				
   				<mx:AdvancedDataGridColumn headerText="Manage" width="150">
   					<mx:itemRenderer>
   						<fx:Component>
   							<mtest:adg_custom selectedGroupId="1" /> <!--RO: {outerDocument.selectedGroupId} -->
   						</fx:Component>
   					</mx:itemRenderer>
   				</mx:AdvancedDataGridColumn>
   			
   			</mx:columns>
   			
   		</mx:AdvancedDataGrid>
   		
   	</mx:Panel>
   	
   </s:Application>
   ```
   
   
   > adg_custom.mxml
   
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
   					xmlns:s="library://ns.apache.org/royale/spark" 
   					clipAndEnableScrolling="true"
   					xmlns:mx="library://ns.apache.org/royale/mx" 
   					xmlns:mtest="main.mtest.*" 
   					>
   	<fx:Declarations>
   		<!-- Place non-visual elements (e.g., services, value objects) here -->
   	</fx:Declarations>
   	
   	<fx:Script>
   		<![CDATA[
   			
   			
   			[Bindable]
   			public var selectedGroupId:String;
   			
   			
   		]]>
   	</fx:Script>
   	
   	<mtest:adg_image id="manageButtonGroup" data="{data}" selectedGroupId="{selectedGroupId}" />
   	
   </s:MXAdvancedDataGridItemRenderer>
   ```
   
   > adg_image.mxml
   
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
   		  xmlns:s="library://ns.apache.org/royale/spark" 
   		  xmlns:mx="library://ns.apache.org/royale/mx">
   	<fx:Declarations>
   		<!-- Place non-visual elements (e.g., services, value objects) here -->
   	</fx:Declarations>
   	
   	<fx:Script>
   		<![CDATA[
   			
   			[Bindable]
   			public var data:XML;
   			
   			[Bindable]
   			public var selectedGroupId:String;	
   
   			public function executeJobCommand(event:MouseEvent, jobId:String, tlosName:String):void {
   				trace(jobId);
   				trace(tlosName);
   			}
   			
   			// {trace('XML : ' + XMLList(XML(data.stateInfos.LiveStateInfos).children())[0].StateName)}
   		]]>
   	</fx:Script>
   	
   	<s:layout>
   		<s:HorizontalLayout />
   	</s:layout>
   	
   	<s:Image id="disableJob" source="images/disableJob.jpg" toolTip="Disable" width="23" height="23" 
   			 includeInLayout="{data.visualParams.commandabilityParams.isDisablable == true}" buttonMode="true"
   			 visible="{data.visualParams.commandabilityParams.isDisablable == true}"
   			 click="executeJobCommand(event, data.@Id, data.Id)" />
   	
   	<s:Image id="enableJob" source="images/enableJob.jpg" toolTip="Enable" width="23" height="23"
   			 includeInLayout="{data.visualParams.commandabilityParams.isEnablable == true}" buttonMode="true"
   			 visible="{data.visualParams.commandabilityParams.isEnablable == true}"
   			 click="executeJobCommand(event, data.@Id, data.Id)" />
   	
   </s:Group>
   ```
   
   


----------------------------------------------------------------
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 #819: ADG inner components can not inherit data object and tooltip is not displayed

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


   More than once your test cases do not compile for me, so I am trying to take one minute to make sure the test case has a chance of working correctly before I spend time on it.
   
   Since you have debugged into it, is the MXAdvancedDGIR data setter getting called?  Are there any exceptions being thrown (and possibly caught)?


----------------------------------------------------------------
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] nihavend commented on issue #819: ADG inner components can not inherit data object and tooltip is not displayed

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


   All the cases I provided should be compiled. I never send you the cases without compiling and testing. Of course I may miss something. If that is the case you should let me know so I can fix the issue. 
   This is not the right approach.
   No exception thrown.


----------------------------------------------------------------
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 #819: ADG inner components can not inherit data object and tooltip is not displayed

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


   How do you know data is undefined?
   
   In looking at the code quickly again (not actually compiling and running it), no dataField or labelFunction is set on the column with the custom renderer and the getLabel in the custom renderer is not Bindable.


----------------------------------------------------------------
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] nihavend closed issue #819: ADG inner components can not inherit data object

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


   


----------------------------------------------------------------
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] nihavend commented on issue #819: ADG inner components can not inherit data object and tooltip is not displayed

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


   This is what I am going to check next after getting "data" not undefined @aharui 
   


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