ListView context menu function problem

I'm trying to get positions in my context menu and the button to work, but the file for routing functions doesn't seem to work

ListView {
                    function getApp() { // 1
                        return _app
                    }

                    id: listView
                    property string selectedItemID
                    dataModel: _app.dataModel

                    listItemComponents: [ // 2

                        ListItemComponent {
                            type: "item"
                            Container {
                                id: itemContainer
                                layout: StackLayout {
                                    orientation: LayoutOrientation.LeftToRight
                                }
                                StandardListItem {
                                    id: rootItem // 3
                                    title: ListItemData.name
                                    description: ListItemData.description

                                    contextActions: [
                                                  ActionItem {

                                                    title: qsTr("Clear All") + Retranslate.onLanguageChanged
                                                    imageSource: "asset:///images/ic_clear_list.png"
                                                    attachedObjects: [
                                                        SystemToast {
                                                            id: clearToast
                                                            body: qsTr("All Items Deleted") + Retranslate.onLanguageChanged
                                                        },
                                                        SystemDialog {
                                                            id: clearDialog
                                                            title: qsTr("Clear List") + Retranslate.onLanguageChanged
                                                            body: qsTr("This action will delete all list items.  This action cannot be un-done.") + Retranslate.onLanguageChanged
                                                            onFinished: {
                                                                if (clearDialog.result ==
                                                                SystemUiResult.ConfirmButtonSelection)
                                                                    rootItem.ListItem.view.getApp().clearObjects() // 4

                                                                if (clearDialog.result ==
                                                                SystemUiResult.ConfirmButtonSelection)
                                                                    clearToast.show()

                                                            }
                                                        }
                                                    ]
                                                    onTriggered: {
                                                        clearDialog.show()
                                                    }
                                                },
                                                DeleteActionItem {
                                                    title: qsTr("Delete") + Retranslate.onLanguageChanged
                                                    imageSource: "asset:///images/delete.png"
                                                    attachedObjects: [
                                                        SystemToast {
                                                            id: deleteToast
                                                            body: qsTr("Item Deleted") + Retranslate.onLanguageChanged
                                                        },
                                                        SystemDialog {
                                                            id: deleteDialog
                                                            title: qsTr("Delete Item") + Retranslate.onLanguageChanged
                                                            body: qsTr("This action will delete this item.  This action cannot be un-done.") + Retranslate.onLanguageChanged
                                                            onFinished: {
                                                                if (deleteDialog.result ==
                                                                SystemUiResult.ConfirmButtonSelection)
                                                                    rootItem.ListItem.view.getApp().deleteObject(ListItemData.customerID) // 4

                                                                if (deleteDialog.result ==
                                                                SystemUiResult.ConfirmButtonSelection)
                                                                    deleteToast.show()

                                                            }
                                                        }
                                                    ]
                                                    onTriggered: {
                                                        deleteDialog.show()

                                                    }
                                                }
                                            ]
                                        }
                                    ]
                                }
                                Label {
                                    text: ListItemData.lat
                                    textStyle.fontSize: FontSize.Large
                                verticalAlignment: VerticalAlignment.Center

                            }
                                Button {
                                    leftPadding: 30
                                    rightPadding: 30
                                    preferredWidth: 150
                                    imageSource: "asset:///images/ic_add.png"
                                    onClicked: {
                                        rootItem.ListItem.getApp().updateObject(ListItemData.customerID, ListItemData.name, ListItemData.description, ListItemData.datefield, ListItemData.lat + 1, ListItemData.lon, ListItemData.categorySelect, ListItemData.mapurl)
                                    }
                                }
                            }

                        }

                    ]
                    onTriggered: {
                        clearSelection()
                        select(indexPath)

                    }

Any help would be greatly appreciated.

Okay, I should have added more information.  I managed to find a workaround.  instead of using a standard list item, I just made each item container.

Here is the new labour code:

