BB10: ActionItem same repeated in ActionBar

Hi guys,.

as the title says, I have the same point of repeated Action twice in the action bar. So I have three buttons in the action bar when I have one. I just set one action point.

I struggled all day with this.

No idea why this is happening?

Thank you very much.

The classic error, the cause seems to use any time after your call createRootObject() setContextProperty(). It must pass before.

Tags: BlackBerry Developers

Similar Questions

  • What is the possibility of obtaining the same repeated random number?

    I would like to generate a random number of 5 digits;

    Select round (dbms_random.value (10, 999990)) twice;

    The query above seems pretty good, but what is the possibility of obtaining the same repeated random number? I'm fine with repetition until it spreads not less than a second. Is there such a guarantee?

    Thank you
    VINET

    983902 wrote:
    I would like to generate a random number of 5 digits;

    Select round (dbms_random.value (10, 999990)) twice;

    On my laptop, I can call trunc (dbms_random.value (0,100000))-which allows a random number to range form 0 to 99 000 - 100 000 times per second. The probability of repetition in a second depends on the number of calls per second, but in my case that the worst cases are a value that appeared 8 times and 18 445 values appeared twice.

    From what you have said so far, I'd probably use a column of date and a sequence in a column number (10) - possibly with a separate strain by table - for a high volume system.

    Concerning
    Jonathan Lewis

  • Vista update fixes same repeatedly since last week Idem 5 important patches total 62.9 MB

    Last week my computer window vista is updated the same set of patches (total 5 for a total of 62.9 MB) every day. I also tried to manually update all patches and after reboot, same patches showing as important patches that need to be updated.

    Hello

    1. don't you make changes on the computer before the show?
    2. you receive an error message?

    Method 1:
    You can run the fix it and check.
    http://support.Microsoft.com/mats/windows_update/

    Method 2:
    I also suggest you to refer the link if the update the applicant several times the same day.
    Windows Update or Microsoft Update repeatedly offers the same update
    http://support.Microsoft.com/kb/910339

    Important this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: (http://support.microsoft.com/kb/322756/ ) how to back up and restore the registry in Windows

    http://support.Microsoft.com/kb/322756

    See also the link
    See the Windows updates are installed
    http://Windows.Microsoft.com/en-us/Windows7/see-which-Windows-updates-are-installed

  • Same repeated reference number

    I have to consult several times the same note; Obviously, adding a new note increases the reference number.

    Here is an example:

    Blah blah blah (1) and blah blah blah (2), blah blah blah (1)

    blah blah blah (3) blah blah blah (4) blah blah blah (1)

    In different parts of an introduction, I'm working on I need to refer to the note 1.

    Is this possible?

    Thank you

    Giovanni

    The only way this can be done manually - which adds the additional Exhibitor etc. 1 and 2.

    Notes have not been updated for more than 10 years!

    Please add your voice to improve notes to please , the forum

    Also the feature request/Bug Report Form

  • Double Actionbar button

    I have a weird problem with my app Blackberry Cascades. I tried to add a button to actionbar (at the bottom of the application). But when I test it in the Simulator Blackberry 10 Dev Alpha (BB10_0_10.261) it seems that I have 2 (or sometimes 3) versions of the same key, as shown in the image below. While normally, there should be only 1?

    So what I do is add a button on my page in QML as follows:

    NavigationPane {
        Page {
            Container {
                layout: StackLayout {
                }
                ListView {
                    ...
                }
            }
            actions: [
                ActionItem {
                    title: "New Event"
                    ActionBar.placement: ActionBarPlacement.OnBar // HERE
                    onTriggered: {
                        var page = newEventPage.createObject();
                        navigationPane.push(page);
                    }
                    attachedObjects: ComponentDefinition {
                        id: newEventPage
                        source: "addEvent.qml"
                    }
                }
            ]
        }
        onPopTransitionEnded: {
            page.destroy();
        }
    }
    

    This code is not much more to add a "New event" button that will connect to my "addEvent.qml".

    But if I remove (or comment out) the line ' Actionbar.placement: ActionBarPlacement.OnBar' (marked with "HERE" in the code above), I get only 1 button, as planned.» But this button is located in the overflow menu, while I want it on the ActionBar inside.

    All versions of the buttons do exactly the same thing (the behavior expected by the way: addEvent.qml of opening).

    What I've tried: "Clean...". ' and then 'rebuild '; It did not work. I also tried to move the table actions in other places, as I thought this might be the wrong place, but that did not help either. Removing the application on the Simulator and then put it back in place.

    I also tried on another computer and another Simulator, as I thought it might be my computer. But I had the same problem there.

    I don't know if this is a bug or not, but I guess I'm doing something wrong, since I don't have a lot of experience in the development of Cascades. I searched everywhere, but do not have someone else with the same problem. I have not tested on a real device, because I have not (yet) a device of BB10.

    StackOverflow link to this topic: http://stackoverflow.com/questions/14818434/duplicate-actionbar-buttons-in-blackberry-cascades

    All credit for this answer goes to graymatter for his help (http://supportforums.blackberry.com/t5/Cascades-Development/Duplicate-actionbar-buttons/m-p/2157001#...).

    But I can explain what I did to solve the problem. Apparently, the problem was that I used

    QML-> setContextProperty ("model", model);

    in my C++ code. And I thought that it made a huge difference, so I put this line behind the line

    AbstractPane * root = qml->() createRootObject;

    But apparently, it makes a difference, because then you will receive your double buttons.

    So to solve the problem, simply move setContextProperty lines before the line createRootObject and everything is resolved.

    And the problem I had with 3 buttons, seems to be that I had 2 setContextProperty lines of code behind the createRootObject line. So for each row of setContextProperty, buttons have been duplicated.

    Anyone know why this strange thing that happens, feel free to mention it.

    And to answer the question of BGmot the journal of slog2info gave no information on this issue.

  • ActionBar.placement changes create duplicates

    I want to create functionality that my app is purchased the action point happen OT InOverflow OnBar however the following code creates doublonnait followed when it changes.  Any suggestions how to get around this problem?

    {ActionItem}
    Title: qsTr ("Options")
    ActionBar.placement: _tiledApp.purchased! 'Bought = '? ActionBarPlacement.OnBar: ActionBarPlacement.InOverflow
    onTriggered: {}
    If (_tiledApp.purchased == 'Bought') {}
    If {(sold)
    page var getOptionsPage() =;
    Console.Debug ("pushing retail" + page)
    navPaneid.push (page);
    } else {}
    optionsToast.show)
    Console.Debug (purched);
    }
    }
    attachedObjects:]
    {SystemToast}
    ID: optionsToast
    body: 'Premium Version required.
    }
    ]
    },

    I'll post this as a bug - leaving however the actionitem in place and simply change the title, image and function is a workaround that works - as long as you are swapping onBar and inOverflow.

  • Shared files

    Development for BB10

    I need to have an actionItem that selected once goes to an example of a shared file directory: "file://accounts/1000//shared/music/" or "file://accounts/1000//shared/documents".

    QML I have something like this

    {ActionItem}
    Title: 'music '.
    ActionBar.placement: ActionBarPlacement.InOverflow
    onTriggered: {}

    What should I do here?
    }

    And I have CPP:

    QString workingDir is QDir::currentPath();.

    QDeclarativePropertyMap * dirPaths = new QDeclarativePropertyMap;
    dirPaths-> insert ('music', QVariant (QString ("file://" + workingDir + "/ shared/music /")));
    QML-> setContextProperty ("dirPaths", dirPaths);

    How can I make this point QML action open the path for this URI?

    TKS in advance

    Not sure I get what you want...

    Do you want a FilePicker to open when the user click on your ActionItem? Then, attach a FilePicker to your ActionItem and call filePickerName.open)
    https://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__pickers__filepicker.html
    Use the "directories" property if you want the FilePicker to open it in a specific directory, like this:
    directories: [' / accounts/1000/shared/music "]

    Do you want a specific file (file of music as your ActionItem name suggests) to play when user click on your ActionItem? Then, attach a MediaPlayer to your ActionItem and call mediaPlayerName.play)
    https://developer.BlackBerry.com/native/reference/Cascades/bb__multimedia__mediaplayer.html

  • Strange behavior in QML

    I have a strange problem with a QML file. My first level NavigationPane has an attached SystemDialog:

    attachedObjects: [
        SystemDialog {
            id: confirmCancelDialog
            title: qsTr("Confirm")
            body: qsTr("There are unsaved changes.")
            confirmButton.label: qsTr("Discard and Close")
            cancelButton.label: qsTr("Abort... Don't Close")
            customButton.label: qsTr("Save... Then Close")
        }
    ]
    

    The Page just under the NavigationPane has an action of "Cancel". This code works fine:

    ActionItem {
        title: qsTr("Cancel")
        ActionBar.placement: ActionBarPlacement.OnBar
        imageSource: "asset:///images/ic_cancel.png"
        onTriggered: {
            var result;
            if (settingsNavPane.dirty) {
                confirmCancelDialog.exec()
                result = confirmCancelDialog.result
            } else {
                result = 2;
            }
            if (result == 2) {
                // ---Force FeedDetailsEdit page to reload values next time
                feedDetailsEdit.feedEdit = null;
                scrollView.scrollToPoint(0, 0);
                parentSheet.close();
            } else if (result == 6) {
                // ---Save then close
                saveAndClose();
            }
        }
    }
    

    Even if I use two statements if() here to test if the 'result' is 2 or 6, my usual practice would be to use one instead:

    ActionItem {
        title: qsTr("Cancel")
        ActionBar.placement: ActionBarPlacement.OnBar
        imageSource: "asset:///images/ic_cancel.png"
        onTriggered: {
            var result;
            if (settingsNavPane.dirty) {
                confirmCancelDialog.exec()
                result = confirmCancelDialog.result
            } else {
                result = 2;
            }
            switch(result)
            {
                case 2:
                    // ---Force FeedDetailsEdit page to reload values next time
                    feedDetailsEdit.feedEdit = null;
                    scrollView.scrollToPoint(0, 0);
                    parentSheet.close();
                    break;
                case 6:
                    // ---Save then close
                    saveAndClose();
                    break;
            }
        }
    }
    

    .. .but it does not work. When result == 2 switch correctly gives control to the "box 2: ' block, but the 'feedDetailsEdit.feedEdit = null;' statement never returns, and the rest of the cases never block runs, so does not close the page. Normally when I encounter a statement that behaves in this way, it is because there is a syntax error that is not taken at the time of the design, as an unitialized variable or object, for example, but in this case the exact same block of code works fine when in an if-else block, but not in a switch case block.

    The code also works very well if I'm hard on the conditions surrounding the fault block completely:

    ActionItem {
        title: qsTr("Cancel")
        ActionBar.placement: ActionBarPlacement.OnBar
        imageSource: "asset:///images/ic_cancel.png"
        onTriggered: {
            var result;
            if (settingsNavPane.dirty) {
                confirmCancelDialog.exec()
                result = confirmCancelDialog.result
            } else {
                result = 2;
            }
            // ---Force FeedDetailsEdit page to reload values next time
            feedDetailsEdit.feedEdit = null;
            scrollView.scrollToPoint(0, 0);
            parentSheet.close();
        }
    }
    

    25 years of professional business development experience with many languages such as C/C++ and JavaScript, but this one I left me speechless. Why the variation that does not work?

    Maybe it's this bug in Qt, which cannot have been fixed yet? https://bugreports.Qt-project.org/browse/QTBUG-17012

    (If this is the case, apparently adding braces around the code in each case individual would work around the issue. Maybe try it.)

  • Problem with the action menu

    This is my code, I just set one action point, but it shows two point follow up with the same name and the same behavior.

    actions:]
    {ActionItem}
    Title: 'about '.
    ActionBar.placement: ActionBarPlacement.OnBar
    onTriggered: {}
    aboutSheet.open ();
    }
    }
    ]

    This problem is solved. I put this code in the wrong place

    QML-> setContextProperty ("_app", this);

  • Cannot invoke the picture editor

    I'm calling the standard image editor, but but failed. I use 10.3.2 API and testing my application on the Simulator.

    Here is my code:

    Inside the .pro file, I added libs:

    LIBS += -lbbsystem
    

    Inside the .bar file, I added the following permissions:

    access_shared
    

    hand. QML:

    import bb.cascades 1.4
    import bb.cascades.pickers 1.0
    import bb.system 1.2
    
    Page {
        ImageView {
            id: imageView
            scalingMethod: ScalingMethod.AspectFill
        }
    
        attachedObjects: [
            FilePicker {
                id: filePicker
                type: FileType.Picture
    
                onFileSelected: {
                    invocation.query.uri = "file://" + selectedFiles[0];
                    invocation.trigger("bb.action.EDIT");
                }
            },
    
            Invocation {
                id: invocation
    
                query {
                    invokeTargetId: "sys.pictureeditor.cardeditor"
    
                }
            }
        ]
    
        actions: [
            ActionItem {
                title: "Select Picture"
                ActionBar.placement: ActionBarPlacement.OnBar
    
                onTriggered: {
                    filePicker.open();
                }
            }
        ]
    }
    

    Debug gives me the next exit to start the application:

    InvocationWrapper::onQueryFinished: menu service population failed
      query mimeType=""
      query uri=""
      query data=""
      query metadata=QMap()
      query action= ""
      query target= "sys.pictureeditor.cardeditor"
      query perimeter= 0
    InvocationPrivate::onQueryResolved: query failed, no armed signal sent.
    

    What's wrong?

    After some tests, I can confirm that this call does not work in QML, it will work only in C++.

    Here is a code snippet

    applicationui.cpp

    void ApplicationUI::invoke(const QString& targetId, const QString& actionId, const QString& mimeType, const QString& uri, const QString& data) {
        qDebug() << "Invoke:" << targetId << actionId << mimeType << uri << data;
    
        InvokeRequest request;
        request.setTarget(targetId);
        request.setAction(actionId);
        request.setMimeType(mimeType);
        request.setUri(uri);
        request.setData(data.toAscii());
    
        // Start the invocation
        InvokeManager* invokeManager = new InvokeManager(this);
        invokeManager->invoke(request);
    }
    

    hand. QML

    onFileSelected: {
        _app.invoke("sys.pictureeditor.cardeditor", "bb.action.EDIT", "", "file://" + selectedFiles[0], "")
    }
    
  • MapView does not show pines

    I experience MapView and I need help with it. I use 10.3.2 API and testing my application on the Simulator.

    Here is my code:

    MyMapData.h:

    #ifndef MYMAPDATA_H
    #define MYMAPDATA_H
    
    #include 
    
    #include 
    
    using namespace bb::cascades::maps;
    
    // MyMapData
    class MyMapData
        : public MapData
    {
        Q_OBJECT
    
    public:
        explicit MyMapData(QObject *parent = NULL);
        virtual ~MyMapData() {}
    
    public slots:
        void addGeoLocation(const int latitude, const int longitude);
    };
    
    #endif // MYMAPDATA_H
    

    MyMapData.cpp:

    #include 
    #include 
    
    #include 
    
    #include "MyMapData.h"
    
    using namespace bb::platform::geo;
    
    // MyMapData
    
    MyMapData::MyMapData(QObject *parent)
        : MapData(parent)
    {
        add(new GeoDeviceLocation());
    }
    
    void MyMapData::addGeoLocation(const int latitude, const int longitude)
    {
        add(new GeoLocation(latitude, longitude));
    
        qDebug() << "------------>" << count(true);
    }
    

    Inside of main.cpp I register class MyMapData:

    qmlRegisterType("bb.cascades", 1, 4, "MyMapData");
    

    Inside the .pro file, I added libs:

    LIBS += -lbb -lbbplatform -lQtLocationSubset -lbbcascadesmaps -lGLESv1_CM
    

    Inside the .bar file, I added the following permissions:

    access_location_services
    access_internet
    

    hand. QML:

    import bb.cascades 1.4
    import bb.cascades.maps 1.4
    
    Page {
        MapView {
            id: mapView
            latitude: 52.5
            longitude: -98.75
    
            mapData: MyMapData {
                id: mapData
            }
        }
    
        actions: [
            ActionItem {
                title: "Drop Pin"
                ActionBar.placement: ActionBarPlacement.OnBar
    
                onTriggered: {
                    mapData.addGeoLocation(mapView.latitude, mapView.longitude);
                }
            }
        ]
    }
    

    When I click on Add Pin, no pins on MapView are displayed, but debug of MyMapData :: addGetLocation me, shows that the pine has been added.
    What's wrong?

    My code works well, just zoom out

  • FilePicker on attachedObjects does not work?

    This is the simple app I'm working on that

    I want after a click in the action Go, a FilePicker bar will be shown, so I put the FilePicker on attachedObjects like this:

    // main.qml
    
    import bb.cascades 1.0
    
    NavigationPane {
        id: navigationPane
        backButtonsVisible: false
    
        // Create the initial screen
        Page {
            titleBar: TitleBar {
                title: qsTr("ExiView")
            }
    
            content: Container {
    
                TextArea {
                    id: lbl
                    editable: false
                    text: "Browse for an image, and ExiView will display its EXIF information for you."
                    textStyle {
                        color: Color.Black
                    }
    
                }
    
                // The file picker view mode selector
                DropDown {
                    id: pickerViewMode
    
                    horizontalAlignment: HorizontalAlignment.Center
    
                    title: qsTr("View Mode")
    
                    Option {
                        text: qsTr("Default")
                        value: FilePickerViewMode.Default
                        selected: true
                    }
    
                    Option {
                        text: qsTr("List View")
                        value: FilePickerViewMode.ListView
                    }
    
                    Option {
                        text: qsTr("Grid View")
                        value: FilePickerViewMode.GridView
                    }
                }
    
                // The file picker sort criterion selector
                DropDown {
                    id: pickerSortBy
    
                    horizontalAlignment: HorizontalAlignment.Center
    
                    title: qsTr("Sort by")
    
                    Option {
                        text: qsTr("Default")
                        value: FilePickerSortFlag.Default
                        selected: true
                    }
    
                    Option {
                        text: qsTr("Name")
                        value: FilePickerSortFlag.Name
                    }
    
                    Option {
                        text: qsTr("Date")
                        value: FilePickerSortFlag.Date
                    }
    
                    Option {
                        text: qsTr("Suffix")
                        value: FilePickerSortFlag.Suffix
                    }
    
                    Option {
                        text: qsTr("Size")
                        value: FilePickerSortFlag.Size
                    }
                }
    
                // The file picker sort order selector
                DropDown {
                    id: pickerSortOrder
    
                    horizontalAlignment: HorizontalAlignment.Center
    
                    title: qsTr("Sort order")
    
                    Option {
                        text: qsTr("Default")
                        value: FilePickerSortOrder.Default
                        selected: true
                    }
    
                    Option {
                        text: qsTr("Ascending")
                        value: FilePickerSortOrder.Ascending
                    }
    
                    Option {
                        text: qsTr("Descending")
                        value: FilePickerSortOrder.Descending
                    }
                }
            }
    
            actions: [
                // Create the "Push" action
                ActionItem {
                    title: "Go!"
                    ActionBar.placement: ActionBarPlacement.OnBar
    
                    // When this action is selected, create an object that's based
                    // on the ComponentDefinition below, and then push it on to
                    // the stack to display it
                    onTriggered: {
                        var newPage = detailsPage.createObject();
                        navigationPane.push(newPage);
                      // picker.open()
                    }
                }
            ]
    
            attachedObjects: [
    
                FilePicker {
                    id: picker
    
                    property string selectedFile
    
                    title: qsTr("Select image")
                    mode: pickerMode.selectedValue
                    type: FileType.Picture
                    viewMode: pickerViewMode.selectedValue
                    sortBy: pickerSortBy.selectedValue
                    sortOrder: pickerSortOrder.selectedValue
    
                    onFileSelected: {
                      //  selectedFile = selectedFiles[0]
                    }
                },
    
                ComponentDefinition {
                    id: detailsPage
                    source: "DetailsPage.qml"
                }
    
            ]
        } // end of Page
    }// end of NavigationPane
    

    It will not work. So where should I put the FilePicker?

    Hey anta40,

    Have you registered the Filepicker in main.cpp file?

    #include 
    
    // Register Filepicker
        qmlRegisterType("CustomComponent", 1, 0,"FilePicker");
    

    You will also need to include in the qml file

    import bb.cascades.pickers 1.0
    

    And in the .pro file

    LIBS   += -lbbcascadespickers
    

    Another thing, your withdrawal difficulty.

  • HELP the multiple ContactPicker in QML

    I have this code

    ActionItem
                {
                    title: "Invite Contacts"
                    ActionBar.placement: ActionBarPlacement.OnBar
                    imageSource: "asset:///images/titleAddFriend.png"
                    onTriggered:
                    {
                        contactPicker.open();
                    }
    
                    attachedObjects: ContactPicker
                    {
                        id: contactPicker
                        mode: ContactSelectionMode.Multiple
                        onContactsSelected:
                        {
                            for(var i = 0; i < selectedContactsIds.length; i++)
                            {
                                var phoneNumber = _app.getContactPhoneNumber(selectedContactsIds[i]);
                                console.log("PHONE: " + phoneNumber);
                            }
                        }
                    }
                }
    

    but does simply not multiple selector. It still operates as the single contact selector by default. I added a qml register type in main.cpp and libraries are also imported. any suggestions please? This problem is also present although 10.1 and OS 10.2.1 tried.

    I thought about it... its another case of QML it can not handle.  After testing your code, I noticed this error

    file:///apps/com.example.dynamicattach.testDev_namicattach58cf113_/native/assets//main.qml:51: ReferenceError: Can't find variable: ContactSelectionMode
    

    So I tried to import ContactSelectionMode qml as the selector is with no success.

    So, I stuck with c ++ for the switch and got the results of work

    The solution

    applicationUI.cpp

    #include 
    #include 
    
    void ApplicationUI::contacts()
    {
          ContactPicker *contactPicker = new ContactPicker();
          contactPicker->setMode(ContactSelectionMode::Multiple);
          contactPicker->setKindFilters(QSet()
               << bb::pim::contacts::AttributeKind::Phone);
    
          bool success = QObject::connect(contactPicker,
                 SIGNAL(contactsSelected(QList)),
                 this,
                 SLOT(onContactsSelected(QList)));
    
          if (success) { // Signal was successfully connected.
                contactPicker->open();
              } else { // Failed to connect to signal.
                qDebug() << "Didn't connect the picker signal";
              }
    }
    
    void ApplicationUI::onContactsSelected(const QList &contactIds) {
    
        qDebug() << "contacts" << contactIds;
    }
    

    applicationUI.hpp

    public:
        ApplicationUI(bb::cascades::Application *app);
        virtual ~ApplicationUI() { }
    
        Q_INVOKABLE void contacts();
    
    public slots:
        void onContactsSelected(const QList &contactIds);
    

    . QML

    Button {
                    id: contact
                    text: "Pick Contact"
                    onClicked: {
                        cpp.contacts();
                    }
    
                }
    

    Now, given that the function is entirely in c ++, you should be able to take your code to

    _app.getContactPhoneNumber(selectedContactsIds[i]);
    

    and just insert into onContactsSelected to get your phone numbers

    I hope that helps!  Now I know how to do it too =)

    P. S.

    If you are still having a problem where something must certainly work and it is not, it is very likely that you will succeed if you just pass it to the c code ++ like theres probably a problem with the QML support.

  • In any case to have an onLoad function in qml appending NavigationPane?

    I'm new to Blackberry 10 dev. So I was wondering what is the best way to do that I get no clear answer dev documentation.

    What I want is to start a separate view in my application from a navigation screen. The new page will then create an http request and update the UI based on the output.

    The best way seems to use the NavigationPane and add view qml. But how do I invoke a C++ function when placed on the stack? Something similar to android onActivityCreated() in Fragments. There are the docs for example Http, but the program started the HTTP from the legacy of the QObject constructor. How I have a function that is executed as the new qml is added to the navigation as a stack

     // navigationpane.qml
    
    NavigationPane {
        id: navigationPane
        Page {
            Container {
                Label {
                    text: "First page"
                }
            }
    
            actions: [
                ActionItem {
                    title: "Next page"
                    ActionBar.placement: ActionBarPlacement.OnBar
                    onTriggered: {
                        var page = pageDefinition.createObject();
                        navigationPane.push(page);
                    }
    
                    attachedObjects: ComponentDefinition {
                        id: pageDefinition;
                        source: "secondpage.qml"
                    }
                }
            ]
        }
        onPopTransitionEnded: { page.destroy(); }
    }
    

    Most of the QML objects have a creationCompleted signal, so you can set an onCreationCompleted: {...} to do what I think that you ask for.

    Note that it runs only when the thing is first created, well... If you reuse (hide but not destroy it, and the later make visible again) you'll need something else. Some components have relevant signals for this (for example onOpened, I think, for dialogue) but for others, you need make your own signal (which is trivial to do well).

  • Programming list scrolling does not

    For some very odd reason, I am unable to programmaticaly scroll my list. With the exception of the simple scroll() method which takes an offset of pixels, no other methods of scrolling the no matter what.

    In addition, ScrollPosition and ScrollAnimation who hold constants, are apparently not available for my use. When I ctrl + space to see tips, suggestions are only ScrollMode and ScrollIndicatorMode.

    http://developer.BlackBerry.com/Cascades/reference/bb__cascades__scrollposition.html

    ActionItem {
                            title: "To Top"
                            ActionBar.placement: ActionBarPlacement.InOverflow
                            imageSource: "asset:///images/ic_to_top.png"
                            onTriggered: {
                                messagesList.scrollToItem(1);
                            }
                        },
                        ActionItem {
                            title: "To Bottom"
                            ActionBar.placement: ActionBarPlacement.InOverflow
                            imageSource: "asset:///images/ic_to_bottom.png"
                            onTriggered: {
                                messagesList.scrollToItem(messagesList.dataModel.childCount());
                            }
                        },
    

    Given that I could not access to the constants for the scrollToPosition() method, I tried to use the scrollToItem() that scrolls to a supplied index number. It does absolutely nothing.

    Please, any help suggestions is welcome and appreciated.

    Thank you!

    Hello
    scrollToItem expects a row which is a table consisting of section number JavaScript and article. The indexes are zero-based. Try:

    messagesList.scrollToItem([1]) / / second item
    or
    messagesList.scrollToItem ([0, 1]); first section, second item
    I'm not sure that it will work.

    childCount returns a number of child elements in the section and uses an argument. For ArrayDataModel or GroupDataModel use the size() function. Valid range of items is 0.size () - 1.

Maybe you are looking for

  • Image not recognized by javascript in firefox 8.0 ID.

    I have a frameset which includes a setting with id = 'hand '.When I click on a link that calls javascript referencing top.main it happens as undefined.This code works perfectly in IE, chrome and Android tablets. I guess I'll have to tell my users to

  • G480 - upgrade processor

    My laptop is a lenovo G480 (20149). Processor i3 - 2348M, I want to spend, I would like to know what processors are compatible with my motherboard. Mod edit: System model added to the front of the subject line to improve visibility / clarity.

  • AMD FUSION

    The amd fusionthing is any good? or gamebooster is better. IM planing on using it for kid online.

  • MS Flight - Hawaii Bundle will not be installed.

    I installed MS Flight on the site of Ms. The other day, I bought the beam of Hawaii as a gift to install on my pc of son at home. We got the email for the gift. Installed Steam, he began installing and asked if she could make changes to the computer.

  • Script for "fill with pattern" - "use a last used.

    Hello guys, I need a bit of help to automate my work.I work with patterns (such as a Model Designer), but I need to automate my work a little.There's this great function now 'fill with... model' and then you have scripts for those.That said what I us