Number of ActionItems "OnBar.

Hallo!

I currently begins some app-development for the Z10 and came to

http://developer.BlackBerry.com/Cascades/documentation/UI/navigation/single_screen.html

Website says that for the 'main menu', 5 ActionItem elements are possible, and for the "OnBar' (menu), they will be displayed"both"as the action bar is not complete.

I am currently 3 ActionItems to add to the "OnBar", but when I add a 4th, vertical there are three points appear.

But there is enough space for 5 ActionItems.

Or in other words: I want 5 ActionItems in the OnBar without the three vertical points.

(Similar to the Blackberry calendar app)

Do you know how this "OnBar" bevaviour is possible?

Thank you

Markus

PS: I'm coding in C++ without using QML.

You can't do what you want here... 'full' in the case of the action bar means three things. The extreme left position seems to be mainly reserved for use in a TabbedPane or for the previous button (if you use a NavigationPane), and the the more upright position seems to be mainly reserved for the «...» "the overflow menu icon.

Tags: BlackBerry Developers

Similar Questions

  • To access the values from the row outside the ListView ListItem

    Hello

    I spent two hours browsing the forums and documentation with no chance of finding a solution on how to access the list item data from outside the listview.

    Let explain me my code. It is marked with I work and what does not work and its expected behavior.

    Should work behavior


    Tapping & getting data

    The arrayDataModel is filled with 4 rows. Firstly the list item, second item in the list... etc.

    • Tapping on the order of the day, label with the id of triggeredText displays the value of a threaded list item.
    • The index of the tapped icon appears in the label with the id of triggerredIndex.

    Incrementing Index using ActionItems onBar

    By pressing action items 'previous' and 'next', you can increment the index value to the label with the id of triggeredIndex. The order of the index is 0-4, even as total of the items in the list.

    How to extract data from the index when the value of triggeredIndex?

    Buttons

    The buttons at the bottom of the screen... Select 1, select the 2nd, 3rd Select should select indexes 0,1,2 of the list and display the value in triggeredText and triggeredIndex. They do not work.

    How did I pull the values when you click the buttons?

    import bb.cascades 1.3
    
    TabbedPane {
        id: root
        showTabsOnActionBar: false
    
        Tab {
            id: mainTab
            title: "Test List"
                Page {
                    id: mainPage
                    titleBar: TitleBar {
                        title: "List Traversal Test"
                    }
                    actions: [
                        ActionItem {
                            title: "Previous"
                            ActionBar.placement: ActionBarPlacement.OnBar
                            onTriggered: {
                                // get current selected index from list=
                                var currentIndex = parseInt(triggeredIndex.text);
    
                                if(currentIndex <= 0){
                                    //do nothing already at first item
                                }else{
                                    // subtract 1 from index ( ci - 1) ?
                                    var newIndex = parseInt(triggeredIndex.text) - 1;
    
                                    // show data from new selected index
                                    // ???
    
                                    // triggeredItem.text = XXX // the data
                                    // ???
    
                                    // triggeredIndex.text = X // the current index
                                    triggeredIndex.text = newIndex;
                                }
                            }
                        },
                        ActionItem {
                            title: "Next"
                            ActionBar.placement: ActionBarPlacement.OnBar
                            onTriggered: {
                                // get current selected index from list=
                                var currentIndex = parseInt(triggeredIndex.text);
    
                                if(currentIndex == 4){
                                    //do nothing already at lastitem
                                }else{
                                // add 1 to index ( ci + 1) ?
                                var newIndex = parseInt(triggeredIndex.text) + 1
    
                                // show data from new selected index
                                // ???
    
                                // triggeredItem.text = XXX // the data
                                // ???
    
                                // triggeredIndex.text = X // the current index
                                triggeredIndex.text = newIndex;
                            }
                            }
                        },
                        ActionItem {
                            title: "Clear"
                            ActionBar.placement: ActionBarPlacement.OnBar
                            onTriggered: {
                                // set current index to 0 (top item in list)
                            }
                        }
    
                    ]
                    Container {
                        preferredHeight: maxHeight
                        layout: StackLayout {
                            orientation: LayoutOrientation.TopToBottom
                        }
    
                        Label{
                            id: triggeredItem      // value of listitem from current index
                            text: "0"
                        }
                        Label{
                            id: triggeredIndex    // current index
                            text: "0"
                            onTextChanged: {
                                // set triggeredItem.text to contents of selected ListItem with same index
                                // STUCK HERE cannot access ListItem.dataModel(indexPath) from here....
                            }
    
                        }
                        Container{
                            ListView {
    
                                id: theList
                                objectName: "dalist"
                                dataModel: ArrayDataModel {
                                    id: theListModel
                                }
                                listItemComponents: ListItemComponent {
                                    StandardListItem {
                                        id: itemRoot
                                        title: ListItemData
                                    }
    
                                }
                                onTriggered: {
                                    var si = dataModel.data(indexPath);
                                    triggeredItem.text = "LIST ITEM CONTENT: " + si;  //set content when user taps on item
                                    triggeredIndex.text = "LIST ITEM INDEX INDEX: " + indexPath;  // set index when user taps
                                }
    
                                onSelectionChanged: {
                                    //console.log(selected);
                                }
    
                                onCreationCompleted: {
    
                                    //add some data to the listview
                                    theListModel.append("First List Item");
                                    theListModel.append("Second List Item");
                                    theListModel.append("Third List Item");
                                    theListModel.append("Fourth List Item");
                                }
                            }
    
                        }
                        Container{
                            layout: StackLayout {
                                orientation: LayoutOrientation.LeftToRight
                            }
                        Button{
                            text: "Select 1st"
                            onClicked: {
                                theList.clearSelection();
                                theList.select(0);
    
                            }
                        }
                        Button{
                            text: "Select 2nd"
                            onClicked: {
                                theList.clearSelection();
                                theList.select(1);
    
                            }
                        }
    
                        Button{
                            text: "Select 3rd item"
                            onClicked: {
    
                                //expected behaviour is to show data from Third List Item
    
                                // triggeredIndex.text = INDEX 3
                                // triggeredText.text = (DATA FROM THIRD LIST ITEM)
    
                                // THIS IS NOT WORKING ....
                                theList.clearSelection();
                                theList.select(2);
                                console.log(theList.dataModel(3));
                                triggeredItem.text = theListModel.dataModel(3);
    
                            }
                        }
                    }
                   }
                }
            }//tab
    }
    

    Thank you and have a happy and healthy 2015!

    Your help will be greatly appreciated.

    I ran and got this:

    asset:///main.qml:161: TypeError: Result of expression 'theList.dataModel' [bb::cascades::ArrayDataModel(0x1091a838)] is not a function.
    

    But it works

    theListModel.data([3])
    

    But this isn't the solution, you have a more serious problem. You select a value, you trigger. If you add this in onTriggered you select it (and you can see that it changes color when it is selected).

    theList.select(indexPath);
    

    If you want to use option to deselect

    theList.select(indexPath, !theList.isSelected(indexPath));
    

    And if you want to have that one chose this

    theList.clearSelection();
    theList.select(indexPath);
    

    Inside the button 'Select the 3rd point' allows to select programmatically

    theList.select([2]);
    

    It works but I'm not sure what you're trying to do

  • ActionItem in OnBar only

    Hello

    I have a quik question: can I do ActionItem to show that in the OnBar and do not display in InOverflow?

    ActionBar.placment is only a sugestion to ActionItem. With InOverflow it will not display on OnBar but with 3 + OnBar Actions will apear in InOverflow. But I need do not show this OnBar one more time in InOverflow. Is it possible to hide in InOverflow?

    Thank you

    Turdidae

    I know this thread is old - but not resolved and I found it Googling for the same problem. I know that this behavior is not itended to have with waterfalls, but sometimes you're not the one making the decisions.

    My solution is to listen to the signal actionMenuVisualStateChanged and removes all the elements of adverse action to the State "AnimatingToVisibleFull" and add them to the "AnimatingToHidden". To restore all the items in the original order, you must remove all of the remaining elements and add them in the original order once again.

  • Number of unknown member during an attempt to propertyMap

    In my application, I have a main.qml that has a TabbedPane.

    The 2nd part is the LeadInformation.qml page, which has a NavigationPane manipulated a several page questionnaire.

    From the first page, I have a menu option that pushes a page of BarcodeScan.qml to scan the barcode.  When data is read, I want to fill in the fields on the LeadInformation.qml.

    I added a function in the ApplicationUI to analyze the data of barcode.

    When the data are analyzed, I try to use the propertyMap update fields on the page.

    QmlDocument *qml = QmlDocument::create("asset:///LeadInformation.qml");
    QDeclarativePropertyMap* propertyMap = new QDeclarativePropertyMap;
    
    propertyMap->insert("iFirstName", data.mid(m_startSpot, m_endSpot - m_startSpot));
    
    qml->setContextProperty("propertyMap", propertyMap);
    

    And in the LeadInformation.qml page

    TextField {
                        id: tfLeadFirstName
                        hintText: "Lead First Name"
                        input.submitKey: SubmitKey.None
                        text: propertyMap.iFirstName;
    
                    }
    

    In the qml page, I get one! symbol and 'unknown member '.

    I guess I need to declare something somewhere else to make it work.  Examples are to change the values in the main.qml page.  I have not seen an example to change values on another page.

    This is what worked.

    Instead of calling to a source of the page, I just added the Page as an object.

    In the main.qml, I added the NavigationPane (LeadInformation.qml)

    import bb.cascades 1.0
    import bb.system 1.0
    
    TabbedPane {
        id: mainTabPane
        showTabsOnActionBar: true
    
        property bool databaseOpen: false
    
        tabs: [
            Tab {
                title: qsTr("User List")
                imageSource: "asset:///icons/ic_view_list.png"
    
                PageBase {
                    databaseOpen: mainTabPane.databaseOpen
                    page: "LeadsList.qml"
                }
            },
            Tab {
                title: qsTr("Add User")
                imageSource: "asset:///icons/AddSubscription.png"
                LeadInformation {
    
                }
            }
        ]
    }
    

    In the Navigation pane, which contains all of the fields that fills in the barcode data, I added the BarcodeScan page in the ComponentDefinition for action that calls the bar code

    import bb.cascades 1.0
    import bb.system 1.0
    
    NavigationPane {
        id: navigationPane
        property string barcodeOutput;
        property int currentLeadID;
    
        onCreationCompleted: {
            _app.setLastLeadID(0);
        }
    
        Page {
            id: leadsInformation
            titleBar: TitleBar {
                // Localized text with the dynamic translation and locale updates support
                title: qsTr("Lead Information") + Retranslate.onLocaleOrLanguageChanged
                appearance: TitleBarAppearance.Branded;
            }  
    
            ScrollView {
                scrollViewProperties.scrollMode: ScrollMode.Vertical
                Container {
                    layoutProperties: FlowListLayoutProperties {}
                    clipContentToBounds: false
    
                    Picker {
                        id: pkEmployee
                        title: "Bell and Howell Employee"
                        kind: PickerKind.Expandable
    
                        rootIndexPath: []
                        dataModel: XmlDataModel {
                            id: dmEmployees
                            source: "xml/employees.xml" }
    
                        pickerItemComponents: [
    
                            PickerItemComponent {
                                type: "employee"
                                content: Container {
                                    Label {
                                        text: pickerItemData.email
                                    }
                                }
                            }
    
                        ]
    
                        onSelectedValueChanging: {
                            console.debug("selectedIndex = " + selectedIndex(0))
                            var selectedEmployee = dataModel.data([0, selectedIndex(0)])
                            console.debug("selectedEmployee 0,0 email = " + selectedEmployee.email)
    
                            lbEmployee.text = selectedEmployee.email
                        }
    
                        onSelectedValueChanged: {
                            console.debug("selectedIndex = " + selectedIndex(0))
                            var selectedEmployee = dataModel.data([0, selectedIndex(0)])
                            console.debug("selectedEmployee 0,0 email = " + selectedEmployee.email)
    
                            lbEmployee.text = selectedEmployee.email
    
                            if(lbEmployee.text.length > 2 && lbSelectedShow.text.length > 2) {
                                if(aiNextButton.enabled == false) { aiNextButton.enabled = true }
                            }
                        }
                    }
                    Label {
                        id: lbEmployee
                        textStyle.fontStyle: FontStyle.Italic
                        textStyle.fontWeight: FontWeight.Bold
                    }
    
                    Picker {
                        id: pkShow
                        title: "Show"
                        kind: PickerKind.Expandable
    
                        rootIndexPath: []
                        dataModel: XmlDataModel { source: "xml/show.xml" }
    
                        pickerItemComponents: [
                            PickerItemComponent {
                                type: "show"
    
                                content: Container {
                                    Label {
                                        text: pickerItemData.name
                                    }
                                }
                            }
                        ]
    
                        onSelectedValueChanging: {
                            console.debug("selectedIndex = " + selectedIndex(0))
                            var selectedShow = dataModel.data([0, selectedIndex(0)])
                            console.debug("selectedShow 0,0 name = " + selectedShow.name)
    
                            lbSelectedShow.text = selectedShow.name
                        }
    
                        onSelectedValueChanged: {
                            console.debug("selectedIndex = " + selectedIndex(0))
                            var selectedShow = dataModel.data([0, selectedIndex(0)])
                            console.debug("selectedShow 0,0 name = " + selectedShow.name)
    
                            lbSelectedShow.text = selectedShow.name
    
                            if(lbEmployee.text.length > 2 && lbSelectedShow.text.length > 2) {
                                if(aiNextButton.enabled == false) { aiNextButton.enabled = true }
                            }
                        }
    
                    }
    
                    Label {
                        id: lbSelectedShow
                        textStyle.fontStyle: FontStyle.Italic
                        textStyle.fontWeight: FontWeight.Bold
                    }
    
                    Header {
                        title: "Lead Information"
                    }
    
                    TextField {
                        id: tfLeadFirstName
                        hintText: "Lead First Name"
                        input.submitKey: SubmitKey.None
    
                    }
    
                    TextField {
                        id: tfLeadLastName
                        hintText: "Lead Last Name"
                        input.submitKey: SubmitKey.None
    
                    }
    
                    Header {
                        title: "Company Information"
    
                    }
                    TextField {
                        id: tfCompanyName
                        hintText: "Company Name"
                        input.submitKey: SubmitKey.None
    
                    }
                    TextField {
                        id: tfJobTitle
                        hintText: "Job Title"
                        input.submitKey: SubmitKey.None
    
                    }
                    TextField {
                        id: tfAddrLine1
                        hintText: "Address Line 1"
                        input.submitKey: SubmitKey.None
                    }
                    TextField {
                        id: tfAddrLine2
                        hintText: "Address Line 2"
                        input.submitKey: SubmitKey.None
    
                    }
                    TextField {
                        id: tfCity
                        hintText: "City"
                        input.submitKey: SubmitKey.None
                    }
                    TextField {
                        id: tfStateRegion
                        hintText: "State / Region"
                        input.submitKey: SubmitKey.None 
    
                    }
                    TextField {
                        id: tfCountry
                        hintText: "Country"
                        input.submitKey: SubmitKey.None
    
                    }
                    TextField {
                        id: tfPostalCode
                        hintText: "PostalCode"
                        input.submitKey: SubmitKey.None
    
                    }
                    Header {
                        title: "Contact Information"
    
                    }
                    TextField {
                        id: tfPhone
                        hintText: "Phone"
                        inputMode: TextFieldInputMode.PhoneNumber
                        input.submitKey: SubmitKey.None
    
                    }
                    TextField {
                        id: tfPhoneExt
                        hintText: "Phone Extension"
                        input.submitKey: SubmitKey.None
    
                    }
                    TextField {
                        id: tfFax
                        hintText: "Fax"
                        inputMode: TextFieldInputMode.PhoneNumber
                        input.submitKey: SubmitKey.None
    
                    }
                    TextField {
                        id: tfEmail
                        hintText: "eMail"
                        inputMode: TextFieldInputMode.EmailAddress
                        input.submitKey: SubmitKey.None
    
                    }
                }
            }
            actions: [
                ActionItem {
                    id: aiNextButton
                    enabled: false
                    title: qsTr("Purchasing Timeframe") + Retranslate.onLocaleOrLanguageChanged
                    ActionBar.placement: ActionBarPlacement.OnBar
                    imageSource: "asset:///icons/ic_next.png"
    
                    onTriggered: {
                        currentLeadID = _app.getLastLeadID();
                        if(currentLeadID == 0) {
                            // Create new Sales Leads
                            _app.createLeadRecord(
                                tfLeadFirstName.text,
                                tfLeadLastName.text,
                                tfCompanyName.text,
                                tfJobTitle.text,
                                tfAddrLine1.text,
                                tfAddrLine2.text,
                                tfCity.text,
                                tfStateRegion.text,
                                tfCountry.text,
                                tfPostalCode.text,
                                tfEmail.text,
                                tfPhone.text,
                                tfPhoneExt.text,
                                tfFax.text,
                                lbEmployee.text,
                                lbSelectedShow.text);
                            console.debug("New Sales Lead - Create")
                        } else {
                            // Update current Sales Lead
                            _app.updateLeadRecord(
                                currentLeadID,
                                tfLeadFirstName.text,
                                tfLeadLastName.text,
                                tfCompanyName.text,
                                tfJobTitle.text,
                                tfAddrLine1.text,
                                tfAddrLine2.text,
                                tfCity.text,
                                tfStateRegion.text,
                                tfCountry.text,
                                tfPostalCode.text,
                                tfEmail.text,
                                tfPhone.text,
                                tfPhoneExt.text,
                                tfFax.text,
                                lbEmployee.text,
                                lbSelectedShow.text);
                                console.debug("Existing Sales Lead - Update Sales Lead ID: " + currentLeadID)
                        }
                        _app.readLeadRecords(); // Refresh the list view.
                        _marketingWS.insertSalesLead(1);
                        //navigationPane.push(purchasingTimeframeDefinition.createObject());
    
                    }
                },
                ActionItem {
                    id: aiScanButton
                    enabled: true
                    title: qsTr("Scan Barcode") + Retranslate.onLocaleOrLanguageChanged
                    ActionBar.placement: ActionBarPlacement.InOverflow
                    imageSource: "asset:///icons/ic_scan_barcode.png"
    
                    onTriggered: {
                        navigationPane.push(barcodeScanDefinition.createObject())
                    }
    
                }
    
            ]
    
            attachedObjects: [
                // Definition of the second Page, used to dynamically create the Page above.
                ComponentDefinition {
                    id: purchasingTimeframeDefinition
                    source: "PurchasingTimeframe.qml"
                },
                ComponentDefinition {
                    id: barcodeScanDefinition
                    BarcodeScan {
    
                    }
                }
            ]
    
        }
    
        onPopTransitionEnded: {
            // Destroy the popped Page once the back transition has ended.
            page.destroy();
        }
        backButtonsVisible: false
    
    }
    

    Then, on the page BarcodeScan.qml, I just referenced the fields and added to the white list.  Instead of calling C++ code to analyze the data, I just analyzed it on the page.  QString provides a better string manager that the regular chain, so it's not as clean as I wanted it to be.

    Page {
        property string decodeString
        property string tmpString
        property int initStartSpot: 0;
        property int startSpot: 0;
        property int endSpot: 0;
        property int x:0;
    
        property int vcard: 0
        property int vcard2_1: 1
        property int vcard3: 2
        property int print2013: 3
        property int codeType: 0
    
        Container {
            id: cMain
            layout: StackLayout {
    
            }
            horizontalAlignment: HorizontalAlignment.Center
            verticalAlignment: VerticalAlignment.Center
            background: Color.create(0x9CDCF6)
    
            Container {
                id: cCameraReader
    
                layout: AbsoluteLayout {
    
                }
                background: Color.White
                horizontalAlignment: HorizontalAlignment.Center
                verticalAlignment: VerticalAlignment.Center
    
                Camera {
                    id: camera
                    preferredWidth: 450
                    preferredHeight: 450
    
                    onCameraOpened: {
                        camera.startViewfinder();
                    }
                }
    
                BarcodeDetectorVisuals {
                    id: bdvScanner
                    preferredWidth: 450
                    preferredHeight: 450
                    barcodeDetector: barcodeDetector
    
                    onDetected: {
                        // Set the UserID to 0
                        _app.setLastLeadID(0);
    
                        decodeString = data;
                        dataArea.text = decodeString;
    
                        if(decodeString.indexOf("VCARD") > 0) {
                            if(decodeString.indexOf("VERSION:3.0") > 0) {
                                codeType = vcard3;
                            } else if(decodeString.indexOf("VERSION:2.1") > 0) {
                                codeType = vcard2_1;
                            } else {
                                codeType = vcard;
                            }
    
                        } else {
                            codeType = print2013;
                        }
    
                        dataArea.text += "\n " + codeType;
    
                        switch(codeType) {
                            case vcard2_1:
                            case vcard:
                            case vcard3:
                                // Get Name
                                tmpString = decodeString.substr(decodeString.indexOf("N:"), decodeString.indexOf("TITLE:"));
    
                                tfLeadFirstName.text = tmpString.substr(0, tmpString.indexOf(";"));
                                tfLeadLastName.text = tmpString.substr(tmpString.indexOf(";") + 1, tmpString.length);
                                break;
                            case print2013:
                                //qDebug() << " Last End spot = " << decodeString.lastIndexOf(QString("$"));
                                //qDebug() << " $ counts = " << decodeString.count(QString("$"));
                                startSpot = 0;
                                initStartSpot = decodeString.indexOf("$", startSpot + 1);
                                for(x=0; x < 22; x++) {
                                    endSpot = decodeString.indexOf("$", startSpot + 1);
    
                                    dataArea.text += "\n x:" + x + " endSpot = " + endSpot;
                                    if(endSpot != -1) {
                                        switch(x) {
                                            case 0:
                                                // badge ID
                                                //qDebug() << " Badget ID = " << decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 1:
                                                // blank or Show ID
                                                //qDebug() << " Show ID = " << decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 2:
                                                // First Name
                                                tfLeadFirstName.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 3:
                                                //Last Name
                                                tfLeadLastName.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 4:
                                                //Title
                                                tfJobTitle.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 5:
                                                //Company
                                                tfCompanyName.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 6:
                                                //AddrLine1
                                                tfAddrLine1.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 7:
                                                //AddrLine2
                                                tfAddrLine2.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 8:
                                                //City
                                                tfCity.text =  decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 9:
                                                //StateRegion
                                                tfStateRegion.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 10:
                                                //PostalCode
                                                tfPostalCode.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 11:
                                                //Country
                                                tfCountry.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 12:
                                                //Phone
                                                tfPhone.text =  decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 13:
                                                //PhoneExt
                                                tfPhoneExt.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 14:
                                                //Fax
                                                tfFax.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 15:
                                                //LeadEmail
                                                tfEmail.text = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 16:
                                                //RegClass
                                                //tftext = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 17:
                                                //PrincipalBusiness
                                                //tftext = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 18:
                                                //Primary Job Function:
                                                //tftext = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 19:
                                                //Influence in your company's buying decision
                                                //tftext = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 20:
                                                //Number of Employees
                                                //tftext = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 21:
                                                //Annual Sales Volume:
                                                //tftext = decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                            case 22:
                                                //Products you are interested in (Multiple Answer/Comma Delimited)
                                                //leadContainer.tftext =  decodeString.substr(startSpot, endSpot - startSpot);
                                                break;
                                        }
    
                                        startSpot = endSpot + 1;
                                    } else {
                                        break;
                                    }
                                }
                            }
    
                        navigationPane.pop();
                    }
                }
            }
            attachedObjects: [
    
                BarcodeDetector {
                    id: barcodeDetector
                    formats: BarcodeFormat.Any
                    camera: camera
                }
            ]
            TextArea {
                id:dataArea
                text: ""
                textFormat: TextFormat.Auto
                maximumLength: 400
    
            }
    
        }
        onCreationCompleted: {
           if (camera.allCamerasAccessible) {
                camera.open();
                console.debug("rear camera opened")
           } else {
                dataArea.text = "Cameras are not accessible"
            }
        }
    }
    

    It is the solution.  This works.

    Not the solution I was looking for, but I don't have the time now to try again.

    My guess is that propertyMap will now also work with the way I'm treated Page calls.

  • Make a tab of the ActionItem Menu TabbedPane

    Hello! I'm creating an application with three tabs. I want the fourth tab at ActionItem Menu which will stocks based on which tab user is in. Is there a way I can code it. My current code is given below

    import bb.cascades 1.2

    TabbedPane {}

    showTabsOnActionBar: true

    First tab

    Tab {}

    {Page}

    {Of container

    topPadding: 30.0

    leftPadding: 20.0

    rightPadding: 20.0

    TextField {}

    onTextChanging: {}

    }

    }

    TextArea {}

    }

    }

    }

    }

    End of the first tab

    Second tab

    Tab {}

    {Page}

    {Of container

    }

    }

    }

    End of the second tab

    Third tab

    Tab {}

    {Page}

    {Of container

    }

    }

    }

    End of the third tab

    / * Fourth tab * /.

    Tab {}

    Title: "Action Menu".

    imageSource: "asset:///icons/ic_overflow_action.png."

    {Page}

    Menu.Definition: MenuDefinition {}

    settingsAction: {SettingsActionItem}

    onTriggered: {}

    }

    actions:]

    {ActionItem}

    ID: action1

    Title: "myActionTitle".

    ActionBar.placement: ActionBarPlacement.OnBar

    }

    ]

    }

    }

    }

    / * End of fourth tab * /.

    }

    Got the answer. So instead of having the fourth tab, I have stock in the tab page... The code will be

    import bb.cascades 1.2

    TabbedPane {}

    showTabsOnActionBar: true

    First tab

    Tab {}

    {Page}

    actions:]

    {ActionItem}

    Title: "Action 1".

    ActionBar.placement: ActionBarPlacement.OnBar

    onTriggered: {}

    MyLabel.set_Text = "Selected 1 Action!"

    }

    },

    {ActionItem}

    Title: 'Action 2 '.

    ActionBar.placement: ActionBarPlacement.OnBar

    onTriggered: {}

    MyLabel.set_Text = "Action selected 2!"

    }

    }

    ]

    {Of container

    topPadding: 30.0

    leftPadding: 20.0

    rightPadding: 20.0

    TextField {}

    onTextChanging: {}

    }

    }

    TextArea {}

    }

    }

    }

    }

    End of the first tab

    Second tab

    Tab {}

    {Page}

    {Of container

    }

    }

    }

    End of the second tab

    Third tab

    Tab {}

    {Page}

    {Of container

    }

    }

    }

    End of the third tab

    }

  • Change the ActionItem image

    Hi, I would like to know how to change the image of an actionItem without using the onTriggered slot. kind of how mediaKey (play/pause) changes the image of the actionItem of game for a break in the media player by default.

    I tried setting imagesource, but it doesn't seem to work.

    ActionItem {
                id: butn
                title: qsTr("On")
                ActionBar.placement: ActionBarPlacement.OnBar
                onTriggered: {
                    if (title == "On") {
                       setTitle("Off")           //this works
                       setImageSource("asset:///off.png")    //this works
                    } else {
                        setTitle("on")            //this works
                        setImgeSource("asset:///on.png")      //this works
                }
            }
    

    ^ ^ ^ It works fine

    MediaKeyWatcher {
                        id: keyWatcher
                        key: MediaKey.PlayPause
                        onShortPress: {
                            if (butn.title=="on") {
                                    butn.setTitle("off") //This works
                                    butn.setImageSource("assets:///off.png") //this doesn't work
                            } else {
                                if (butn.title=="off") {
                                    butn.setTitle("on")  //this works
                                    butn.setImageSource("asset:///on.png")  //this doesnt work
                                }
                            }
                        }
                    }
    

    ^ ^ ^ set the imagesource to outside of the ationItem doesn't seem to work

    The images are in the current folder.

    I managed to work around it by changing the title of mediaKeyWatcher, then by changing the Image using the actionItem onTitleChanged slot.

    I spent days on this, I hope this helps someone else.

    ActionItem {
                id: butn
                title: qsTr("On")
                ActionBar.placement: ActionBarPlacement.OnBar
                onTriggered: {
                    if (title == "On") {
                       setTitle("Off")           //this works
                       setImageSource("asset:///off.png")    //this works
                    } else {
                        setTitle("on")            //this works
                        setImgeSource("asset:///on.png")      //this works
                }
            }       onTitleChanged:{                if (title == "On") {
                       setImageSource("asset:///off.png")    //this works
                    } else {
                        setImgeSource("asset:///on.png")      //this works
                }      } }
    
    MediaKeyWatcher {
                        id: keyWatcher
                        key: MediaKey.PlayPause
                        onShortPress: {
                            if (butn.title=="on") {
                                    butn.setTitle("off")
                            } else {
                                if (butn.title=="off") {
                                    butn.setTitle("on")
                                }
                            }
                        }
                    }
    

    Still weird kind that only an actionItem can change its own imagesource

  • reuse the actionitems for everything what you qml pages

    Is there a way to do this within qml so I don't have to rewrite all actionitems to actionbar page for each page?

    I assumed its doable in c ++ but I prefer to use qml.

    So if I have a large number of common page actionitems as part, contact us and everything can I set in a qml, and make it available to each page.

    Make a basic qml file Page where you define all the common shares. Whenever you have a page that needs to use these actions, use this Page as your "superclasse".

    BasePage.qml:

    Page {
        actions: [
            ActionItem {
                id: action1
                 ....
            }
        }
    }
    

    Implementation of BasePage.qml page:

    import "../folderContainingBasePageDotQml"
    
    BasePage {
        // this page will contain action items defined in BasePage.qml
    }
    
  • ActionItem activated

    Hello

    I use an increase and decrease font size function in my application - which works perfectly - but I was wondering how to set it up as being not activated when the police were in decline so many times.

    ActionItem {
                title: qsTr("Decrease Font Size")
                imageSource: "asset:///IMG/ic_decrease.png"
                ActionBar.placement: ActionBarPlacement.OnBar
    
                onTriggered: {
                    if (textSize > 7) {
                        textSize = textSize - 1
                    }
                }
            },
    ActionItem {
                title: qsTr("Increase Font Size")
                imageSource: "asset:///IMG/ic_increase.png"
                ActionBar.placement: ActionBarPlacement.OnBar
                onTriggered: {
                    if (textSize < 16) {
                        textSize = textSize + 1
                    }
                }
            },
    

    Sorting, change the font size to 8 fact that market - thanks for your help

    ActionItem {
                title: qsTr("Decrease Font Size")
                imageSource: "asset:///IMG/ic_decrease.png"
                ActionBar.placement: ActionBarPlacement.OnBar
    
                onTriggered: {
                    if (textSize > 7) {
                        textSize = textSize - 1
                    }
                }
                enabled: textSize >= 8
            },
    
  • ActionItem shown twice

    Hi guys,.

    I have a weird question. When you add an action item to the action bar, and if I use ActionBar.placementproperty, point of Action is displayed twice.

    Please, see the image below

    Code snippet I used:

     actions:ActionItem {
                    title: "Show Next Page"
                    ActionBar.placement: ActionBarPlacement.OnBar
                }
    

    And if I remove ActionBar.placement every thing works fine.

    Could you please suggest me what could be the possible solution?

    Update:

    Found, this problem is when adding

    qml->setContextProperty("cppObject", this);
    

    in my CPC file.

    Thank you best regards &,.

    SHA.

    Hello

    Save the properties before you create the root object to work around the problem. This thread has more information:

    http://supportforums.BlackBerry.com/T5/Cascades-development/duplicate-ActionBar-buttons/m-p/2157969#...

  • ActionItem Q10 does not title?

    It seems that the Q10 does not display the title on the action item more.

    Is there a way around it?

    This is an example of how I create.

    {ActionItem}
    Title: qsTr ("Test")
    imageSource: "asset:///images/test.png."
    ActionBar.placement: ActionBarPlacement.OnBar
    onTriggered: {}
    ...
    }
    }

    It seems to be intentional, to save space. Users can now pressure on the action bar and move their finger from button to button to see the text in a small area of layering that popups just above.

  • How to remove the actionItem running?

    There are 2 ActionItem on the action bar and a SegmentedControl, how can I implement the function that when SegmentedControl be switched, remove or hide one of the ActionItems?

    SegmentedControl {

    ID: segment

    Option {

    text: qsTr ("transfer")

    value: "transfer of»

    selected: true

    }

    Option {

    text: qsTr ("transfer complete")

    value: "complete transfer".

    }

    }

    actions:]

    ActionItem {

    ID: recover

    Title: qsTr ("summary all")

    imageSource: "asset:///images/action_resume.png."

    ActionBar.placement: ActionBarPlacement.OnBar

    onTriggered: {}

    }

    },

    ActionItem {

    ID: clearall

    Title: qsTr ("clear list")

    imageSource: "asset:///images/action_clear.png."

    ActionBar.placement: ActionBarPlacement.OnBar

    onTriggered: {}

    }

    }

    ]

    Page object has the method removeAction(). You can not hide ActionItem - just disable or remove.

  • Label visibility does not not with actionItem

    Hello

    I have a follow up on my page. I want to alternate the two labels of visibility on my page. So when I click on the action point first, I want the title to change the visibility of Label1 to disable and visibility of Label2 to switch on. And conversely, when I hit the actionitem twice.

    When I click on it the first time, changes in visibility (i.e. no visible = label1, label2 = visible and the title was changed to the action item).  However, it will not work the second time I click on the button - it remains fair to label2 = visible and the title for the action remains the same.

    Any ideas? Here is my code below:

    Page {
        id: pageID
        Container {
            id: rootContainer
            Label {
                visible: true
                id: label1
                text: "Label 1"
            }
            Label {
                visible: false
                id: label2
                text: "Label 2"
            }
        }
    
        actions: [
            ActionItem {
                id: actionitem
                title: "View Label 2"
                ActionBar.placement: ActionBarPlacement.OnBar
                onTriggered: {
                    if (label1.visible = true) {
                        label1.visible = false
                        label2.visible = true
                        actionitem.title = "View Label 1"
                    } else if (label2.visible = true) {
                        label2.visible = false;
                        label1.visible = true;
                        actionitem.title = "View Label 2"
                    }
                }
            }
        ]
    }
    

    Hello

    My friend ther are different between '=' and '== '.

    You must write "is" (label1.visible = true) in your code to check the status.
    .

    Statement of console.log("") User for debugging.

  • Phone number not an option for iMessage on iPad mini

    Hello

    So my ID Apple was recently hacked and had to change my password on all my devices (iPhone 6 and mini iPad). But now that I changed, my iMessage works well for my iPhone, but on my iPad, I have no option to choose my phone number. I tried to reset iMessage, reset my iPad, everything. Now I'm curious to know why, that's happened what else I can do for an option again.

    Thanks in advance for helping me!

    To go through all these steps?

    Use continuity to connect to your Mac, iPhone, iPad, iPod touch and Apple Watch - Apple Support

    Use this feature with any Mac, iPhone, iPad, or iPod touch that satisfies the requirements of continuity system. Make sure that your devices are configured as follows:

    • Each device is connected to iCloud with the same Apple ID.
    • On iPhone, go to settings > Messages > Send and receive. Make sure the Apple ID at the top of the screen is the same Apple ID you use for iMessage on other devices. Add a check to your address, phone number, so that you can be reached by both iMessage. Do the same on your iPad or iPod touch.
    • On iPhone, go to settings > Messages > transfer, text messages, then choose which devices to send and receive text messages from the iPhone. A verification code and then on each device. Enter this code on your iPhone.
    • On Mac, open Messages, and then choose message > Preferences. Click accounts, and then select your account from iMessage. Make sure the Apple ID shown here is the same Apple ID you use on other devices. Add a control to your phone number and email address.

    Use the SMS and MMS messaging

    To use this feature, simply start conversations as usual in the Messages application on any of your devices. Alternatively, you can start a conversation by clicking a phone number in Safari, Contacts, calendar, or other applications detecting phone numbers. All your incoming and outgoing messages on all your devices.

  • Number of matches between two columns

    Column1 Column2
    5 5
    5 2
    5 5
    4 3
    4 4
    Football match
    3

    I basically you want to compare two columns and count matches in the corresponding lines. I tried using the following formula:

    SUMPRODUCT (--($column1=$column2))

    ... but it doesn't work! Any suggestion?

    Tiago,

    It seems you are trying to use array formulas (maybe since excel?) who do not work in number.

    Here's how I would solve this problem:

    Make sure that the table where data is named 'Data' (as shown, or change the table name references to match your table name)

    Add a new column (C)

    C2 = AND (A2 = B2, A2≠ "")

    It's shorthand dethrone select cell C2, then type (or copy and paste it here) the formula:

    = AND(A2=B2, A2≠"")

    Select cell C2, copy

    Select cells C2 at the end of the C column, paste

    the formula say to check to see if the cell in column A is NOT empty, and is equal to the cel in column B

    Now in the summary table (single cell table):

    A1 = COUNTIF (Data::C, TRUE)

  • My phone transferred to my husbands phone number

    I got a new iphone 7 so I gave my husband my iphone 6.  I have deleted my old phone and implemented as if it was new to using its backup to icloud.  He moved all his photos, contacts and all, but it uses my phone instead of number.

    Remove the SIM card as well. The sim card has your number.

Maybe you are looking for