ListView {
                    function getApp() { // 1
                        return _app
                    }

                    id: listView
                    property string selectedItemID
                    dataModel: _app.dataModel

                    listItemComponents: [ // 2

                        ListItemComponent {
                            type: "item"
                            Container {
                                id: rootItem
                                rightPadding: 20
                                leftPadding: 20
                                contextActions: [
                                        ActionSet {
                                            title: ListItemData.name
                                            actions: [
                                                ActionItem {
                                                    title: qsTr("Edit") + Retranslate.onLanguageChanged
                                                    imageSource: "asset:///images/ic_edit.png"
                                                    attachedObjects: [
                                                        Sheet {
                                                            id: editSheet

                                                            Page {

                                                                id: rootPage
                                                                titleBar: TitleBar {
                                                                    id: editBar
                                                                    title: qsTr("Edit") + Retranslate.onLanguageChanged
                                                                    visibility: ChromeVisibility.Visible

                                                                    dismissAction: ActionItem {
                                                                        title: qsTr("Cancel") + Retranslate.onLanguageChanged
                                                                        onTriggered: {
                                                                            // Hide the Sheet.
                                                                            editSheet.close()
                                                                        }
                                                                    }
                                                                    acceptAction: ActionItem {
                                                                        title: qsTr("Save") + Retranslate.onLanguageChanged
                                                                        onTriggered: {
                                                                            // Hide the Sheet and emit signal that the item should be saved
                                                                            rootItem.ListItem.view.getApp().updateObject(ListItemData.customerID, name2.text, ListItemData.description, datefield2.text, counter.text, limittwo.text, ListItemData.categorySelect, ListItemData.mapurl);
                                                                            editSheet.close()
                                                                            editToast.show()
                                                                            name2.text = ""
                                                                            counter.text = ""
                                                                            limittwo.text = ""
                                                                        }
                                                                    }
                                                                }

                                                                Container {

                                                                    layout: DockLayout {
                                                                    }
                                                                    //! [0]
                                                                    Container {
                                                                        horizontalAlignment: HorizontalAlignment.Center

                                                                        topPadding: 30
                                                                        leftPadding: 30
                                                                        rightPadding: 30
                                                                        Container {
                                                                            topPadding: 30.0
                                                                            layout: StackLayout {
                                                                                orientation: LayoutOrientation.LeftToRight
                                                                            }

                                                                            TextField {
                                                                                id: name2
                                                                                text: ListItemData.name
                                                                                horizontalAlignment: HorizontalAlignment.Center

                                                                            }
                                                                            Label {
                                                                                id: datefield2
                                                                                text: {
                                                                                    var today = new Date();
                                                                                    (today.getMonth() + 1) + "/" + today.getDate() + "/" + (today.getFullYear() - 2000);
                                                                                }
                                                                            }

                                                                        }
                                                                        Container {
                                                                            layout: StackLayout {
                                                                                orientation: LayoutOrientation.LeftToRight
                                                                            }
                                                                            topPadding: 40

                                                                            TextField {

                                                                                id: counter
                                                                                text: ListItemData.lat

                                                                                inputMode: TextFieldInputMode.NumbersAndPunctuation

                                                                            }
                                                                        TextField {

                                                                            id: limittwo
                                                                            text: ListItemData.lon
                                                                            hintText: qsTr("Limit") + Retranslate.onLanguageChanged
                                                                            inputMode: TextFieldInputMode.NumbersAndPunctuation

                                                                        }

                                                                    }

                                                                        attachedObjects: [
                                                                            SystemToast {
                                                                                id: editToast
                                                                                body: qsTr("Item Edited") + Retranslate.onLanguageChanged
                                                                            }
                                                                        ]
                                                                    }
                                                                    //! [0]
                                                                }
                                                            }
                                                        }

                                                    ]
                                                    onTriggered: {
                                                        editSheet.open()
                                                    }
                                                },
                                                ActionItem {
                                                  title: qsTr("Reset") + Retranslate.onLanguageChanged
                                                  imageSource: "asset:///images/update.png"
                                                  attachedObjects: [
                                                      SystemToast {
                                                          id: restToast
                                                          body: qsTr("Item Count Reset") + Retranslate.onLanguageChanged
                                                      },
                                                      SystemDialog {
                                                          id: resetDialog
                                                          title: qsTr("Reset") + Retranslate.onLanguageChanged
                                                          body: qsTr("This action will reset the item count to one.  You can edit the count afterwards in the edit sheet if you wish.") + Retranslate.onLanguageChanged
                                                          onFinished: {
                                                              if (resetDialog.result ==
                                                              SystemUiResult.ConfirmButtonSelection)
                                                                  rootItem.ListItem.view.getApp().updateObject(ListItemData.customerID, ListItemData.name, ListItemData.description, Date(), 1, ListItemData.lon, ListItemData.categorySelect, ListItemData.mapurl)

                                                              if (resetDialog.result ==
                                                              SystemUiResult.ConfirmButtonSelection)
                                                                  resetToast.show()

                                                          }
                                                      }
                                                  ]
                                                  onTriggered: {
                                                      resetDialog.show()
                                                  }
                                                },
                                                InvokeActionItem {
                                                    title: qsTr("Share") + Retranslate.onLanguageChanged
                                                    query {
                                                        mimeType: "text/plain"
                                                        invokeActionId: "bb.action.SHARE"
                                                    }
                                                    onTriggered: {
                                                        data = ListItemData.name + " count: " + ListItemData.lat + ". Shared using the TiCat app!";
                                                    }
                                                },

                                                ActionItem {

                                                    title: qsTr("Clear All") + Retranslate.onLanguageChanged
                                                    imageSource: "asset:///images/ic_clear_list.png"
                                                    attachedObjects: [
                                                        SystemToast {
                                                            id: clearToast
                                                            body: qsTr("All Items Deleted") + Retranslate.onLanguageChanged
                                                        },
                                                        SystemDialog {
                                                            id: clearDialog
                                                            title: qsTr("Clear List") + Retranslate.onLanguageChanged
                                                            body: qsTr("This action will delete all list items.  This action cannot be un-done.") + Retranslate.onLanguageChanged
                                                            onFinished: {
                                                                if (clearDialog.result ==
                                                                SystemUiResult.ConfirmButtonSelection)
                                                                    rootItem.ListItem.view.getApp().clearObjects() // 4

                                                                if (clearDialog.result ==
                                                                SystemUiResult.ConfirmButtonSelection)
                                                                    clearToast.show()

                                                            }
                                                        }
                                                    ]
                                                    onTriggered: {
                                                        clearDialog.show()
                                                    }
                                                },
                                                DeleteActionItem {
                                                    title: qsTr("Delete") + Retranslate.onLanguageChanged
                                                    imageSource: "asset:///images/delete.png"
                                                    attachedObjects: [
                                                        SystemToast {
                                                            id: deleteToast
                                                            body: qsTr("Item Deleted") + Retranslate.onLanguageChanged
                                                        },
                                                        SystemDialog {
                                                            id: deleteDialog
                                                            title: qsTr("Delete Item") + Retranslate.onLanguageChanged
                                                            body: qsTr("This action will delete this item.  This action cannot be un-done.") + Retranslate.onLanguageChanged
                                                            onFinished: {
                                                                if (deleteDialog.result ==
                                                                SystemUiResult.ConfirmButtonSelection)
                                                                    rootItem.ListItem.view.getApp().deleteObject(ListItemData.customerID) // 4

                                                                if (deleteDialog.result ==
                                                                SystemUiResult.ConfirmButtonSelection)
                                                                    deleteToast.show()

                                                            }
                                                        }
                                                    ]
                                                    onTriggered: {
                                                        deleteDialog.show()

                                                    }
                                                }
                                            ]
                                        }
                                    ]
                                Container {
                                    id: rootItemtwo
                                    layout: StackLayout {
                                        orientation: LayoutOrientation.TopToBottom
                                    }

                                Container {
                                    id: rootItemthree
                                    layout: StackLayout {
                                        orientation: LayoutOrientation.LeftToRight
                                    }

                                Label {

                                    preferredWidth: 450
                                    text: ListItemData.name
                                    textStyle.fontSize: FontSize.Large
                                }
                                Label {

                                    minWidth: 100.0
                                    preferredWidth: 100.0
                                    maxWidth: 120
                                    text: ListItemData.lat
                                    textStyle.fontSize: FontSize.Large
                                verticalAlignment: VerticalAlignment.Center

                            }
                                Label {
                                    translationY: 5
                                    text: "/" + ListItemData.lon
                                    textStyle.fontSize: FontSize.Small
                                    verticalAlignment: VerticalAlignment.Center

                                    textStyle.color: Color.DarkGray
                                        minWidth: 100.0
                                        preferredWidth: 100.0
                                    }
                                Button {
                                    leftPadding: 30
                                    rightPadding: 30
                                    preferredWidth: 150
                                    horizontalAlignment: HorizontalAlignment.Center
                                    imageSource: "asset:///images/ic_add.png"
                                    onClicked: {

                                        rootItem.ListItem.view.getApp().updateObject(ListItemData.customerID, ListItemData.name, ListItemData.description, ListItemData.datefield, parseInt(ListItemData.lat) + 1, ListItemData.lon, ListItemData.categorySelect, ListItemData.mapurl)
                                    }
                                }
                                }

                                Label {
                                    translationY: -20
                                    minWidth: 600
                                    preferredWidth: 600
                                    text: "Last Count: " + ListItemData.datefield
                                    textStyle.fontSize: FontSize.XSmall
                                    textStyle.color: Color.DarkGray
                                    horizontalAlignment: HorizontalAlignment.Left
                                }

                                Divider {
                                    translationY: -20
                                }
                            }
                                bottomPadding: 5

                            }

                        }

                    ]
                    onTriggered: {
                        clearSelection()
                        select(indexPath)
                    }
                }
            }

