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/11/21 01:56:31 UTC

[GitHub] [royale-asjs] estanglerbm opened a new issue #941: Recent fix for issue #811 breaks VirtualDataContainerView.removeAllItemRenderers in SparkRoyale

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


   Recent fix for issue #811 (change was to exclude some elements in UIComponent.numElements) causes problems for VirtualDataContainerView.removeAllItemRenderers() [called via VirtualListView, as IBeadView of DataGroup in SparkRoyale].
   
   Specifically, removeAllItemRenderers() doesn't remove all of them, since it relies on numElements and expects the total count.


----------------------------------------------------------------
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] Harbs commented on issue #941: Recent fix for issue #811 breaks VirtualDataContainerView.removeAllItemRenderers in SparkRoyale

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


   I wonder if a better fix might be to override `internalChildren()` instead of `numElements`. @aharui Thoughts?


----------------------------------------------------------------
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 edited a comment on issue #941: Recent fix for issue #811 breaks VirtualDataContainerView.removeAllItemRenderers in SparkRoyale

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


   Each component set (Basic, Jewel, MXRoyale) can have different infrastructure.  MXRoyale expects UIComponents and numElements tries to ignore other HTMLElements that are used to implement virtual lists.  In many cases, MXRoyale can re-use beads from Basic, but often that isn't the case, and many Basic beads are customized or subclassed for MXRoyale.  You can compare the beads in the defaults.css for Basic and MXRoyale and see many custom beads for MXRoyale.
   
   IMO, that should be the case here.  A solution would not patch `org.apache.royale.html.beads.VirtualDataContainerView`, as I think it works correctly for Basic.  Instead, try creating a subclass of `org.apache.royale.html.beads.VirtualDataContainerView` and override `removeAllItemRenderers`, and update the MXRoyale defaults.css


----------------------------------------------------------------
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 #941: Recent fix for issue #811 breaks VirtualDataContainerView.removeAllItemRenderers in SparkRoyale

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


   Nice catch, @estanglerbm, looks like you are halfway to a fix. Maybe DataGroup needs a different view bead that overrides removeAllItemRenderers() ? Pull requests are more than welcome.
   
   


----------------------------------------------------------------
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 #941: Recent fix for issue #811 breaks VirtualDataContainerView.removeAllItemRenderers in SparkRoyale

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


   Each component set (Basic, Jewel, MXRoyale) can have different infrastructure.  MXRoyale expects UIComponents and numElements tries to ignore other HTMLElements that are used to implement virtual lists.  In many cases, MXRoyale can re-use beads from Basic, but often that isn't the case, and many Basic beads are customized or subclassed for MXRoyale.  You can compare the beads in the defaults.css for Basic and MXRoyale and see many custom beads for MXRoyale.
   
   IMO, that should be the case here.  A solution would not patch `org.apache.royale.html.beads.VirtualDataContainerView`, as I think it works correctly for Basic.  Instead, create a subclass of `org.apache.royale.html.beads.VirtualDataContainerView` and override `removeAllItemRenderers`.


----------------------------------------------------------------
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 #941: Recent fix for issue #811 breaks VirtualDataContainerView.removeAllItemRenderers in SparkRoyale

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


   With emulation components the test is to see if Flex behavior is replicated.


----------------------------------------------------------------
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] estanglerbm commented on issue #941: Recent fix for issue #811 breaks VirtualDataContainerView.removeAllItemRenderers in SparkRoyale

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


   Note that though numElements() adjusts based on royale_wrapper, getElementAt() doesn't.  (So to find the first element past the top div, have to do getElementAt(1).)


----------------------------------------------------------------
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] estanglerbm commented on issue #941: Recent fix for issue #811 breaks VirtualDataContainerView.removeAllItemRenderers in SparkRoyale

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


   Well, I can certainly patch removeAllItemRenderers().  But I'm really trying to point out that the relatively-recent change by @aharui to UIComponent.numElements (checking the royale_wrapper) may break more things.
   
   Should numElements really return less than the number of elements, as expected by other code?  If so, that's fine;  can patch functions as needed.  Just want to confirm.  [Both sets of code are doing something unusual:  removeAllItemRenderers() is deleting all-but-two, and numElements is returning less than the number of elements.  So not sure who should win.]


----------------------------------------------------------------
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 #941: Recent fix for issue #811 breaks VirtualDataContainerView.removeAllItemRenderers in SparkRoyale

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


   


----------------------------------------------------------------
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 #941: Recent fix for issue #811 breaks VirtualDataContainerView.removeAllItemRenderers in SparkRoyale

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


   Maybe, but IMO, internalChildren really shouldn't be filtered.  Higher-level APIs like numElements can be.
   
   IOW, in a multi-target implementation, some API should abstract getting all children, so if you decide to filter internalChildren, you may someday need another API to get unfiltered children.
   


----------------------------------------------------------------
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] Harbs commented on issue #941: Recent fix for issue #811 breaks VirtualDataContainerView.removeAllItemRenderers in SparkRoyale

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


   `elements` in Royale usually has the expectation of being Royale elements. When that assumption is not true, the non-royale elements need to be filtered out (or be explicitly dealt with). So yeah, checking `royale_wrapper` makes sense. I'm guessing `VirtualListView` also has non-Royale elements?


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