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/02/14 09:30:32 UTC

[GitHub] [royale-asjs] carlosrovira edited a comment on issue #1074: ToggleButtonBar Selection Issue

carlosrovira edited a comment on issue #1074:
URL: https://github.com/apache/royale-asjs/issues/1074#issuecomment-778153394


   Hi,
   
   no issues with CSS, I found a NPE in ToggleButtonBarView that I just committed. This NPE can be seen in the browser console. It's important you take a look at the console to catch this kind of problems since are of great help.
   
   Also I saw the actual way to setup the data provider is making the component not work as expected. I need to investigate further and fix the selected index issue (-1) since the latest changes still are not completed.
   
   To solve the problem, please update to my last commit and then change the `spinner.mxml` to this code. That should make all work right:
   
   ```xml
   <j:SectionContent xmlns:fx="http://ns.adobe.com/mxml/2009"
           xmlns:j="library://ns.apache.org/royale/jewel"
           xmlns:js="library://ns.apache.org/royale/basic"
           xmlns:html="library://ns.apache.org/royale/html"
           xmlns:c="components.*">
   
       <j:Group localId="spinnerGroup" width="100%" height="100%">
           <j:beads>
               <j:VerticalCenteredLayout/>
           </j:beads>
   
           <j:ToggleButtonBar localId="toggleButtonBar" emphasis="primary" >
                   <js:ArrayList source="[Sale, Rental]" />
           </j:ToggleButtonBar>
   
       </j:Group>
   
   </j:SectionContent>
   ```
   
   EDIT: Bilbo, I removed `dataProvider` tag in mxml since is DefaultProperty and is not needed, so the code is less verbose.
   


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