This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 7910e4f  tour-de-jewel: better consider ToggleButtonBar can have 
selectedIndex -1 and print in label when needed
7910e4f is described below

commit 7910e4f59ecaf691f5e16f7e40ee526245c977e7
Author: Carlos Rovira <carlos.rov...@apache.org>
AuthorDate: Sun Feb 14 11:36:31 2021 +0100

    tour-de-jewel: better consider ToggleButtonBar can have selectedIndex -1 
and print in label when needed
---
 examples/jewel/TourDeJewel/src/main/royale/ButtonBarPlayGround.mxml | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/examples/jewel/TourDeJewel/src/main/royale/ButtonBarPlayGround.mxml 
b/examples/jewel/TourDeJewel/src/main/royale/ButtonBarPlayGround.mxml
index 686be8c..4fc370f 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/ButtonBarPlayGround.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/ButtonBarPlayGround.mxml
@@ -178,6 +178,8 @@ limitations under the License.
                                if(event.target.selectedIndex != -1) {
                                        var selected:Boolean = 
(event.target.getElementAt(event.target.selectedIndex) as ISelectable).selected;
                                        tbb_label.text = 
event.target.selectedItem.label + ' (icon: ' + event.target.selectedItem.icon + 
'). isSelected? ' + selected;
+                               } else {
+                                       tbb_label.text = "Nothing is selected";
                                }
                        }
                ]]>

Reply via email to