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 2021/09/28 00:22:23 UTC

[GitHub] [royale-asjs] mjesteve opened a new pull request #1153: Jewel VirtualComboBox only recognises itemRenderers assigned via className

mjesteve opened a new pull request #1153:
URL: https://github.com/apache/royale-asjs/pull/1153


   Those set through property "itemRenderer" in the mxml tag are not recognised.
   
   It can be checked in the TDJ. If we change the mapping of the ItemRenderer in the VirtualComboBox of the VirtualListsPlayGround.mxml view from className to itemRenderer tag.
   
   This is how it is now:
   
   ![image](https://user-images.githubusercontent.com/55754195/135001896-70f67cce-f19f-4f9c-a1d2-4404c3095110.png)
   ![image](https://user-images.githubusercontent.com/55754195/135001967-1f3672d5-7f71-455c-b8bd-5a62bab33d35.png)
   
   The result is:
   
   ![image](https://user-images.githubusercontent.com/55754195/135002290-333cdc38-6b27-42f0-9086-ff326993133e.png)
   
   
   If we change it to:
   ![image](https://user-images.githubusercontent.com/55754195/135001722-50ec5f5c-edf6-4b12-abcd-dc451f67da79.png)
   
   The result is:
   ![image](https://user-images.githubusercontent.com/55754195/135002225-c467b11a-fc9f-4d5d-bf1d-4c93a42e32e3.png)
   
   I have located the problem in VirtualComboBoxPopUpView by overriding the function "get list". When creating the List associated to the dropdown/popup the itemRenderer assigned to the VirtualCombobox must be mapped to it.
   (I have replicated the same function of ComboBoxPopUpView)
   
   Are the modifications correct?
   
   Thx.


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

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

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



[GitHub] [royale-asjs] mjesteve commented on pull request #1153: Jewel VirtualComboBox only recognises itemRenderers assigned via className

Posted by GitBox <gi...@apache.org>.
mjesteve commented on pull request #1153:
URL: https://github.com/apache/royale-asjs/pull/1153#issuecomment-933974256


   Hi,
   After further debugging the code, I believe that the patched code should be moved to "get list()", as it is in the ComboBoxPopUpView.as
   In the "set strand", it first executes the assignment in the parent class, "super.strand = value" which references "list" in several lines and each time it does the "get list()" it creates _list (new VirtualList()). I don't know why it doesn't save the value of _list from one call to another...
   
   ![image](https://user-images.githubusercontent.com/55754195/135944416-fd847679-492a-4276-863b-e1b579a0e85a.png)
   
   The code would look like this:
   
   ![image](https://user-images.githubusercontent.com/55754195/135943944-6b9af35e-777f-4039-ae7c-9954a753b328.png)
   
   I have found that with this implementation the _list variable takes effective value on the first call.
   What do you think?
   
   Hiedra


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

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

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



[GitHub] [royale-asjs] mjesteve commented on pull request #1153: Jewel VirtualComboBox only recognises itemRenderers assigned via className

Posted by GitBox <gi...@apache.org>.
mjesteve commented on pull request #1153:
URL: https://github.com/apache/royale-asjs/pull/1153#issuecomment-934154178


   I have added the proposed modifications in the PR #1154 


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

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

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



[GitHub] [royale-asjs] piotrzarzycki21 merged pull request #1153: Jewel VirtualComboBox only recognises itemRenderers assigned via className

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 merged pull request #1153:
URL: https://github.com/apache/royale-asjs/pull/1153


   


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

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

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



[GitHub] [royale-asjs] piotrzarzycki21 commented on a change in pull request #1153: Jewel VirtualComboBox only recognises itemRenderers assigned via className

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on a change in pull request #1153:
URL: https://github.com/apache/royale-asjs/pull/1153#discussion_r720024842



##########
File path: frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/VirtualComboBoxPopUpView.as
##########
@@ -58,6 +59,11 @@ package org.apache.royale.jewel.beads.views
                 _list = new VirtualList();
 				_list.addEventListener("beadsAdded", beadsAddedHandler);
             }
+
+			if((_strand as VirtualComboBoxPopUp).itemRenderer)

Review comment:
       I think this changes should be made in setter of strand if possible. I would also make it in following way:
   
   ```
   var virtualComboBoxPopup:VirtualComboBoxPopUp = _strand as VirtualComboBoxPopUp;
   if (virtualComboBoxPopup && virtualComboBoxPopup.itemRenderer)
   {
        list.itemRenderer = virtualComboBoxPopup.itemRenderer;
   }
   ```




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

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

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



[GitHub] [royale-asjs] mjesteve commented on a change in pull request #1153: Jewel VirtualComboBox only recognises itemRenderers assigned via className

Posted by GitBox <gi...@apache.org>.
mjesteve commented on a change in pull request #1153:
URL: https://github.com/apache/royale-asjs/pull/1153#discussion_r720316259



##########
File path: frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/VirtualComboBoxPopUpView.as
##########
@@ -58,6 +59,11 @@ package org.apache.royale.jewel.beads.views
                 _list = new VirtualList();
 				_list.addEventListener("beadsAdded", beadsAddedHandler);
             }
+
+			if((_strand as VirtualComboBoxPopUp).itemRenderer)

Review comment:
       I looked at how it was fixed in the ComboBoxPopUpView and I thought I had "replicated" it but I didn't realise it was inside the "if(!_list)", I'll be more attentive next time (... the truth is that I was annoyed by the "list" but I didn't question it because I thought I had done it anyway :) )
   
   I've included it in the "strand setter", as you indicated and verified the operation.
   
   Hiedra.




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

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

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