Tags: BlackBerry Developers

Similar Questions

  • Behavior of Win7 context Menu function

    On 1 machine Win7, right click Print available, when you select a PDF file. On another machine, is not.

    What gives this command in the context menu? How to add?
    The two 64-bit.

    Hello

    1. where exactly you right-click to print?
    2. don't you make changes to the computer before the show?
    3. you have Adobe flash player last version installed?

    Try the following steps.
    a. click the Start button.
    b. click "all programs."

    c. scroll down to "accessories.

    d. right-click on "Command Prompt" and "Run as Administrator"

    e. click on Yes in the user account control window that appears
    f. the command prompt window is now open and active

    g. type regsvr32 "C:\Program Files (x 86) \Adobe\Acrobat 10.0\Acrobat Elements\Contextmenu64.dll".
    h. press ENTER.

    If the steps above fail, I suggest you post.
    http://forums.Adobe.com/index.jspa?view=overview

  • Item ListView gets deselected as it appears from the context menu

    Since about 10.3.1 I notice that my lists behave in the same way, when I long press on a point I think the context menu to appear, what it does, but when it does so the item is deselected, so in the slot press and hold on I can't access the row for the selected item.

    At all the world feels something similar?

    Thank you.

    OK, problem solved. Here is the solution:

    -When the popup appears entirely because the finger was published the listener to activate slot is called indicating released finger. Problem is ListItemListener example in the docs went something like this:

    void MyItemClass::activate(bool activate)
    {
        // There is no special activate state, select and activated looks the same.
        select(activate);
    }
    

    Who calls the select slot and it says to turn off. That's why it's happening. Don't know how much this has changed, but this is the situation.

    To fix it I removes the code of slot() activation which allows the selected list item, but a new problem pervades: the element can not get deslected. To manage this I created an instance of ContextMenuHandler(), connected the visualStateChanged to a slit and searched a State ContextMenuVisualState::AnimatingToHidden clear the selections of the listview. So far so good.

  • Problem VLC media player - option of the context menu "add to vlc media player playlist" disappear in the selection of multiple files.

    OK, here's my problem. I installed VLC. It works very well. I have 'Add to playlist in vlc meadia player' on the pop-up menu file.

    PROBLEM: If I select more than 16 files and then "Add to vlc meadia Player playlist" disappear from the file context menu.

    ANNOYING: This stupid Windows Media Player is still there.

    QUESTION: Why vlc disappear from the file context menu if I select more then 16 files but wmp doesn't?  Is M$ trying to force people to use WMP?

    I also did my OWN program and he added in the context menu, and I discovered that my OWN program has also 16 files limit.

    Why windows deletes non MS program context menu, if I select more than 16 files? How can I solve this problem? I want to have my custom context menu program, even if I select more than 16 files.

    How to fix this?

    Hello
     
    I ask you to post this question on the Microsoft Development Network forums.
    Here is the link:
    http://social.msdn.Microsoft.com/forums/en/windowspro-audiodevelopment/threads
     
    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Problem with the context menu: eception typeError: cannot read property CONTEXT_IMAGE undefined

    Hi, I wanted to try the following context menu with the javaScript function:

    function addMyItem() {
            var myItem = { actionId: 'Delete', label: 'Delete', icon: 'delete.png' },
                contexts = [blackberry.ui.contextmenu.CONTEXT_IMAGE, blackberry.ui.contextmenu.CONTEXT_INPUT];
            blackberry.ui.contextmenu.addItem(contexts, myItem, function () { console.log('hi') });
        }
    

    I have this function of reference on the API [1]

    When I try to run this function, I get the error:

    Eception typeError: cannot read property CONTEXT_IMAGE undefined

     


    What's not here?

    EDIT: I have the function ID in my config

    
    

    [1] https://developer.blackberry.com/html5/apis/blackberry.ui.contextmenu.html

    I have a little differently, but have checked that it worked for me during a test.

    var share = {
      actionId: 'share',
      label: 'Share Image',
      icon: '../images/share.png'
    };
    
    var contexts = [blackberry.ui.contextmenu.CONTEXT_IMAGE];
    
    blackberry.ui.contextmenu.addItem(contexts, share, function(){
      alert('Sharing is caring!');
    });
    

    If this does not work, can you let us know what development kit software that you use, and we can test again if necessary?

  • Webview from landscape orientation to portrait mode causes the font size to become smaller and a problem with the context Menu

    Hi, I have a webview with inline html. It works fine except that when I pass in landscape mode, the screen fills fine and the police grows, but when I go back to portrait fonts are tiny, even smaller then when initially in the portrait. I am installing this on a Z10 with cascades 10.1 SDK. Is this a Bug somewhere in the SDK or BB10?

    Another problem I have is in Web mode, the shortcut menu appears when I touch a Word. I is no need to use the context menu. How can I get rid of him. In the case where I would like to someday use this menu, I would need to add code to it. I can't find the code. Where can I find it?

    Thanks for your help

    Concerning

    Roland

    I' to propose taying far WebView as much as possible and using TextArea (with type HTML). There are still a few bugs present in WebView that make it unpleasant to use.

    You cannot get rid of the context menu, so it will disappear once you remove WebView. You can still share with other methods.

    This may seem more work and it's probably, but it's going to do to improve the user experience and fewer headaches for you.

  • Context menu with video player problem

    Hello

    I don't think I'm doing something stupid... It seems that having a MediaContainer onstage prevents somehow the ContextMenu send a click event, someone else knows it? I created a very simple example below to illustrate the problem. If you click anywhere on the stage, you will get the ContextMenu correct (with the custom "click me"), but only if you click outside the MediaContainer will be distributed ContextMenuEvent. If anyone has any ideas of what I could do wrong, or could confirm that maybe it's a bug, I'd be very happy.

    package
    {
    import flash.display.Sprite;
    Import org.osmf.containers.MediaContainer;
    Import org.osmf.elements.VideoElement;
    Import org.osmf.media.MediaPlayer;
    Import org.osmf.net.DynamicStreamingResource;
    Import org.osmf.net.DynamicStreamingItem;
    import flash.ui.ContextMenu;
    import flash.ui.ContextMenuItem;
    import flash.events.ContextMenuEvent;

    [SWF (width = "1024" height = "600", backgroundColor = "#000000", frameRate = "30")]
    SerializableAttribute public class OSMFPlayerTest extends Sprite
    {
    public void OSMFPlayerTest()
    {
    var dynamicStreamingResource:DynamicStreamingResource = new DynamicStreamingResource ('rtmp://myhost/');
    dynamicStreamingResource.urlIncludesFMSApplicationInstance = true;
    var stream1:DynamicStreamingItem = new DynamicStreamingItem ('mp4:mystream.f4v', 190);
    dynamicStreamingResource.streamItems.push (stream1);

    var videoElement:VideoElement = new VideoElement (dynamicStreamingResource);
    Player: var = new MediaPlayer MediaPlayer (videoElement);
    Display: Var MediaContainer = new MediaContainer();
    display.addMediaElement (videoElement);
    addChild (display);

    menu: ContextMenu var = new ContextMenu();
    menu.hideBuiltInItems ();
    var point: ContextMenuItem = new ContextMenuItem ("click me '");
    item.addEventListener (ContextMenuEvent.MENU_ITEM_SELECT, onMenuItemClick);
    menu.customItems.push (item);
    menu = this.contextMenu;
    }

    private void onMenuItemClick(e:ContextMenuEvent):void
    {
    trace ('click');
    }
    }
    }

    Thank you very much

    Simon

    Hi Simon,.

    You stumbled upon a known issue of Flash Player and its impact on the event of shipping on the video object context menu.

    There are two possible solutions:

    1 Add a transparent sprite on top of the video and add event listeners.

    2 use something like a sprite "control bar" as a target for event listener context menu.

    Hope this helps,

    ANDRIAN

  • Fonts for the context menu problems

    Photoshop CS5 12.0.2 x 32

    How can I reset the police in the context menu? Mine seems to be everywhere. For now, the boxes are empty, but in the past, it was very large and crossed, or angled at 45 degrees. I want to just be what it is supposed to be (that is to say, readable). I am including a screenshot. I tried to delete the preferences already.

    Untitled-1.jpg

    Search the Forum, it is a known problem with the 12.0.2 update and its been reviewed by at least 5 other threads.

    Mylenium

  • Problem with context Menu appearance

    I didn't know where else to post this, so if this is in the wrong section, sorry.

    Whenever I right click, now my context menu looks like this: http://gyazo.com/1f8d086bf5c73137728f88124bad0911 . It is not normally look like this on the victory. 7.
    What would cause this? Is it possible to fix this?

    The menu appears fine for me. Perhaps you are wondering why it apperas in the style "classic"?

  • Firefox crashes when you open no matter what context menu - Save as download window, window options, etc.

    This is the third time I had this problem with firefox...

    Firefox crashes when you try to upload images, files, etc. right click context menu opens (with bookmark, save the page, save the image, options etc) but after selecting an option, save the image or another, the real save as dialog box does not open and firefox crashes.

    say many pages open the download and clear history... I can't do that, trying to open the download hangs there, too. like, trying to open any what other dialogues.

    the first time that this has happened, the only solution I could find was a total wipe and re-install (simple uninstall/reinstall didn't work... it had to be weeded manually in the registry).
    the second time that I got just to rebuild my system, so I just do a fresh install on a fresh OS.

    This time I can't seem to solve the problem of uninstalling and re - install...

    Help?

    discovered what he was doing!

    After trying safe mode of firefox and safe mode of windows and any number of other things I gave a little upward for a bit there, but I woke up from a dream in the middle of the night thinking ' based on the conduct in question, it * must * be something in the shell that is the cause. " (Sorry, I dream of geek).

    so I grabbed a shell viewer editor - ShelleExView (http://www.nirsoft.net/utils/shexview.html) (had to use a yucky, any browser to download) and gave him a race.

    I have listed all the extensions of the date they were added as a clsid and trying of think back to when the problem started... about a month or so, after a new system, reinstall. and through a little trial and error disabling, I found the culprit.

    It is an overlay Manager icon set by what is called WagerLogic. After looking into the company's name, I have to assume this was related to one of the annoying "just lost real money on our virtual casino" pop-ups that infest the net nefariously scenic for an easy mark as orphaned Dickens.

    I disabled it and voila! Firefox is still in full function.

  • Context menu: open the Edit Preview vs vs

    I found several useful programs and procedures to change items of the context menu in Windows Explorer, including a very useful program which adds and organizes the functions called File Menu Tools from Lopesoft of Windows XP/Vista/7. I still need to find a comprehensive solution, but in this post, I ask about a specific problem. By using the default program control panel in Windows, we can adjust what program responds when the choice open is select in the context menu, within limits. I would attribute different programs to Edit choices and preview on this same context menu. There's an example for me. PNG files. From Adobe Fireworks saves files in particular. PNG format, but most of the other programs don't, I'd like to be able to right click on a such file and select Preview (preferably set as default) to open it in the photo gallery Windows for a quick consultation and limited editions. Change to open in Fireworks capable Fireworks files; Open to open it in Photoshop to fundamentally change. Any ideas?

    Hello

    Unfortunately, there is no such feature in windows to allow this level of customization.

  • Call attachedobject from context menu

    Dear developers

    When I press an action in the contextmenu in my list, I want to open a sheet that is attached to my page. But when I try that, he repeated to me that it can not find this sheet. Is it correct to say that the contextmenu knows only the element where it is defined in? I thought that my call might be spread until he found, but this isn't what he does.

    I need that attachedobject also in my page, is not possible to define it in the same element that where my context menu is defined in.

    Thanks in advance

    ListItemComponents have their own field of visibility. This thread has a similar problem and workaround:

    http://supportforums.BlackBerry.com/T5/Cascades-development/ActionItem-issue-in-a-context-menu/m-p/2...

    It is also possible to use this hack to keep a global pointer to the page:

    http://supportforums.BlackBerry.com/T5/Cascades-development/variable-object-visibility-in-ListViewIt...

  • ActionItem question in a context menu

    Hello

    I am trying to add a context menu to list items. That's how I started:

                ListView {
                    id: tasksList
                    objectName: "tasksList"
                    layout: StackListLayout {
                        headerMode: ListHeaderMode.Sticky
                    }
                    dataModel: tasksModel
    
                    listItemComponents: [
                        ListItemComponent {
                            type: "item"
                            StandardListItem {
                                imageSpaceReserved: false
                                title: ListItemData.title
    
                                contextActions: [
                                    ActionSet {
                                        title: contentView.title
                                        ActionItem {
                                            title: "View"
                                            imageSource: "asset:///images/email.png"
    
                                            onTriggered: {
                                                var page = taskPageDefinition.createObject();
                                                nav.push(page);
                                            }
                                        }
                                        ActionItem {
                                            title: contentView.done == 0 ? "Done" : "Todo"
                                            imageSource: "asset:///images/email.png"
                                        }
                                    }
                                ]
                            }
                        },
                        ListItemComponent {
                            type: "header"
                            Header {
                                title: ListItemData == 1 ? "Done" : "Todo"
                            }
                        }
                    ]
    

    Two points appear correctly. However, the onTriggered is never called. If I move the table of contextActions up to the ListView, it works. However, headers and the empty area of the list trigger the context menu, which is not what I want.

    Why the onTriggered slot is not called?

    Thank you.

    I guess that onTrigger is called, but taskPageDefinition and nav are not visible because the ListItemComponents have their own field of visibility.

    If the id of the ListItemComponent is rootId, then off elements are accessed like this:

    rootId.ListItem.view.someJavaScriptFunction)

    Set someJavaScriptFunction inside ListView. Inside this function, it is possible to access other objects defined in the qml file.

    This thread has an example:

    http://supportforums.BlackBerry.com/T5/Cascades-development/ContextActions-inside-ListItem-can-not-a...

  • Context menu in Premiere Pro 2015.2

    I've lost the context menu feature after you download 2015.2. Not on all the files--and that's the strange thing. I often need to "Replace Footage" in the work that I do. For recent years all I had to do was go to the library in the project Panel, find the image or images that I need to replace, and then click the control (I'm on a Mac using El Capitan) and a pop-up menu appears where I can just scroll up a replacement option. Now, I'm having an intermittent problem strangely no context menu appears when I select an element in need of replacement. I say intermittent because some items in the library of give me a context menu - while the other will not. Is there a default value to display a context menu for items in library? How is it that some items that can be control-clicked to launch a context menu in the library where others cannot? It is a new obstacle and any help would be greatly appreciated.

    I don't know where your context menu is gone, but the function replace Footage of mapping to your keyboard could be a workaround.

    Keyboard shortcuts in the PP can be very picky to find. To find the right thing, search for "Of Source Monitor" and "location".

    I have these mapped to Option 1 and Option-2 and it is easily one of my favorite in PP. features

  • Context menu show on specific point click

    Hi all

    I see an extension HTML for InDesign CC 2014 for Win and Mac. I managed to display a popup using CEPInterface 5.2

    Here's the code,

    function CreateContextMenu() {
    
      csInterface.setContextMenu(contextMenuXML, contextMenuClickedHandler);
    
    
    }
    

    This function is called when the user clicks inside a box. The problem I am facing is that once I put the context menu, no matter where I right click on the inside of the Panel, the context menu is created. Can I put it so that the context menu is displayed only when I click on the box?

    Thank you!

    Hello

    I don't know if it would work, but how about a listener 'click' on the body with Event.stopPropagation () or preventDefault() element; Then check the target of the event, and if this is the item you want, then yourElement.dispatchEvent (new Event ('click'))?

    See references here: creation and raising events - the Web Developer's guide | DND and Event.stopPropagation () - Web APIs | DND

    Just a suggestion, let me know if that helps

    Concerning

    Davide Barranca

    ---

    www.davidebarranca.com

    www.cs-extensions.com

Maybe you are looking for